philomena/lib/philomena_web/templates/comment/_comment_options.html.slime

24 lines
1,003 B
Text
Raw Normal View History

2024-06-06 20:21:21 +02:00
= if not @comment.hidden_from_users or can?(@conn, :hide, @comment) do
.flex.flex--normal-gap.flex--centered
= if not @comment.hidden_from_users do
2024-06-06 22:28:35 +02:00
- link_path = ~p"/images/#{@comment.image}" <> "#comment_#{@comment.id}"
2024-06-06 20:21:21 +02:00
- safe_author = PhilomenaWeb.PostView.markdown_safe_author(@comment)
- quote_body = if @comment.hidden_from_users, do: "", else: @comment.body
2019-11-27 02:45:57 +01:00
2024-06-06 22:28:35 +02:00
a.button href=~p"/images/#{@comment.image}/comments/#{@comment}/reports/new"
2024-06-06 20:21:21 +02:00
i.fa.fa-flag>
' Report
2019-11-27 02:45:57 +01:00
2024-06-06 20:21:21 +02:00
a.button.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
2019-11-27 02:45:57 +01:00
2024-06-06 20:21:21 +02:00
a.button.post-reply href=link_path data-reply-url=link_path data-author=safe_author
i.fa.fa-reply
' Reply
2019-12-06 15:43:01 +01:00
2024-06-06 20:21:21 +02:00
= if not @comment.destroyed_content and can?(@conn, :edit, @comment) do
2024-06-06 22:28:35 +02:00
a.button href=~p"/images/#{@comment.image}/comments/#{@comment}/edit"
2024-06-06 20:21:21 +02:00
i.fas.fa-edit
' Edit