Files
nairobi/app/views/polls/_comments.html.erb
Javi Martín ae41becd3a Use CSS to hide reply forms
We were using inline styles and passing local variables around, while
the rule we were following is very simple: it's only hidden if it's a
form to reply to a comment.
2020-05-12 23:57:57 +02:00

18 lines
685 B
Plaintext

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