Make comments count display optional using a variable on comments comment_tree partial
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
<section class="expanded comments">
|
||||
<div class="row">
|
||||
<div id="comments" class="small-12 column">
|
||||
<h2>
|
||||
<%= comment_tree_title_text(commentable) %>
|
||||
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
||||
</h2>
|
||||
<% if display_comments_count %>
|
||||
<h2>
|
||||
<%= comment_tree_title_text(commentable) %>
|
||||
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
||||
</h2>
|
||||
<% end %>
|
||||
|
||||
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree, comment_flags: @comment_flags } %>
|
||||
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
|
||||
comment_flags: @comment_flags,
|
||||
display_comments_count: true } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree, comment_flags: @comment_flags } %>
|
||||
|
||||
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
|
||||
comment_flags: @comment_flags,
|
||||
display_comments_count: true } %>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user