philomena/lib/philomena_web/templates/post/_post_options.html.slime

42 lines
1.4 KiB
Text
Raw Normal View History

2019-10-06 23:31:48 +02:00
div
' Posted
=> pretty_time(@post.created_at)
2019-12-04 14:13:10 +01:00
a.communication__interaction href=Routes.forum_topic_post_report_path(@conn, :new, @post.topic.forum, @post.topic, @post)
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
a href=Routes.forum_topic_post_history_path(@conn, :index, @post.topic.forum, @post.topic, @post)
' 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
2019-11-11 18:57:02 +01:00
- link_path = Routes.forum_topic_path(@conn, :show, @post.topic.forum, @post.topic, post_id: @post.id) <> "#post_#{@post.id}"
2019-11-27 02:45:57 +01:00
- safe_author = textile_safe_author(@post)
- 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
a.communication__interaction href=Routes.forum_topic_post_path(@conn, :edit, @post.topic.forum, @post.topic, @post)
2019-12-12 00:04:53 +01:00
i.fa.fa-edit>
2019-12-06 16:14:25 +01:00
' Edit