1
+ li .cf .comment class =(top_comment?(comment, comment_counter) ? 'top-comment' : '') id =" comment_#{ comment.id} " itemscope =true itemtype =meta_comment_schema_url itemprop =:comment
2
+ meta itemprop =:commentTime content =comment.created_at
3
+ meta itemprop =:name content =comment.id
4
+ header .cf itemprop =" creator" itemscope =true itemtype =meta_person_schema_url
5
+ meta itemprop =:name content =comment.user.display_name
6
+ meta itemprop =:alternateName content =comment.user.username
7
+ . comment-avatar
8
+ = image_tag(users_image_path(comment.user), class: 'avatar')
9
+
10
+ =link_to comment.user.username, profile_path(comment.user.username), class: 'comment-user', 'data-reply-to' => comment.user.username, 'itemprop' => 'author'
11
+ =link_to comment_likes(comment), like_protip_comment_path(comment.protip.public_id , comment.id), 'data-remote' => 'true', 'data-method' => :post, class: "like #{comment_liked_class(comment)}", rel: "nofollow"
12
+ =link_to('Spam!', mark_as_spam_protip_comment_path(comment.protip.public_id , comment.id), 'data-remote' => 'true', 'data-method' => :post, rel: 'nofollow') if is_moderator?
13
+
14
+ . comment itemprop =:commentText
15
+ = raw sanitize(formatted_comment(comment.body))
16
+ / TODO: Rework the comment editing bar outside of the same element as the commentText
17
+ - if can_edit_comment?(comment)
18
+ . edit-comment .hidden
19
+ = form_for [comment.protip, comment] do |f|
20
+ = f.text_area :comment, label: false, rows: 5
21
+ input type =' submit' value =' Save' class =' button save'
22
+ input type =' button' value =' Cancel' class =' button cancel'
23
+ - if signed_in?
24
+ ul .edit-del .cf
25
+ li .hidden .show-for-user data-user =comment.user.username
26
+ =link_to 'Edit', '#', class: 'edit', onclick: 'return false;'
27
+ li .hidden .show-for-user data-user =comment.user.username
28
+ =link_to 'Delete', protip_comment_path(comment.protip.public_id, comment.id), class: 'delete', 'data-method' => :delete
29
+ li .remove-for-user data-user =comment.user.username
30
+ =link_to 'Reply', '#add-comment', class: 'reply', rel: 'nofollow'
0 commit comments