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

35 lines
1.3 KiB
Text
Raw Normal View History

2019-10-06 23:31:48 +02:00
div
' Posted
=> pretty_time(@post.created_at)
/=<> link_to new_report_path(reportable_class: 'Post', reportable_id: post.id), class: 'communication__interaction' do
/ i.fa.fa-flag
/ =<> 'Report'
/- if post.edited_at && can?(:read, post)
/ br
/ a href=forum_topic_post_history_path(post.topic.forum, post.topic, post)
/ | Edited
/ =<> friendly_time(post.edited_at)
/ - if post.edit_reason.present?
/ | because:
/ =<> post.edit_reason
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
/span.owner-options.hidden
/ strong =<> link_to edit_forum_topic_post_path(post.topic.forum, post.topic, post), class: 'communication__interaction' do
/ i.fas.fa-edit
/ ' Edit