diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index c46d0fd3d..61214eb23 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -77,6 +77,7 @@ body.admin { } &.text-right { + padding-right: $line-height; text-align: right; } @@ -94,9 +95,20 @@ body.admin { } } + &.fixed { + table-layout: fixed; + } + input[type="submit"] ~ a, a ~ a { - margin-left: $line-height/2; - margin-right: $line-height/2; + margin-left: 0; + margin-right: 0; + margin-top: $line-height/2; + + @include breakpoint(medium) { + margin-left: $line-height/2; + margin-right: $line-height/2; + margin-top: 0; + } } } diff --git a/app/views/admin/poll/officer_assignments/index.html.erb b/app/views/admin/poll/officer_assignments/index.html.erb index 1b83ca752..3379e1c3a 100644 --- a/app/views/admin/poll/officer_assignments/index.html.erb +++ b/app/views/admin/poll/officer_assignments/index.html.erb @@ -40,12 +40,12 @@ <% else %>

<%= t("admin.poll_officer_assignments.index.assignments") %>

- +
- + @@ -53,7 +53,7 @@ -
<%= t("admin.poll_officer_assignments.index.date") %> <%= t("admin.poll_officer_assignments.index.booth") %><%= t("admin.poll_officer_assignments.index.assignment") %><%= t("admin.poll_officer_assignments.index.assignment") %>
<%= officer_assignment.final? ? t('polls.final_date') : l(officer_assignment.date.to_date) %> <%= booth_name_with_location(officer_assignment.booth_assignment.booth) %> + <%= link_to t("admin.poll_officer_assignments.index.remove_assignment"), admin_officer_assignment_path(officer_assignment), method: :delete, @@ -68,12 +68,12 @@ <% voting_days_officer_assignments = @officer_assignments.select{|oa| oa.final == false} %> <% if voting_days_officer_assignments.any? %>

<%= t("admin.poll_officer_assignments.index.recounts") %>

- +
- + @@ -81,11 +81,13 @@ - <% if officer_assignment.recount.present? %> - - <% else %> - - <% end %> + <% end %> @@ -95,12 +97,12 @@ <% final_officer_assignments = @officer_assignments.select{|oa| oa.final == true} %> <% if final_officer_assignments.any? %>

<%= t("admin.poll_officer_assignments.index.final_recounts") %>

-
<%= t("admin.poll_officer_assignments.index.date") %> <%= t("admin.poll_officer_assignments.index.booth") %><%= t("admin.poll_officer_assignments.index.recount") %><%= t("admin.poll_officer_assignments.index.recount") %>
<%= l(officer_assignment.date.to_date) %> <%= booth_name_with_location(officer_assignment.booth_assignment.booth) %><%= officer_assignment.recount.count %> - + <% if officer_assignment.recount.present? %> + <%= officer_assignment.recount.count %> + <% else %> + - + <% end %> +
+
- + @@ -108,11 +110,13 @@ - <% if officer_assignment.final_recounts.any? %> - - <% else %> - - <% end %> + <% end %> diff --git a/app/views/admin/poll/polls/_booths.html.erb b/app/views/admin/poll/polls/_booths.html.erb index 6672b72cb..bea23b874 100644 --- a/app/views/admin/poll/polls/_booths.html.erb +++ b/app/views/admin/poll/polls/_booths.html.erb @@ -5,11 +5,11 @@ <%= t("admin.polls.show.no_booths") %> <% else %> -
<%= t("admin.poll_officer_assignments.index.date") %> <%= t("admin.poll_officer_assignments.index.booth") %><%= t("admin.poll_officer_assignments.index.final_recount") %><%= t("admin.poll_officer_assignments.index.final_recount") %>
<%= l(officer_assignment.date.to_date) %> <%= booth_name_with_location(officer_assignment.booth_assignment.booth) %><%= officer_assignment.final_recounts.to_a.sum(&:count) %> - + <% if officer_assignment.final_recounts.any? %> + <%= officer_assignment.final_recounts.to_a.sum(&:count) %> + <% else %> + - + <% end %> +
+
- + <% @poll.booth_assignments.each do |booth_assignment| %> @@ -22,7 +22,7 @@ -
<%= t("admin.polls.show.table_name") %> <%= t("admin.polls.show.table_location") %><%= t("admin.polls.show.table_assignment") %><%= t("admin.polls.show.table_assignment") %>
<%= booth_assignment.booth.location %> + <%= link_to t("admin.polls.show.remove_booth"), admin_booth_assignment_path(booth_assignment), method: :delete, diff --git a/app/views/admin/poll/polls/_officers.html.erb b/app/views/admin/poll/polls/_officers.html.erb index a3c78c656..7acb7568b 100644 --- a/app/views/admin/poll/polls/_officers.html.erb +++ b/app/views/admin/poll/polls/_officers.html.erb @@ -5,10 +5,11 @@ <%= t("admin.polls.show.no_officers") %> <% else %> - +
+ <% @poll.officers.each do |officer| %> @@ -21,6 +22,11 @@ + <% end %> diff --git a/app/views/admin/poll/polls/_poll.html.erb b/app/views/admin/poll/polls/_poll.html.erb index 7cbc0a352..b65ce3e71 100644 --- a/app/views/admin/poll/polls/_poll.html.erb +++ b/app/views/admin/poll/polls/_poll.html.erb @@ -7,7 +7,7 @@ -
<%= t("admin.polls.show.table_name") %> <%= t("admin.polls.show.table_email") %><%= t("admin.actions.actions") %>
<%= officer.email %> + <%= link_to t("admin.polls.show.edit_officer_assignments"), + admin_officer_assignments_path(officer: officer, poll: @poll), + class: "button hollow" %> +
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %> + <%= link_to t("admin.actions.edit"), edit_admin_poll_path(poll), class: "button hollow" %> diff --git a/app/views/admin/poll/polls/_questions.html.erb b/app/views/admin/poll/polls/_questions.html.erb index c4dadba49..e41d2017e 100644 --- a/app/views/admin/poll/polls/_questions.html.erb +++ b/app/views/admin/poll/polls/_questions.html.erb @@ -5,11 +5,11 @@ <%= t('admin.polls.show.no_questions') %> <% else %> - +
- + <% @poll.questions.each do |question| %> @@ -19,7 +19,7 @@ <%= link_to question.title, admin_question_path(question) %> -
<%= t('admin.polls.show.table_title') %><%= t('admin.polls.show.table_assignment') %><%= t('admin.polls.show.table_assignment') %>
+ <%= link_to t('admin.polls.show.remove_question'), remove_question_admin_poll_path(poll_id: @poll.id, question_id: question.id), class: "button hollow alert", diff --git a/app/views/admin/poll/polls/_recounting.html.erb b/app/views/admin/poll/polls/_recounting.html.erb index ed5680936..8fb7651ce 100644 --- a/app/views/admin/poll/polls/_recounting.html.erb +++ b/app/views/admin/poll/polls/_recounting.html.erb @@ -5,7 +5,7 @@ <%= t("admin.polls.show.no_recounts") %> <% else %> - +
@@ -19,16 +19,20 @@ <%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: 'tab-recounts') %> - <% if booth_assignment.recounts.any? %> - - <% else %> - - <% end %> - <% if booth_assignment.final_recounts.any? %> - - <% else %> - - <% end %> + + <% end %> diff --git a/app/views/admin/poll/polls/index.html.erb b/app/views/admin/poll/polls/index.html.erb index 75b52affa..5bd310e54 100644 --- a/app/views/admin/poll/polls/index.html.erb +++ b/app/views/admin/poll/polls/index.html.erb @@ -5,11 +5,11 @@ class: "button success float-right" %> <% if @polls.any? %> -
<%= t("admin.polls.show.table_booth_name") %> <%= t("admin.polls.show.table_recounts") %> <%= booth_assignment.recounts.to_a.sum(&:count) %> - <%= booth_assignment.final_recounts.to_a.sum(&:count) %> - + <% if booth_assignment.recounts.any? %> + <%= booth_assignment.recounts.to_a.sum(&:count) %> + <% else %> + - + <% end %> + + <% if booth_assignment.final_recounts.any? %> + <%= booth_assignment.final_recounts.to_a.sum(&:count) %> + <% else %> + - + <% end %> +
+
- + <%= render @polls %> diff --git a/app/views/admin/poll/questions/_questions.html.erb b/app/views/admin/poll/questions/_questions.html.erb index f8fc13302..c142ad084 100644 --- a/app/views/admin/poll/questions/_questions.html.erb +++ b/app/views/admin/poll/questions/_questions.html.erb @@ -7,16 +7,24 @@ <%= t('admin.questions.index.no_questions') %> <% else %> -
<%= t("admin.polls.index.name") %> <%= t("admin.polls.index.dates") %> <%= t("admin.actions.actions") %>
- <% @questions.each do |question| %> - - - - - <% end %> +
<%= link_to question.title, admin_question_path(question) %> - <%= link_to t('shared.edit'), edit_admin_question_path(question), class: "button hollow" %> - <%= link_to t('shared.delete'), admin_question_path(question), class: "button hollow alert", method: :delete %> -
+ + + + + + + + <% @questions.each do |question| %> + + + + + <% end %> +
<%= t('admin.questions.index.table_question') %><%= t("admin.actions.actions") %>
<%= link_to question.title, admin_question_path(question) %> + <%= link_to t('shared.edit'), edit_admin_question_path(question), class: "button hollow" %> + <%= link_to t('shared.delete'), admin_question_path(question), class: "button hollow alert", method: :delete %> +
<%= paginate @questions %> diff --git a/app/views/admin/poll/questions/_successful_proposals.html.erb b/app/views/admin/poll/questions/_successful_proposals.html.erb index 39d0ea7dc..2b192bccd 100644 --- a/app/views/admin/poll/questions/_successful_proposals.html.erb +++ b/app/views/admin/poll/questions/_successful_proposals.html.erb @@ -1,4 +1,10 @@ - +
+ + + + + + <% @proposals.each do |proposal| %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index e7c3d65d3..4d44a840b 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -2,6 +2,7 @@ en: admin: actions: + actions: Actions confirm: Are you sure? confirm_hide: Confirm hide: Hide @@ -359,6 +360,8 @@ en: questions_tab: "Questions" successful_proposals_tab: "Successful proposals" create_question: "Create question" + table_proposal: "Proposal" + table_question: "Question" edit: title: "Edit Question" new: diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 768ef8d83..2aef70006 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -2,6 +2,7 @@ es: admin: actions: + actions: Acciones confirm: "¿Estás seguro?" confirm_hide: Confirmar hide: Ocultar @@ -359,6 +360,8 @@ es: questions_tab: "Preguntas ciudadanas" successful_proposals_tab: "Propuestas que han superado el umbral" create_question: "Crear pregunta para votación" + table_proposal: "Propuesta" + table_question: "Pregunta" edit: title: "Editar pregunta ciudadana" new:
<%= t('admin.questions.index.table_proposal') %><%= t("admin.actions.actions") %>