diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index a5d84166e..5de5b6c24 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,5 +1,6 @@ <% comment_flags ||= @comment_flags %> <% valuation = local_assigns.fetch(:valuation, false) %> +<% allow_votes = local_assigns.fetch(:allow_votes, true) %> <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author, (comment_flags[comment.id] if comment_flags)] do %> diff --git a/app/views/comments/_comment_tree.html.erb b/app/views/comments/_comment_tree.html.erb index 436c50904..6b0bdc296 100644 --- a/app/views/comments/_comment_tree.html.erb +++ b/app/views/comments/_comment_tree.html.erb @@ -42,7 +42,8 @@ <% comment_tree.root_comments.each do |comment| %> <%= render 'comments/comment', { comment: comment, comment_flags: comment_flags, - valuation: valuation } %> + valuation: valuation, + allow_votes: !valuation } %> <% end %> <%= paginate comment_tree.root_comments %>