diff --git a/app/views/officing/results/index.html.erb b/app/views/officing/results/index.html.erb index a20a944ca..db839cbeb 100644 --- a/app/views/officing/results/index.html.erb +++ b/app/views/officing/results/index.html.erb @@ -3,26 +3,38 @@ <% if @partial_results.present? %>
-

<%= @booth_assignment.booth.name %> - <%= l @partial_results.first.date, format: :long %>

+

+ <%= @booth_assignment.booth.name %> - <%= l @partial_results.first.date, format: :long %> +

- <% by_question = @partial_results.group_by(&:question_id) %> - <% @poll.questions.each do |question| %> -

<%= question.title %>

+
+
+ <% by_question = @partial_results.group_by(&:question_id) %> + <% @poll.questions.each do |question| %> +

<%= question.title %>

- - - <% question.valid_answers.each_with_index do |answer, i| %> - <% by_answer = by_question[question.id].present? ? by_question[question.id].group_by(&:answer) : {} %> - - - - - <% end %> - -
<%= answer %><%= by_answer[answer].present? ? by_answer[answer].first.amount : 0 %>
+ + + + + + + + + <% question.valid_answers.each_with_index do |answer, i| %> + <% by_answer = by_question[question.id].present? ? by_question[question.id].group_by(&:answer) : {} %> + + + + + <% end %> + +
<%= t("officing.results.index.table_answer") %><%= t("officing.results.index.table_votes") %>
<%= answer %><%= by_answer[answer].present? ? by_answer[answer].first.amount : 0 %>
- <% end %> + <% end %> +
+
<% else %>
<%= t("officing.results.index.no_results") %> diff --git a/config/locales/officing.en.yml b/config/locales/officing.en.yml index d8839bc10..b739e4375 100644 --- a/config/locales/officing.en.yml +++ b/config/locales/officing.en.yml @@ -74,6 +74,8 @@ en: index: no_results: "No results" results: Results + table_answer: Answer + table_votes: Votes residence: flash: create: "Document verified with Census" diff --git a/config/locales/officing.es.yml b/config/locales/officing.es.yml index ccca1b8b3..831ae9a4b 100644 --- a/config/locales/officing.es.yml +++ b/config/locales/officing.es.yml @@ -74,6 +74,8 @@ es: index: no_results: "No hay resultados" results: "Resultados" + table_answer: Respuesta + table_votes: Votos residence: flash: create: "Documento verificado con el PadrĂ³n"