This is consistent with the component for balloting stats. We're about to change both components, and the changes are easier to follow if they're similar. We're also using consistent names in methods.
56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
<% content_for :head do %>
|
|
<%= javascript_include_tag "stat_graphs", "data-turbolinks-track" => "reload" %>
|
|
<% end %>
|
|
|
|
<%= back_link_to budgets_admin_stats_path %>
|
|
|
|
<h2><%= budget.name %> - <%= t("admin.stats.budget_supporting.title") %></h2>
|
|
|
|
<div class="stats">
|
|
<div class="row stats-numbers">
|
|
<div class="small-12 medium-3 column">
|
|
<p class="featured">
|
|
<%= t("admin.stats.budget_supporting.vote_count") %>
|
|
<br>
|
|
<span id="total_votes_count" class="number">
|
|
<%= vote_count %>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="small-12 medium-6 column end">
|
|
<p>
|
|
<%= t("admin.stats.budget_supporting.participant_count") %>
|
|
<br>
|
|
<span id="total_participants_count" class="number">
|
|
<%= user_count %>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "admin/stats/graph", name: "user_supported_budgets", event: "", count: user_count %>
|
|
|
|
<table class="investment-projects-summary user-count-by-heading">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.stats.budget_supporting.headings") %></th>
|
|
<th><%= t("admin.stats.budget_supporting.users") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% user_count_by_heading.each do |heading, count| %>
|
|
<tr id="<%= dom_id(heading) %>">
|
|
<td class="name">
|
|
<%= heading.name %>
|
|
</td>
|
|
<td class="name">
|
|
<%= number_with_delimiter count %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|