|
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} |
| 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 | 7 | .comment-avatar
|
8 |
| - =image_tag(users_image_path(comment.user), :class => 'avatar') |
9 |
| - %a.comment-user{:href => profile_path(comment.user.username), 'data-reply-to' => comment.user.username} |
| 8 | + = image_tag(users_image_path(comment.user), class: 'avatar') |
| 9 | + %a.comment-user{href: profile_path(comment.user.username), 'data-reply-to' => comment.user.username, itemprop: 'creator'} |
10 | 10 | = comment.user.username
|
11 |
| - %a.like{:href =>like_protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-remote' => 'true', 'data-method' => :post, :class => comment_liked_class(comment), :rel => "nofollow"} |
12 |
| - =comment_likes(comment) |
13 |
| - .comment{:itemprop => :commentText} |
14 |
| - =raw sanitize(formatted_comment(comment.body)) |
| 11 | + %a.like{href:like_protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-remote' => 'true', 'data-method' => :post, class: comment_liked_class(comment), rel: "nofollow"} |
| 12 | + = comment_likes(comment) |
| 13 | + .comment{itemprop: :commentText} |
| 14 | + = raw sanitize(formatted_comment(comment.body)) |
15 | 15 | - if can_edit_comment?(comment)
|
16 | 16 | .edit-comment.hidden
|
17 |
| - =form_for [comment.commentable, comment] do |f| |
18 |
| - =f.text_area :comment, :label => false, :rows => 5 |
19 |
| - %input{:type => "submit", :value => "Save", :class => "button save"} |
20 |
| - %input{:type => "button", :value => "Cancel", :class => "button cancel"} |
| 17 | + = form_for [comment.commentable, comment] do |f| |
| 18 | + = f.text_area :comment, label: false, rows: 5 |
| 19 | + %input{type: 'submit', value: 'Save', class: 'button save'} |
| 20 | + %input{type: 'button', value: 'Cancel', class: 'button cancel'} |
21 | 21 | %ul.edit-del.cf
|
22 | 22 | - if signed_in?
|
23 |
| - %li.hidden.show-for-user{"data-user" => comment.user.username} |
24 |
| - %a.edit{:href => '#', :onclick => 'return false;'} |
| 23 | + %li.hidden.show-for-user{'data-user' => comment.user.username} |
| 24 | + %a.edit{href: '#', onclick: 'return false;'} |
25 | 25 | Edit
|
26 |
| - %li.hidden.show-for-user{"data-user" => comment.user.username} |
27 |
| - %a.delete{:href => protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-method' => :delete} |
| 26 | + %li.hidden.show-for-user{'data-user' => comment.user.username} |
| 27 | + %a.delete{href: protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-method' => :delete} |
28 | 28 | Delete
|
29 |
| - %li.remove-for-user{"data-user" => comment.user.username} |
30 |
| - %a.reply{:href => "#add-comment", :rel => "nofollow"} |
| 29 | + %li.remove-for-user{'data-user' => comment.user.username} |
| 30 | + %a.reply{href: '#add-comment', rel: 'nofollow'} |
31 | 31 | Reply
|
0 commit comments