philomena/lib/philomena_web/templates/conversation/show.html.slime

34 lines
1.4 KiB
Text
Raw Normal View History

2019-11-16 05:38:42 +01:00
elixir:
route = fn p -> Routes.conversation_path(@conn, :show, @conversation, p) end
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @messages, route: route, conn: @conn
2019-11-18 17:00:08 +01:00
other = other_party(@current_user, @conversation)
2019-11-16 05:38:42 +01:00
h1 = @conversation.title
.block
.block__header
=> link "Message Center", to: Routes.conversation_path(@conn, :index)
' »
=> link @conversation.title, to: Routes.conversation_path(@conn, :show, @conversation)
' Conversation with
=> render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn
.block__header--sub.block__header--light
= pagination
= for {message, body} <- @messages do
= render PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn
.block
.block__header.block__header--light
= pagination
2019-11-18 17:00:08 +01:00
= if @messages.total_entries < 1_000 do
= render PhilomenaWeb.Conversation.MessageView, "_form.html", conversation: @conversation, changeset: @changeset, conn: @conn
- else
div
h2 Okay, we're impressed
p You've managed to send over 1,000 messages in this conversation!
p We'd like to ask you to make a new conversation. Don't worry, this one won't go anywhere if you need to refer back to it.
p
=> link "Click here", to: Routes.conversation_path(@conn, :new, receipient: other.name)
' to make a new conversation with this user.