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

42 lines
1.3 KiB
Text
Raw Permalink Normal View History

2019-10-05 02:51:56 +02:00
div
' Posted
=> pretty_time(@comment.created_at)
2019-12-04 14:13:10 +01:00
a.communication__interaction href=~p"/images/#{@comment.image}/comments/#{@comment}/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(@comment.edited_at) and can?(@conn, :show, @comment) do
2019-12-06 15:43:01 +01:00
br
a href=~p"/images/#{@comment.image}/comments/#{@comment}/history"
2019-12-06 15:43:01 +01:00
' Edited
=> pretty_time(@comment.edited_at)
= if @comment.edit_reason not in [nil, ""] do
' because:
=> @comment.edit_reason
2019-10-05 02:51:56 +02:00
div
- link_path = ~p"/images/#{@comment.image}" <> "#comment_#{@comment.id}"
- safe_author = PhilomenaWeb.PostView.markdown_safe_author(@comment)
2019-11-27 02:45:57 +01:00
- quote_body = if @comment.hidden_from_users, do: "", else: @comment.body
2019-10-05 02:51:56 +02:00
a.communication__interaction title="Link to comment" 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-05 02:51:56 +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-05 02:51:56 +02:00
' Reply
2019-12-06 15:43:01 +01:00
= if can?(@conn, :edit, @comment) do
span.owner-options
strong
a.communication__interaction href=~p"/images/#{@comment.image}/comments/#{@comment}/edit"
2019-12-10 17:11:49 +01:00
i.fas.fa-edit>
2019-12-06 15:43:01 +01:00
' Edit