From a9bb3eba2655d1b89a30f9adcc1322f2ec79e617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 4 Jan 2019 17:19:47 +0100 Subject: [PATCH] Add headings for advanced statistics --- app/views/polls/stats.html.erb | 151 ++++++++++++++++++--------------- config/locales/en/stats.yml | 3 + config/locales/es/stats.yml | 3 + 3 files changed, 89 insertions(+), 68 deletions(-) diff --git a/app/views/polls/stats.html.erb b/app/views/polls/stats.html.erb index f77282b85..db9dfd83d 100644 --- a/app/views/polls/stats.html.erb +++ b/app/views/polls/stats.html.erb @@ -8,79 +8,94 @@
<%= render "shared/stats/participation", stats: @stats %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<%= t("polls.show.stats.votes") %><%= t("polls.show.stats.web") %><%= t("polls.show.stats.booth") %><%= t("polls.show.stats.total") %>
<%= t("polls.show.stats.valid") %> - <%= @stats[:total_web_valid] %> - (<%= @stats[:valid_percentage_web].round(2) %>%) - - <%= @stats[:total_booth_valid] %> - (<%= @stats[:valid_percentage_booth].round(2) %>%) - - <%= @stats[:total_valid_votes] %> - (<%= @stats[:total_valid_percentage].round(2) %>%) -
<%= t("polls.show.stats.white") %> - <%= @stats[:total_web_white] %> - (<%= @stats[:white_percentage_web].round(2) %>%) - - <%= @stats[:total_booth_white] %> - (<%= @stats[:white_percentage_booth].round(2) %>%) - <%= @stats[:total_white_votes] %> - (<%= @stats[:total_white_percentage].round(2) %>%) -
<%= t("polls.show.stats.null_votes") %> - <%= @stats[:total_web_null] %> - (<%= @stats[:null_percentage_web].round(2) %>%) - - <%= @stats[:total_booth_null] %> - (<%= @stats[:null_percentage_booth].round(2) %>%) - - <%= @stats[:total_null_votes] %> - (<%= @stats[:total_null_percentage].round(2) %>%) -
<%= t("polls.show.stats.total") %> - <%= @stats[:total_participants_web] %> - (<%= @stats[:total_participants_web_percentage].round(2) %>%) - - <%= @stats[:total_participants_booth] %> - (<%= @stats[:total_participants_booth_percentage].round(2) %>%) - <%= @stats[:total_participants] %>
+
+

<%= t("stats.advanced") %>

+ +
+

<%= t("stats.polls.vote_by_channel") %>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%= t("polls.show.stats.votes") %><%= t("polls.show.stats.web") %><%= t("polls.show.stats.booth") %><%= t("polls.show.stats.total") %>
<%= t("polls.show.stats.valid") %> + <%= @stats[:total_web_valid] %> + (<%= @stats[:valid_percentage_web].round(2) %>%) + + <%= @stats[:total_booth_valid] %> + (<%= @stats[:valid_percentage_booth].round(2) %>%) + + <%= @stats[:total_valid_votes] %> + (<%= @stats[:total_valid_percentage].round(2) %>%) +
<%= t("polls.show.stats.white") %> + <%= @stats[:total_web_white] %> + (<%= @stats[:white_percentage_web].round(2) %>%) + + <%= @stats[:total_booth_white] %> + (<%= @stats[:white_percentage_booth].round(2) %>%) + <%= @stats[:total_white_votes] %> + (<%= @stats[:total_white_percentage].round(2) %>%) +
<%= t("polls.show.stats.null_votes") %> + <%= @stats[:total_web_null] %> + (<%= @stats[:null_percentage_web].round(2) %>%) + + <%= @stats[:total_booth_null] %> + (<%= @stats[:null_percentage_booth].round(2) %>%) + + <%= @stats[:total_null_votes] %> + (<%= @stats[:total_null_percentage].round(2) %>%) +
<%= t("polls.show.stats.total") %> + <%= @stats[:total_participants_web] %> + (<%= @stats[:total_participants_web_percentage].round(2) %>%) + + <%= @stats[:total_participants_booth] %> + (<%= @stats[:total_participants_booth_percentage].round(2) %>%) + <%= @stats[:total_participants] %>
+
+
diff --git a/config/locales/en/stats.yml b/config/locales/en/stats.yml index 3cb6a3385..0b1915fd3 100644 --- a/config/locales/en/stats.yml +++ b/config/locales/en/stats.yml @@ -1,6 +1,7 @@ en: stats: title: "Participation data" + advanced: "Advanced statistics" total_participants: "Participants" by_gender: "Participants by gender" by_age: "Participants by age" @@ -13,3 +14,5 @@ en: total: "Total" geozone: "District" geozone_participation: "% District population participation" + polls: + vote_by_channel: "Vote type by channel" diff --git a/config/locales/es/stats.yml b/config/locales/es/stats.yml index 2055060bf..f8f76f211 100644 --- a/config/locales/es/stats.yml +++ b/config/locales/es/stats.yml @@ -1,6 +1,7 @@ es: stats: title: "Estadísticas de participación" + advanced: "Estadísticas avanzadas" total_participants: "Participantes" by_gender: "Participación por género" by_age: "Participación por grupos de edad" @@ -13,3 +14,5 @@ es: total: "Total" geozone: "Distrito" geozone_participation: "% Partipación población del distrito" + polls: + vote_by_channel: "Votos emitidos por medio"