<%= link_to t("stats.advanced"), "#advanced_statistics" %>
+diff --git a/app/assets/images/stats_investments.png b/app/assets/images/stats_investments.png new file mode 100644 index 000000000..951dfe393 Binary files /dev/null and b/app/assets/images/stats_investments.png differ diff --git a/app/assets/stylesheets/stats.scss b/app/assets/stylesheets/stats.scss index 9bab1d5c2..34de4361b 100644 --- a/app/assets/stylesheets/stats.scss +++ b/app/assets/stylesheets/stats.scss @@ -40,6 +40,10 @@ content: image-url('stats_woman.png'); } + &.total-investments::before { + content: image-url('stats_investments.png'); + } + &.web::before { content: image-url('stats_web.png'); } diff --git a/app/views/budgets/stats/show.html.erb b/app/views/budgets/stats/show.html.erb index e156d0d9b..6fe5153e3 100644 --- a/app/views/budgets/stats/show.html.erb +++ b/app/views/budgets/stats/show.html.erb @@ -39,197 +39,132 @@ -
- <%= @stats[:total_participants] %> -
+<%= link_to t("stats.advanced"), "#advanced_statistics" %>
+
-
-
- <%= t("budgets.stats.total_selected_investments") %>:
- <%= @stats[:total_selected_investments] %>
-
+
- - <%= t("budgets.stats.total_female_participants").upcase %> - (<%= number_to_stats_percentage(@stats[:female_percentage]) %>) -
-- <%= @stats[:total_female_participants] %> -
-- - <%= t("budgets.stats.total_male_participants").upcase %> - (<%= number_to_stats_percentage(@stats[:male_percentage]) %>) -
-- <%= @stats[:total_male_participants] %> -
-| <%= t("budgets.stats.heading") %> | +<%= t("budgets.stats.investments_sent_html") %> | +<%= t("budgets.stats.participants_support_phase") %> | +<%= t("budgets.stats.participants_voting_phase") %> | +<%= t("budgets.stats.participants_total") %> | +|||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= t("budgets.stats.total") %> | +<%= t("budgets.stats.percent_total_participants_html") %> | +<%= t("budgets.stats.percent_heading_census_html") %> | +<%= t("budgets.stats.total") %> | +<%= t("budgets.stats.percent_total_participants_html") %> | +<%= t("budgets.stats.percent_heading_census_html") %> | +<%= t("budgets.stats.total") %> | +<%= t("budgets.stats.percent_total_participants_html") %> | +<%= t("budgets.stats.percent_heading_census_html") %> | +|||||||||||||||||||||||||
| + <%= heading.name %> + | ++ <%= @stats[:headings][heading.id][:total_investments_count] %> + | -||||||||||||||||||||||||||||||||
| <%= t("budgets.stats.age").upcase %> | -<%= t("budgets.stats.total").upcase %> | -
|---|---|
| <%= group[:range] %> | -
-
- <%= "#{group[:count]} (#{number_to_stats_percentage(group[:percentage])})" %>
-
-
-
-
-
- |
-
| <%= t("budgets.stats.heading") %> | -<%= t("budgets.stats.investments_sent_html") %> | -<%= t("budgets.stats.participants_support_phase") %> | -<%= t("budgets.stats.participants_voting_phase") %> | -<%= t("budgets.stats.participants_total") %> | -||||||
|---|---|---|---|---|---|---|---|---|---|---|
| <%= t("budgets.stats.total") %> | -<%= t("budgets.stats.percent_total_participants_html") %> | -<%= t("budgets.stats.percent_heading_census_html") %> | -<%= t("budgets.stats.total") %> | -<%= t("budgets.stats.percent_total_participants_html") %> | -<%= t("budgets.stats.percent_heading_census_html") %> | -<%= t("budgets.stats.total") %> | -<%= t("budgets.stats.percent_total_participants_html") %> | -<%= t("budgets.stats.percent_heading_census_html") %> | -||
| - <%= heading.name %> - | -- <%= @stats[:headings][heading.id][:total_investments_count] %> - | - - <% ["support", "vote", "all"].each do |phase| %> -- <%= @stats[:headings][heading.id]["total_participants_#{phase}_phase".to_sym] %> - | -- <%= number_to_stats_percentage(@stats[:headings][heading.id]["percentage_participants_#{phase}_phase".to_sym]) %> - | -- <%= number_to_stats_percentage(@stats[:headings][heading.id]["percentage_district_population_#{phase}_phase".to_sym]) %> - | + <% ["support", "vote", "all"].each do |phase| %> ++ <%= @stats[:headings][heading.id]["total_participants_#{phase}_phase".to_sym] %> + | ++ <%= number_to_stats_percentage(@stats[:headings][heading.id]["percentage_participants_#{phase}_phase".to_sym]) %> + | ++ <%= number_to_stats_percentage(@stats[:headings][heading.id]["percentage_district_population_#{phase}_phase".to_sym]) %> + | + <% end %> +|||
- <%= t("budgets.stats.no_demographic_data", total: @stats[:total_unknown_gender_or_age]) %> -
-- <%= t("budgets.stats.participatory_disclaimer") %> -
-- <%= t("budgets.stats.heading_disclaimer") %> -
++ <%= t("budgets.stats.no_demographic_data", total: @stats[:total_unknown_gender_or_age]) %> +
++ <%= t("budgets.stats.participatory_disclaimer") %> +
++ <%= t("budgets.stats.heading_disclaimer") %> +
+