Refactor valuation comments into its own partial

It's going to be used at valuation and admin panels
This commit is contained in:
Bertocq
2018-01-31 16:34:11 +01:00
parent a15e372f7e
commit 528c9be925
6 changed files with 11 additions and 17 deletions

View File

@@ -46,12 +46,3 @@
<strong><%= t("valuation.budget_investments.show.valuation_finished") %></strong>
</p>
<% end %>
<div class="tabs-panel is-active" id="tab-comments">
<% unless @comment_tree.nil? %>
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
comment_flags: @comment_flags,
display_comments_count: false,
valuation: true } %>
<% end %>
</div>

View File

@@ -0,0 +1,7 @@
<h2><%= t("valuation.budget_investments.valuation_comments") %></h2>
<% unless @comment_tree.nil? %>
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
comment_flags: @comment_flags,
display_comments_count: false,
valuation: true } %>
<% end %>

View File

@@ -96,14 +96,7 @@
</div>
<% end %>
<div class="tabs-panel is-active" id="tab-comments">
<% unless @comment_tree.nil? %>
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
comment_flags: @comment_flags,
display_comments_count: false,
valuation: true } %>
<% end %>
</div>
<%= render 'valuation/budget_investments/valuation_comments' %>
<h1><%= @investment.title %></h1>

View File

@@ -52,3 +52,4 @@
</p>
<%= render 'dossier' %>
<%= render 'valuation/budget_investments/valuation_comments' %>

View File

@@ -73,6 +73,7 @@ en:
save: Save changes
notice:
valuate: "Dossier updated"
valuation_comments: Valuation comments
spending_proposals:
index:
geozone_filter_all: All zones

View File

@@ -73,6 +73,7 @@ es:
save: Guardar Cambios
notice:
valuate: "Dossier actualizado"
valuation_comments: Comentarios de evaluación
spending_proposals:
index:
geozone_filter_all: Todos los ámbitos de actuación