philomena/lib/philomena_web/templates/message/_message.html.slime

24 lines
1,015 B
Text
Raw Normal View History

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
2024-06-06 22:28:35 +02:00
= link(to: ~p"/conversations/#{@message.conversation_id}/messages/#{@message}/approve", data: [confirm: "Are you sure?"], method: "post", class: "button") do
2022-03-24 17:31:57 +01:00
i.fas.fa-check>
' Approve
2019-11-16 05:38:42 +01:00
.block__content.flex.flex--no-wrap
2024-05-07 19:33:56 +02:00
= render PhilomenaWeb.CommunicationView, "_body.html", object: %{user: @message.from}, noanon: true, body: @body, conn: @conn, name: "message"
2019-11-16 05:38:42 +01:00
.block__content.communication__options
.flex.flex--wrap.flex--spaced-out
div
' Posted
= pretty_time(@message.created_at)