Make comments count display optional using a variable on comments comment_tree partial

This commit is contained in:
Bertocq
2017-06-26 18:52:43 +02:00
parent ce7a67418b
commit 6c386ffd95
3 changed files with 12 additions and 7 deletions

View File

@@ -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" %>