mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
41 lines
1.4 KiB
Text
41 lines
1.4 KiB
Text
div
|
|
' Posted
|
|
=> pretty_time(@post.created_at)
|
|
|
|
a.communication__interaction href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/reports/new"
|
|
i.fa.fa-flag>
|
|
' Report
|
|
|
|
= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do
|
|
br
|
|
a href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"
|
|
' Edited
|
|
=> pretty_time(@post.edited_at)
|
|
|
|
= if @post.edit_reason not in [nil, ""] do
|
|
' because:
|
|
=> @post.edit_reason
|
|
|
|
div
|
|
- link_path = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
|
|
- safe_author = markdown_safe_author(@post)
|
|
- quote_body = if @post.hidden_from_users, do: "", else: @post.body
|
|
|
|
a.communication__interaction title="Link to post" href=link_path
|
|
i.fa.fa-link>
|
|
' Link
|
|
|
|
a.communication__interaction.post-reply.post-reply-quote href=link_path data-reply-url=link_path data-author=safe_author data-post=quote_body
|
|
i.fa.fa-quote-right>
|
|
' Quote
|
|
|
|
a.communication__interaction.post-reply href=link_path data-reply-url=link_path data-author=safe_author
|
|
i.fa.fa-reply>
|
|
' Reply
|
|
|
|
= if can?(@conn, :edit, @post) do
|
|
span.owner-options
|
|
strong
|
|
a.communication__interaction href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/edit"
|
|
i.fas.fa-edit>
|
|
' Edit
|