From 306c9545466c3fe982ac0161cc4caaf52a893d4d Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 7 Dec 2019 18:29:22 -0500 Subject: [PATCH] display message count --- lib/philomena_web/templates/conversation/index.html.slime | 4 +++- lib/philomena_web/templates/conversation/show.html.slime | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/philomena_web/templates/conversation/index.html.slime b/lib/philomena_web/templates/conversation/index.html.slime index 98d3af50..4be1a597 100644 --- a/lib/philomena_web/templates/conversation/index.html.slime +++ b/lib/philomena_web/templates/conversation/index.html.slime @@ -25,7 +25,9 @@ h1 My Conversations => link c.title, to: Routes.conversation_path(@conn, :show, c) .small-text.hide-mobile - ' Started + => count + = pluralize("message", "messages", count) + ' ; started = pretty_time(c.created_at) ' , last message = pretty_time(c.last_message_at) diff --git a/lib/philomena_web/templates/conversation/show.html.slime b/lib/philomena_web/templates/conversation/show.html.slime index 9c979bea..2e28300d 100644 --- a/lib/philomena_web/templates/conversation/show.html.slime +++ b/lib/philomena_web/templates/conversation/show.html.slime @@ -12,6 +12,9 @@ h1 = @conversation.title ' Conversation with => render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn .block__header--sub.block__header--light + span.block__header__title> + => @messages.total_entries + = pluralize("message", "messages", @messages.total_entries) = pagination = link "Remove conversation", to: Routes.conversation_hide_path(@conn, :create, @conversation), data: [method: "post", confirm: "Are you really, really sure?"] = link "Report conversation", to: Routes.conversation_report_path(@conn, :new, @conversation)