2019-10-06 23:31:48 +02:00
|
|
|
div
|
|
|
|
' Posted
|
|
|
|
=> pretty_time(@post.created_at)
|
2019-12-04 14:13:10 +01:00
|
|
|
|
2024-04-29 02:55:27 +02:00
|
|
|
a.communication__interaction href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/reports/new"
|
2019-12-04 14:13:10 +01:00
|
|
|
i.fa.fa-flag>
|
|
|
|
' Report
|
|
|
|
|
2019-12-15 17:33:43 +01:00
|
|
|
= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do
|
2019-12-06 16:14:25 +01:00
|
|
|
br
|
2024-04-29 02:55:27 +02:00
|
|
|
a href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"
|
2019-12-06 16:14:25 +01:00
|
|
|
' Edited
|
|
|
|
=> pretty_time(@post.edited_at)
|
|
|
|
|
|
|
|
= if @post.edit_reason not in [nil, ""] do
|
|
|
|
' because:
|
|
|
|
=> @post.edit_reason
|
|
|
|
|
2019-10-06 23:31:48 +02:00
|
|
|
div
|
2024-04-29 02:55:27 +02:00
|
|
|
- link_path = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
|
2021-09-29 22:05:16 +02:00
|
|
|
- safe_author = markdown_safe_author(@post)
|
2019-11-27 02:45:57 +01:00
|
|
|
- quote_body = if @post.hidden_from_users, do: "", else: @post.body
|
|
|
|
|
2019-10-06 23:31:48 +02:00
|
|
|
a.communication__interaction title="Link to post" href=link_path
|
|
|
|
i.fa.fa-link>
|
|
|
|
' Link
|
2019-11-27 02:45:57 +01:00
|
|
|
|
|
|
|
a.communication__interaction.post-reply.post-reply-quote href=link_path data-reply-url=link_path data-author=safe_author data-post=quote_body
|
2019-10-06 23:31:48 +02:00
|
|
|
i.fa.fa-quote-right>
|
|
|
|
' Quote
|
2019-11-27 02:45:57 +01:00
|
|
|
|
|
|
|
a.communication__interaction.post-reply href=link_path data-reply-url=link_path data-author=safe_author
|
2019-11-30 06:26:12 +01:00
|
|
|
i.fa.fa-reply>
|
2019-10-06 23:31:48 +02:00
|
|
|
' Reply
|
2019-12-06 16:14:25 +01:00
|
|
|
|
|
|
|
= if can?(@conn, :edit, @post) do
|
|
|
|
span.owner-options
|
|
|
|
strong
|
2024-04-29 02:55:27 +02:00
|
|
|
a.communication__interaction href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/edit"
|
2019-12-15 19:04:41 +01:00
|
|
|
i.fas.fa-edit>
|
2019-12-06 16:14:25 +01:00
|
|
|
' Edit
|