Refactor legislation comments partials
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
$("#comments-box").html("<%= j render('comments_for', annotation: @annotation) %>");
|
||||
$("#comments-box").html("<%= j render('comments_box', annotation: @annotation) %>");
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'comments', commentable: @annotation %>
|
||||
<%= render 'legislation/shared/comments', commentable: @annotation %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<% cache [locale_and_user_status, @current_order, commentable_cache_key(@question), @comment_tree.comments, @comment_tree.comment_authors, @question.comments_count, @comment_flags] do %>
|
||||
<div class="row comments">
|
||||
<div id="comments" class="small-12 column">
|
||||
<h3>
|
||||
<%= t("legislation.questions.show.comments") %>
|
||||
<span class="js-comments-count">(<%= @question.comments_count %>)</span>
|
||||
</h3>
|
||||
|
||||
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
||||
|
||||
<% if user_signed_in? %>
|
||||
<%= render 'comments/form', {commentable: @question, parent_id: nil, toggeable: false} %>
|
||||
<% else %>
|
||||
<br>
|
||||
|
||||
<div data-alert class="callout primary">
|
||||
<%= 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 %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% @comment_tree.root_comments.each do |comment| %>
|
||||
<%= render 'comments/comment', comment: comment %>
|
||||
<% end %>
|
||||
<%= paginate @comment_tree.root_comments %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -49,4 +49,4 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<%= render 'comments' %>
|
||||
<%= render 'legislation/shared/comments', commentable: @question %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="row comments">
|
||||
<div id="comments" class="small-12 column">
|
||||
<h3>
|
||||
<%= t("legislation.annotations.show.comments") %>
|
||||
<%= t("legislation.shared.comments") %>
|
||||
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
||||
</h3>
|
||||
|
||||
@@ -242,7 +242,6 @@ en:
|
||||
other: "%{count} comments"
|
||||
show:
|
||||
title: Comment
|
||||
comments: Comments
|
||||
version_chooser:
|
||||
seeing_version: Commments for version
|
||||
see_text: See text draft
|
||||
@@ -305,7 +304,6 @@ en:
|
||||
debate: Debate
|
||||
show:
|
||||
answer_question: Submit answer
|
||||
comments: Comments
|
||||
next_question: Next question
|
||||
first_question: First question
|
||||
share: Share
|
||||
@@ -322,6 +320,8 @@ en:
|
||||
verified_only: Only verified users can participate, %{verify_account}.
|
||||
verify_account: verify your account
|
||||
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
|
||||
shared:
|
||||
comments: Comments
|
||||
locale: English
|
||||
notifications:
|
||||
index:
|
||||
|
||||
@@ -242,7 +242,6 @@ es:
|
||||
other: "%{count} comentarios"
|
||||
show:
|
||||
title: Comentario
|
||||
comments: Comentarios
|
||||
version_chooser:
|
||||
seeing_version: Comentarios para la versión
|
||||
see_text: Ver borrador del texto
|
||||
@@ -305,7 +304,6 @@ es:
|
||||
debate: Debate
|
||||
show:
|
||||
answer_question: Enviar respuesta
|
||||
comments: Comentarios
|
||||
next_question: Siguiente pregunta
|
||||
first_question: Primera pregunta
|
||||
share: Compartir
|
||||
@@ -322,6 +320,8 @@ es:
|
||||
verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}.
|
||||
verify_account: verifica tu cuenta
|
||||
debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas
|
||||
shared:
|
||||
comments: Comentarios
|
||||
locale: Español
|
||||
notifications:
|
||||
index:
|
||||
|
||||
Reference in New Issue
Block a user