mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
34 lines
1.4 KiB
Text
34 lines
1.4 KiB
Text
article.block.communication
|
|
= 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: ~p"/conversations/#{@message.conversation_id}/messages/#{@message}/approve", data: [confirm: "Are you sure?"], method: "post", class: "button") do
|
|
i.fas.fa-check>
|
|
' Approve
|
|
|
|
.block__content.flex.flex--no-wrap
|
|
.flex__fixed.spacing-right
|
|
= render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @message.from}, conn: @conn, class: "avatar--100px"
|
|
|
|
.flex__grow.communication__body
|
|
|
|
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
|
|
|
|
.communication__body__text
|
|
= @body
|
|
|
|
.block__content.communication__options
|
|
.flex.flex--wrap.flex--spaced-out
|
|
div
|
|
' Posted
|
|
= pretty_time(@message.created_at)
|