Files
grecia/app/views/topics/_comments.html.erb
2019-10-05 14:07:24 +02:00

21 lines
761 B
Plaintext

<% cache [locale_and_user_status, @current_order, commentable_cache_key(@topic), @comment_tree.comments, @comment_tree.comment_authors, @topic.comments_count, @comment_flags] do %>
<div class="row comments">
<div id="comments" class="small-12 column">
<%= render "shared/wide_order_selector", i18n_namespace: "comments" %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
<% if user_signed_in? %>
<%= render "comments/form", { commentable: @topic, parent_id: nil, toggeable: false } %>
<% else %>
<%= render "shared/login_to_comment" %>
<% end %>
</div>
</div>
<% end %>