<% provide :title do %><%= @poll.name %><% end %>
<%= render "poll_header" %> <%= render "poll_subnav" %>
<%= render "shared/stats/participation", stats: @stats %>

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

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

<% 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 %>

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

<% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% %i[male female].each do |gender| %> <% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% end %>
<%= t("stats.polls.#{channel}") %>
<%= t("stats.#{gender}") %> <%= "#{@stats[:"total_#{gender}_#{channel}"]} (#{number_to_stats_percentage(@stats[:"#{gender}_#{channel}_percentage"])})" %>

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

<% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% Poll::Stats::CHANNELS.each do |channel| %> <% end %> <% Poll::Stats::CHANNELS.each do |channel| %> <% end %>
<%= t("polls.show.stats.votes") %><%= t("polls.show.stats.#{channel}") %><%= t("polls.show.stats.total") %>
<%= t("polls.show.stats.valid") %> <%= @stats[:"total_#{channel}_valid"] %> (<%= @stats[:"valid_percentage_#{channel}"].round(2) %>%) <%= @stats[:total_valid_votes] %> (<%= @stats[:total_valid_percentage].round(2) %>%)
<%= t("polls.show.stats.white") %> <%= @stats[:"total_#{channel}_white"] %> (<%= @stats[:"white_percentage_#{channel}"].round(2) %>%) <%= @stats[:total_white_votes] %> (<%= @stats[:total_white_percentage].round(2) %>%)
<%= t("polls.show.stats.null_votes") %> <%= @stats[:"total_#{channel}_null"] %> (<%= @stats[:"null_percentage_#{channel}"].round(2) %>%) <%= @stats[:total_null_votes] %> (<%= @stats[:total_null_percentage].round(2) %>%)
<%= t("polls.show.stats.total") %> <%= @stats[:"total_participants_#{channel}"] %> (<%= @stats[:"total_participants_#{channel}_percentage"].round(2) %>%) <%= @stats[:total_participants] %>