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">
|
<section class="expanded comments">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="comments" class="small-12 column">
|
<div id="comments" class="small-12 column">
|
||||||
<h2>
|
<% if display_comments_count %>
|
||||||
<%= comment_tree_title_text(commentable) %>
|
<h2>
|
||||||
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
<%= comment_tree_title_text(commentable) %>
|
||||||
</h2>
|
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
||||||
|
</h2>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,9 @@
|
|||||||
</aside>
|
</aside>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
</aside>
|
</aside>
|
||||||
</div>
|
</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>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user