displays correct admin info for proposals with supports

This commit is contained in:
rgarcia
2016-04-26 17:37:21 +02:00
parent f1a0aa7f7c
commit 8bce72bea3
4 changed files with 77 additions and 16 deletions

View File

@@ -13,19 +13,19 @@
<%= geozone.present? ? geozone.name : t("geozones.none") %>
</td>
<td class="finished-and-feasible-count">
<%= spending_proposal_count_for_geozone("finished_and_feasible", geozone) %>
<%= spending_proposal_count_for_geozone("finished_and_feasible", geozone, second_scope) %>
</td>
<td class="finished-and-unfeasible-count">
<%= spending_proposal_count_for_geozone("finished_and_unfeasible", geozone) %>
<%= spending_proposal_count_for_geozone("finished_and_unfeasible", geozone, second_scope) %>
</td>
<td class="finished-count">
<%= spending_proposal_count_for_geozone("valuation_finished", geozone) %>
<%= spending_proposal_count_for_geozone("valuation_finished", geozone, second_scope) %>
</td>
<td class="in-evaluation-count">
<%= spending_proposal_count_for_geozone("valuating", geozone) %>
<%= spending_proposal_count_for_geozone("valuating", geozone, second_scope) %>
</td>
<td class="total-count">
<%= spending_proposal_count_for_geozone("all", geozone) %>
<%= spending_proposal_count_for_geozone("all", geozone, second_scope) %>
</td>
<td class="total-price text-center">
<%= number_to_currency(price) %>

View File

@@ -4,7 +4,15 @@
<% end %>
<h2><%= t("admin.spending_proposals.summary.title") %></h2>
<%= render 'summary_table', spending_proposals: @spending_proposals %>
<div id="all-proposals">
<%= render 'summary_table',
spending_proposals: @spending_proposals,
second_scope: 'all' %>
</div>
<h2><%= t("admin.spending_proposals.summary.title_proposals_with_supports") %></h2>
<%= render 'summary_table', spending_proposals: @spending_proposals_with_supports %>
<div id="proposals-with-votes">
<h2><%= t("admin.spending_proposals.summary.title_proposals_with_supports") %></h2>
<%= render 'summary_table',
spending_proposals: @spending_proposals_with_supports,
second_scope: 'with_supports' %>
</div>