app/cells/decidim/comments/comment/show.erb in decidim-comments-0.26.0.rc2 vs app/cells/decidim/comments/comment/show.erb in decidim-comments-0.26.0
- old
+ new
@@ -1,7 +1,9 @@
<%= content_tag :div, id: "comment_#{model.id}", class: comment_classes, data: { comment_id: model.id } do %>
- <% if model.deleted? %>
+ <% if model.hidden? %>
+ <%= render :moderation_data %>
+ <% elsif model.deleted? %>
<%= render :deletion_data %>
<% else %>
<div class="comment__header">
<div class="author-data">
<div class="author-data__main">
@@ -28,17 +30,17 @@
<%= render :actions %>
<%= votes %>
</div>
<% end %>
<div id="comment-<%= model.id %>-replies">
- <% if has_replies? %>
+ <% if has_replies_in_children? %>
<% replies.each do |reply| %>
<%= cell("decidim/comments/comment", reply, root_depth: root_depth, order: order, reloaded: reloaded?) %>
<% end %>
<% end %>
</div>
<% if can_reply? %>
- <div class="comment__additionalreply<%= " hide" unless has_replies? %>">
+ <div class="comment__additionalreply<%= " hide" unless commentable? %>">
<button class="comment__reply muted-link" aria-controls="<%= reply_id %>" data-toggle="<%= reply_id %>">
<%= icon "pencil", class: "icon--small", role: "img", "aria-hidden": true %> <%= t("decidim.components.comment.reply") %>
</button>
</div>
<div class="add-comment hide" id="<%= reply_id %>" data-toggler=".hide">