adds admin summary page for spending proposals

This commit is contained in:
rgarcia
2016-04-22 15:01:55 +02:00
parent 63c24c15ce
commit de84480788
8 changed files with 39 additions and 1 deletions

View File

@@ -36,6 +36,8 @@
</div>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.spending_proposals.index" %>
<%= link_to t("admin.spending_proposals.index.summary_link"),
summary_admin_spending_proposals_path %>
<h3><%= page_entries_info @spending_proposals %></h3>

View File

@@ -0,0 +1,15 @@
<h2><%= t("admin.spending_proposals.summary.title") %></h2>
<table id="spending_proposals">
<th><%= t("admin.spending_proposals.summary.geozone_name") %></th>
<th><%= t("admin.spending_proposals.summary.count_for_geozone") %></th>
<th><%= t("admin.spending_proposals.summary.cost_for_geozone") %></th>
<% @spending_proposals.each do |geozone, price| %>
<tr id="<%= geozone.present? ? dom_id(geozone) : 'geozone_all_city' %>">
<td class="name"><%= geozone.present? ? geozone.name : t("geozones.none") %></td>
<td class="proposals-count"><%= spending_proposal_count_for_geozone(geozone) %></td>
<td class="total-price"><%= number_to_currency(price) %></td>
</tr>
<% end %>
</table>