diff --git a/app/views/budgets/investments/_comments.html.erb b/app/views/budgets/investments/_comments.html.erb deleted file mode 100644 index bc5ad6540..000000000 --- a/app/views/budgets/investments/_comments.html.erb +++ /dev/null @@ -1,41 +0,0 @@ -<% commentable = comment_tree.commentable %> -<% current_order = comment_tree.order %> - -<% cache [locale_and_user_status, current_order, commentable_cache_key(commentable), comment_tree.comments, comment_tree.comment_authors, commentable.comments_count, comment_flags] do %> -
-
-
- - <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> - - <% if user_signed_in? %> - <% if comments_closed_for_commentable?(commentable) %> -
-
- <%= comments_closed_text(commentable) %> -
- <% elsif require_verified_resident_for_commentable?(commentable, current_user) %> -
-
- <%= t("comments.verified_only", verify_account: link_to(t("comments.verify_account"), verification_path )).html_safe %> -
- <% else %> - <%= render 'comments/form', {commentable: commentable, parent_id: nil, toggeable: false} %> - <% end %> - <% else %> -
-
- <%= t("debates.show.login_to_comment", - signin: link_to(t("votes.signin"), new_user_session_path), - signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> -
- <% end %> - - <% comment_tree.root_comments.each do |comment| %> - <%= render 'comments/comment', {comment: comment, comment_flags: comment_flags} %> - <% end %> - <%= paginate comment_tree.root_comments %> -
-
-
-<% end %> diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb index dede17d66..264e7b102 100644 --- a/app/views/budgets/investments/show.html.erb +++ b/app/views/budgets/investments/show.html.erb @@ -15,6 +15,8 @@ <%= render "budgets/investments/milestones" %>
- <%= render partial: 'budgets/investments/comments', 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: false } %>
diff --git a/app/views/comments/_comment_tree.html.erb b/app/views/comments/_comment_tree.html.erb index c72bd8bcf..45b4aea03 100644 --- a/app/views/comments/_comment_tree.html.erb +++ b/app/views/comments/_comment_tree.html.erb @@ -1,14 +1,15 @@ <% commentable = comment_tree.commentable %> -<% current_order = comment_tree.order %> -<% cache [locale_and_user_status, current_order, commentable_cache_key(commentable), comment_tree.comments, comment_tree.comment_authors, commentable.comments_count, comment_flags] do %> +<% cache [locale_and_user_status, comment_tree.order, commentable_cache_key(commentable), comment_tree.comments, comment_tree.comment_authors, commentable.comments_count, comment_flags] do %>
-

- <%= comment_tree_title_text(commentable) %> - (<%= commentable.comments_count %>) -

+ <% if display_comments_count %> +

+ <%= comment_tree_title_text(commentable) %> + (<%= commentable.comments_count %>) +

+ <% end %> <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> diff --git a/app/views/legislation/annotations/show.html.erb b/app/views/legislation/annotations/show.html.erb index 65ce8e947..1854addb5 100644 --- a/app/views/legislation/annotations/show.html.erb +++ b/app/views/legislation/annotations/show.html.erb @@ -40,7 +40,9 @@
- <%= 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 } %>
diff --git a/app/views/legislation/questions/show.html.erb b/app/views/legislation/questions/show.html.erb index ab1443628..7361ea8f4 100644 --- a/app/views/legislation/questions/show.html.erb +++ b/app/views/legislation/questions/show.html.erb @@ -42,6 +42,7 @@ - <%= 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 } %>