2019-11-16 05:38:42 +01:00
|
|
|
article.block.communication
|
2022-03-24 17:31:57 +01:00
|
|
|
= if not @message.approved and (can?(@conn, :approve, @message) or @message.from_id == @conn.assigns.current_user.id) do
|
|
|
|
.block__content
|
|
|
|
.block.block--fixed.block--danger
|
|
|
|
p
|
|
|
|
i.fas.fa-exclamation-triangle>
|
|
|
|
' This private message is pending approval from a staff member.
|
|
|
|
= if can?(@conn, :approve, @message) do
|
|
|
|
p
|
|
|
|
ul.horizontal-list
|
|
|
|
li
|
|
|
|
= link(to: Routes.conversation_message_approve_path(@conn, :create, @message.conversation_id, @message), data: [confirm: "Are you sure?"], method: "post", class: "button") do
|
|
|
|
i.fas.fa-check>
|
|
|
|
' Approve
|
|
|
|
|
2019-11-16 05:38:42 +01:00
|
|
|
.block__content.flex.flex--no-wrap
|
2023-11-23 17:07:49 +01:00
|
|
|
.flex__fixed.spacing--right
|
2024-05-01 00:10:05 +02:00
|
|
|
= render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @message.from}, conn: @conn, class: "avatar--small"
|
2019-11-28 03:31:53 +01:00
|
|
|
|
2019-11-16 05:38:42 +01:00
|
|
|
.flex__grow.communication__body
|
2019-11-28 03:31:53 +01:00
|
|
|
|
|
|
|
span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: @message.from}, badges: true, conn: @conn
|
|
|
|
br
|
|
|
|
|
|
|
|
= render PhilomenaWeb.UserAttributionView, "_user_title.html", object: %{user: @message.from}, conn: @conn
|
2019-11-16 05:38:42 +01:00
|
|
|
|
|
|
|
.communication__body__text
|
|
|
|
== @body
|
|
|
|
|
|
|
|
.block__content.communication__options
|
|
|
|
.flex.flex--wrap.flex--spaced-out
|
|
|
|
div
|
|
|
|
' Posted
|
|
|
|
= pretty_time(@message.created_at)
|