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

37 lines
1.3 KiB
Text
Raw 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=Routes.image_comment_report_path(@conn, :new, @comment.image, @comment)
i.fa.fa-flag>
' Report
2019-10-05 02:51:56 +02:00
/- if comment.edited_at && can?(:read, comment)
/ br
/ a href=image_comment_history_path(comment.image, comment)
/ | Edited
/ =<> friendly_time(comment.edited_at)
/ - if comment.edit_reason.present?
/ | because:
/ =<> comment.edit_reason
div
2019-11-27 02:45:57 +01:00
- link_path = Routes.image_path(@conn, :show, @comment.image) <> "#comment_#{@comment.id}"
- safe_author = PhilomenaWeb.PostView.textile_safe_author(@comment)
- 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
/span.owner-options.hidden
/ strong =<> link_to edit_image_comment_path(comment.image, comment), class: 'communication__interaction' do
/ i.fas.fa-edit
/ ' Edit