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

64 lines
2.7 KiB
Text
Raw Normal View History

2019-11-16 05:38:42 +01:00
elixir:
2024-06-06 22:28:35 +02:00
route = fn p -> ~p"/conversations/#{@conversation}?#{p}" end
2019-11-16 05:38:42 +01:00
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
2024-06-06 22:28:35 +02:00
=> link "Message Center", to: ~p"/conversations"
2019-11-16 05:38:42 +01:00
' »
2024-06-06 22:28:35 +02:00
=> link @conversation.title, to: ~p"/conversations/#{@conversation}"
2019-11-16 05:38:42 +01:00
' Conversation with
=> render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn
2020-12-11 17:53:40 +01:00
.block__header--sub.block__header--light.page__header
2023-11-23 17:07:49 +01:00
span.page__title>
2019-12-08 00:29:22 +01:00
=> @messages.total_entries
= pluralize("message", "messages", @messages.total_entries)
2020-12-11 17:53:40 +01:00
.page__pagination = pagination
.page__info
2020-12-11 17:53:40 +01:00
= if hidden_by?(@current_user, @conversation) do
2024-06-06 22:28:35 +02:00
= link "Restore conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "delete"]
2020-12-11 17:53:40 +01:00
- else
2024-06-06 22:28:35 +02:00
= link "Remove conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "post", confirm: "Are you really, really sure?"]
= link "Report conversation", to: ~p"/conversations/#{@conversation}/reports/new"
= link "Mark as unread", to: ~p"/conversations/#{@conversation}/read", data: [method: "delete"]
2019-11-16 05:38:42 +01:00
= for {message, body} <- @messages do
= render PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn
.block
2020-12-11 17:53:40 +01:00
.block__header.block__header--light.page__header
.page__pagination = pagination
2019-11-18 17:00:08 +01:00
2022-03-24 17:31:57 +01:00
= case DateTime.compare(DateTime.utc_now(), DateTime.add(@conn.assigns.current_user.created_at, 1_209_600)) do
- :lt ->
.block.block--fixed.block--warning.hidden.js-hidden-warning
h2 Warning!
p
strong> Your account is too new, so your PM will need to be reviewed by staff members.
' This is because it contains an external image. If you are not okay with a moderator viewing this PM conversation, please consider linking the image instead of embedding it (change
code<> ![
' to
code<
| [
| ).
- _ ->
/ Nothing
2019-12-13 18:14:34 +01:00
= cond do
- @conn.assigns.current_ban ->
= render PhilomenaWeb.BanView, "_ban_reason.html", conn: @conn
- @messages.total_entries < 1_000 ->
= render PhilomenaWeb.Conversation.MessageView, "_form.html", conversation: @conversation, changeset: @changeset, conn: @conn
- true ->
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
2024-06-18 19:53:42 +02:00
=> link "Click here", to: ~p"/conversations/new?#{[recipient: other.name]}"
2019-12-13 18:14:34 +01:00
' to make a new conversation with this user.