Add poll stats by channel
Note we currently don't have a way to get the votes by mail, so that section is always blank.
This commit is contained in:
BIN
app/assets/images/stats_booth.png
Normal file
BIN
app/assets/images/stats_booth.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/assets/images/stats_mail.png
Normal file
BIN
app/assets/images/stats_mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/assets/images/stats_web.png
Normal file
BIN
app/assets/images/stats_web.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -40,6 +40,18 @@
|
|||||||
content: image-url('stats_woman.png');
|
content: image-url('stats_woman.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.web::before {
|
||||||
|
content: image-url('stats_web.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
&.booth::before {
|
||||||
|
content: image-url('stats_booth.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
&.mail::before {
|
||||||
|
content: image-url('stats_mail.png');
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $line-height * 2;
|
margin-right: $line-height * 2;
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
<p><strong><%= link_to t("stats.advanced"), "#advanced_statistics" %></strong></p>
|
<p><strong><%= link_to t("stats.advanced"), "#advanced_statistics" %></strong></p>
|
||||||
<ul class="menu vertical">
|
<ul class="menu vertical">
|
||||||
|
<li>
|
||||||
|
<%= link_to t("stats.polls.by_channel"), "#stats_by_channel" %>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to t("stats.polls.vote_by_channel"), "#vote_stats_by_channel" %>
|
<%= link_to t("stats.polls.vote_by_channel"), "#vote_stats_by_channel" %>
|
||||||
</li>
|
</li>
|
||||||
@@ -23,6 +26,20 @@
|
|||||||
<div id="advanced_statistics">
|
<div id="advanced_statistics">
|
||||||
<h3 class="section-title"><%= t("stats.advanced") %></h3>
|
<h3 class="section-title"><%= t("stats.advanced") %></h3>
|
||||||
|
|
||||||
|
<div id="stats_by_channel" class="stats-group">
|
||||||
|
<h4><%= t("stats.polls.by_channel") %></h4>
|
||||||
|
|
||||||
|
<% Poll::Stats::CHANNELS.each do |channel| %>
|
||||||
|
<%= number_with_info_tags(
|
||||||
|
@stats[:"total_participants_#{channel}"],
|
||||||
|
t("stats.polls.#{channel}_percentage",
|
||||||
|
percentage: number_to_stats_percentage(@stats[:"total_participants_#{channel}_percentage"])
|
||||||
|
),
|
||||||
|
html_class: channel
|
||||||
|
) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="vote_stats_by_channel" class="stats-group">
|
<div id="vote_stats_by_channel" class="stats-group">
|
||||||
<h4><%= t("stats.polls.vote_by_channel") %></h4>
|
<h4><%= t("stats.polls.vote_by_channel") %></h4>
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,8 @@ en:
|
|||||||
geozone: "District"
|
geozone: "District"
|
||||||
geozone_participation: "% District population participation"
|
geozone_participation: "% District population participation"
|
||||||
polls:
|
polls:
|
||||||
|
by_channel: "Participants by channel"
|
||||||
vote_by_channel: "Vote type by channel"
|
vote_by_channel: "Vote type by channel"
|
||||||
|
web_percentage: "%{percentage} Web"
|
||||||
|
booth_percentage: "%{percentage} Booths"
|
||||||
|
mail_percentage: "%{percentage} Mail"
|
||||||
|
|||||||
@@ -15,4 +15,8 @@ es:
|
|||||||
geozone: "Distrito"
|
geozone: "Distrito"
|
||||||
geozone_participation: "% Partipación población del distrito"
|
geozone_participation: "% Partipación población del distrito"
|
||||||
polls:
|
polls:
|
||||||
|
by_channel: "Participación por medio"
|
||||||
vote_by_channel: "Votos emitidos por medio"
|
vote_by_channel: "Votos emitidos por medio"
|
||||||
|
web_percentage: "%{percentage} Web"
|
||||||
|
booth_percentage: "%{percentage} Urnas"
|
||||||
|
mail_percentage: "%{percentage} Correo"
|
||||||
|
|||||||
Reference in New Issue
Block a user