Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (21 sloc) 1.04 KB
<div class="row">
<div id="comments" class="col-lg-10 comments">
<% comments = @node.fetch_comments(current_user) %>
<h3><span id="comment-count"><%= comments.length %></span> <%= translation('notes._comments.comments') %></h3>
<div style="margin-bottom: 50px;" id="comments-list">
<% comments.includes(:replied_comments).order('timestamp ASC').each do |comment| %>
<% if comment.cid == @node.comments&.first&.cid %><a id="last" name="last"></a><% end %>
<% if comment.reply_to.nil? %>
<%= render :partial => "notes/comment", :locals => {:comment => comment} %>
<% end %>
<% end %>
</div>
<% if current_user %>
<%= render :partial => "comments/form", :locals => { title: I18n.t('notes._comments.post_comment'), comment: false, placeholder: I18n.t('notes._comments.post_placeholder') } %>
<% else %>
<p><a href="#" data-toggle="modal" data-target="#loginModal">
<%= translation('layout._header.login.login_title') %> </a> to comment.
</p>
<% end %>
</div>
</div>
You can’t perform that action at this time.