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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render 'comments', commentable: @annotation %>
|
<%= render 'legislation/shared/comments', commentable: @annotation %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<%= render 'comments' %>
|
<%= render 'legislation/shared/comments', commentable: @question %>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="row comments">
|
<div class="row comments">
|
||||||
<div id="comments" class="small-12 column">
|
<div id="comments" class="small-12 column">
|
||||||
<h3>
|
<h3>
|
||||||
<%= t("legislation.annotations.show.comments") %>
|
<%= t("legislation.shared.comments") %>
|
||||||
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
<span class="js-comments-count">(<%= commentable.comments_count %>)</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -242,7 +242,6 @@ en:
|
|||||||
other: "%{count} comments"
|
other: "%{count} comments"
|
||||||
show:
|
show:
|
||||||
title: Comment
|
title: Comment
|
||||||
comments: Comments
|
|
||||||
version_chooser:
|
version_chooser:
|
||||||
seeing_version: Commments for version
|
seeing_version: Commments for version
|
||||||
see_text: See text draft
|
see_text: See text draft
|
||||||
@@ -305,7 +304,6 @@ en:
|
|||||||
debate: Debate
|
debate: Debate
|
||||||
show:
|
show:
|
||||||
answer_question: Submit answer
|
answer_question: Submit answer
|
||||||
comments: Comments
|
|
||||||
next_question: Next question
|
next_question: Next question
|
||||||
first_question: First question
|
first_question: First question
|
||||||
share: Share
|
share: Share
|
||||||
@@ -322,6 +320,8 @@ en:
|
|||||||
verified_only: Only verified users can participate, %{verify_account}.
|
verified_only: Only verified users can participate, %{verify_account}.
|
||||||
verify_account: verify your account
|
verify_account: verify your account
|
||||||
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
|
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
|
||||||
|
shared:
|
||||||
|
comments: Comments
|
||||||
locale: English
|
locale: English
|
||||||
notifications:
|
notifications:
|
||||||
index:
|
index:
|
||||||
|
|||||||
@@ -242,7 +242,6 @@ es:
|
|||||||
other: "%{count} comentarios"
|
other: "%{count} comentarios"
|
||||||
show:
|
show:
|
||||||
title: Comentario
|
title: Comentario
|
||||||
comments: Comentarios
|
|
||||||
version_chooser:
|
version_chooser:
|
||||||
seeing_version: Comentarios para la versión
|
seeing_version: Comentarios para la versión
|
||||||
see_text: Ver borrador del texto
|
see_text: Ver borrador del texto
|
||||||
@@ -305,7 +304,6 @@ es:
|
|||||||
debate: Debate
|
debate: Debate
|
||||||
show:
|
show:
|
||||||
answer_question: Enviar respuesta
|
answer_question: Enviar respuesta
|
||||||
comments: Comentarios
|
|
||||||
next_question: Siguiente pregunta
|
next_question: Siguiente pregunta
|
||||||
first_question: Primera pregunta
|
first_question: Primera pregunta
|
||||||
share: Compartir
|
share: Compartir
|
||||||
@@ -322,6 +320,8 @@ es:
|
|||||||
verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}.
|
verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}.
|
||||||
verify_account: verifica tu cuenta
|
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
|
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
|
locale: Español
|
||||||
notifications:
|
notifications:
|
||||||
index:
|
index:
|
||||||
|
|||||||
Reference in New Issue
Block a user