-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy path_node_comment.html.erb
26 lines (21 loc) · 1.42 KB
/
_node_comment.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="col-lg-6 note-container-comment">
<div class="note note-pane note-comment" data-index="<%= index %>">
<div class="header-icon">
<% if node.aid == 0 %>
<a href="<% if node.parent.has_power_tag('question') %><%= node.parent.path(:question) %>#answer-0-comment<% else %><%= node.parent.path %>#comments<% end %>"> <i class="fa fa-comment-o"> <%= node.parent.fetch_comments(current_user).count %></i> </a>
<% else %>
<a href="<%= node.parent.path(:question) %>#answer-<%= node.answer.id %>-comment"> <i class="fa fa-comment-o"> </i>
<% end %>
</a>
<a href="/n/<%= node.parent.id %>"><i class="fa fa-link"></i></a>
</div>
<p class="meta">
<a href="/profile/<%= node.author.name %>"><%= node.author.name %></a> <%= node.author.new_contributor %>
<span><%= t('dashboard._node_comment.commented_on') %></span> <% unless node.aid == 0 %> an answer about<% end %> <% if node.parent.has_power_tag('question') %><a href="<%= node.parent.path(:question) %>"><% else %><a href="<%= node.parent.path %>"><% end %><%= node.parent.title %></a>
<%= distance_of_time_in_words(node.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %>
</p>
<%= render partial: 'dashboard/comment_moderate', locals: { comment: node } %>
<p class="body"><%= raw strip_tags(node.body_markdown).truncate(100) %>
</p>
</div>
</div>