From a511480ce22b418f3ead2ce8d3a7e7be6ef78cab Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 12:41:04 +0100 Subject: [PATCH 1/8] improves styles for admin menu --- app/views/admin/_menu.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 09eede256..1b4911412 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -119,16 +119,16 @@ -
  • > +
  • > <%= link_to admin_geozones_path do %> - <%= t('admin.menu.geozones') %> + <%= t('admin.menu.geozones') %> <% end %>
  • <% if feature?(:signature_sheets) %> -
  • > +
  • > <%= link_to admin_signature_sheets_path do %> - <%= t("admin.menu.signature_sheets") %> + <%= t("admin.menu.signature_sheets") %> <% end %>
  • <% end %> From c2b6cda4066bc2c53048158335c8a0ad831f6df2 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 12:49:02 +0100 Subject: [PATCH 2/8] improves styles of search forms --- .../admin/poll/polls/_search_booths.html.erb | 12 +++++------- .../admin/poll/polls/_search_officers.html.erb | 12 +++++------- .../poll/polls/_search_questions.html.erb | 13 ++++++------- app/views/admin/poll/polls/show.html.erb | 18 +++++++++++++++--- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/app/views/admin/poll/polls/_search_booths.html.erb b/app/views/admin/poll/polls/_search_booths.html.erb index 56d9cbb12..e4b038e3a 100644 --- a/app/views/admin/poll/polls/_search_booths.html.erb +++ b/app/views/admin/poll/polls/_search_booths.html.erb @@ -1,11 +1,9 @@ <%= form_tag(search_booths_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %> -
    -
    +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %> +
    <%= submit_tag t("admin.shared.booths_search.button"), class: "button" %>
    diff --git a/app/views/admin/poll/polls/_search_officers.html.erb b/app/views/admin/poll/polls/_search_officers.html.erb index 45ce9bd8f..53d7c1105 100644 --- a/app/views/admin/poll/polls/_search_officers.html.erb +++ b/app/views/admin/poll/polls/_search_officers.html.erb @@ -1,11 +1,9 @@ <%= form_tag(search_officers_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %> -
    -
    +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %> +
    <%= submit_tag t("admin.shared.poll_officers_search.button"), class: "button" %>
    diff --git a/app/views/admin/poll/polls/_search_questions.html.erb b/app/views/admin/poll/polls/_search_questions.html.erb index 0a6123c1b..2f82d82cf 100644 --- a/app/views/admin/poll/polls/_search_questions.html.erb +++ b/app/views/admin/poll/polls/_search_questions.html.erb @@ -1,11 +1,10 @@ <%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %> -
    -
    +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %> + +
    <%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %>
    diff --git a/app/views/admin/poll/polls/show.html.erb b/app/views/admin/poll/polls/show.html.erb index e357bc7f4..5a59cfa9e 100644 --- a/app/views/admin/poll/polls/show.html.erb +++ b/app/views/admin/poll/polls/show.html.erb @@ -11,17 +11,29 @@ <%= render "filter_subnav" %>
    - <%= render "search_questions" %> +
    +
    + <%= render "search_questions" %> +
    +
    <%= render "questions" %>
    - <%= render "search_booths" %> +
    +
    + <%= render "search_booths" %> +
    +
    <%= render "booths" %>
    - <%= render "search_officers" %> +
    +
    + <%= render "search_officers" %> +
    +
    <%= render 'officers' %>
    \ No newline at end of file From 8e3f80628d88549960c927e3a94c89e162572e9d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 12:52:36 +0100 Subject: [PATCH 3/8] improves callout officer not found --- app/views/admin/poll/officers/user_not_found.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/poll/officers/user_not_found.js.erb b/app/views/admin/poll/officers/user_not_found.js.erb index 40b6caac5..a6444dc61 100644 --- a/app/views/admin/poll/officers/user_not_found.js.erb +++ b/app/views/admin/poll/officers/user_not_found.js.erb @@ -1 +1 @@ -$("#search-result").html("
    <%= j t('admin.poll_officers.search.user_not_found') %>
    "); +$("#search-result").html("
    <%= j t('admin.poll_officers.search.user_not_found') %>
    "); From 69ab67a81f85dde62a2d784f53d2c26ee9f0acdb Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 12:53:04 +0100 Subject: [PATCH 4/8] hides table if there are no officers --- app/views/admin/poll/officers/index.html.erb | 74 ++++++++++---------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/app/views/admin/poll/officers/index.html.erb b/app/views/admin/poll/officers/index.html.erb index d6e11682b..fd9619167 100644 --- a/app/views/admin/poll/officers/index.html.erb +++ b/app/views/admin/poll/officers/index.html.erb @@ -12,40 +12,42 @@ <%= page_entries_info @officers, entry_name: t('admin.poll_officers.officer.entry_name') %> - - - - - - - - - <% @officers.each do |officer| %> - - - - - - <% end %> - -
    <%= t('admin.poll_officers.officer.name') %><%= t('admin.poll_officers.officer.email') %>
    - <%= officer.name %> - - <%= officer.email %> - - <% if officer.persisted? %> - <%= link_to t('admin.poll_officers.officer.delete'), - admin_officer_path(officer), - method: :delete, - class: "button hollow alert" - %> - <% else %> - <%= link_to t('admin.poll_officers.officer.add'), - { controller: "admin/poll/officers", action: :create, - user_id: officer.user_id }, - method: :post, - class: "button success" %> - <% end %> -
    +<% if @officers.any? %> + + + + + + + + + <% @officers.each do |officer| %> + + + + + + <% end %> + +
    <%= t('admin.poll_officers.officer.name') %><%= t('admin.poll_officers.officer.email') %>
    + <%= officer.name %> + + <%= officer.email %> + + <% if officer.persisted? %> + <%= link_to t('admin.poll_officers.officer.delete'), + admin_officer_path(officer), + method: :delete, + class: "button hollow alert" + %> + <% else %> + <%= link_to t('admin.poll_officers.officer.add'), + { controller: "admin/poll/officers", action: :create, + user_id: officer.user_id }, + method: :post, + class: "button success" %> + <% end %> +
    -<%= paginate @officers %> + <%= paginate @officers %> +<% end %> \ No newline at end of file From 241ddcb16379352ca5cbede8d3eb31c8b5c33698 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 13:45:36 +0100 Subject: [PATCH 5/8] polish styles for tables, assignments and searches on polls admin --- app/assets/stylesheets/admin.scss | 15 ++++ .../poll/officer_assignments/index.html.erb | 11 ++- app/views/admin/poll/polls/_booths.html.erb | 12 +-- app/views/admin/poll/polls/_officers.html.erb | 2 +- .../admin/poll/polls/_questions.html.erb | 16 +++- .../admin/poll/polls/_search_booths.html.erb | 22 +++--- .../polls/_search_booths_results.html.erb | 76 +++++++++++-------- .../poll/polls/_search_officers.html.erb | 22 +++--- .../polls/_search_officers_results.html.erb | 72 ++++++++++-------- .../poll/polls/_search_questions.html.erb | 22 +++--- .../polls/_search_questions_results.html.erb | 62 +++++++++------ app/views/admin/poll/polls/show.html.erb | 31 +++----- app/views/admin/poll/questions/show.html.erb | 13 ++-- config/locales/admin.en.yml | 18 +++-- config/locales/admin.es.yml | 20 +++-- 15 files changed, 247 insertions(+), 167 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 89bed6d21..8403568a9 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -44,11 +44,22 @@ body.admin { .button { margin-top: 0; + + &.margin-top { + margin-top: $line-height; + } } input[type="text"], textarea { width: 100%; } + + .fieldset { + + select { + height: $line-height*2; + } + } } table { @@ -59,6 +70,10 @@ body.admin { &.text-center { text-align: center; } + + &.text-right { + text-align: right; + } } tr { diff --git a/app/views/admin/poll/officer_assignments/index.html.erb b/app/views/admin/poll/officer_assignments/index.html.erb index 55e879858..81ac5aa61 100644 --- a/app/views/admin/poll/officer_assignments/index.html.erb +++ b/app/views/admin/poll/officer_assignments/index.html.erb @@ -1,4 +1,8 @@ -<%= link_to @poll.name, admin_poll_path(@poll, anchor: 'tab-officers') %> +<%= link_to admin_poll_path(@poll, anchor: 'tab-officers') do %> + + <%= @poll.name %> +<% end %> +

    <%= @officer.name %> - <%= @officer.email %>

    <%= form_tag(admin_officer_assignments_path, {id: "officer_assignment_form"}) do %> @@ -40,7 +44,8 @@ <%= t("admin.poll_officer_assignments.index.date") %> - <%= t("admin.poll_officer_assignments.index.booth") %> + <%= t("admin.poll_officer_assignments.index.booth") %> + <%= t("admin.poll_officer_assignments.index.assignment") %> @@ -48,7 +53,7 @@ <%= 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, diff --git a/app/views/admin/poll/polls/_booths.html.erb b/app/views/admin/poll/polls/_booths.html.erb index e955565fd..dbd5de3e1 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 %> - +
    - - - + + + <% @poll.booths.each do |booth| %> @@ -22,7 +22,7 @@ -
    <%= t("admin.polls.show.name") %><%= t("admin.polls.show.location") %> <%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_location") %><%= t("admin.polls.show.table_assignment") %>
    <%= booth.location %> + <%= link_to t("admin.polls.show.remove_booth"), admin_booth_assignment_path(poll: @poll, booth: booth), method: :delete, @@ -32,4 +32,4 @@ <% end %>
    -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/poll/polls/_officers.html.erb b/app/views/admin/poll/polls/_officers.html.erb index e95d90d24..5f1c1d9c0 100644 --- a/app/views/admin/poll/polls/_officers.html.erb +++ b/app/views/admin/poll/polls/_officers.html.erb @@ -5,7 +5,7 @@ <%= t("admin.polls.show.no_officers") %>
    <% else %> - +
    diff --git a/app/views/admin/poll/polls/_questions.html.erb b/app/views/admin/poll/polls/_questions.html.erb index 8adf3596e..c4dadba49 100644 --- a/app/views/admin/poll/polls/_questions.html.erb +++ b/app/views/admin/poll/polls/_questions.html.erb @@ -5,11 +5,21 @@ <%= t('admin.polls.show.no_questions') %> <% else %> -
    <%= t("admin.polls.show.name") %> <%= t("admin.polls.show.email") %>
    +
    + + + + + + <% @poll.questions.each do |question| %> - - +
    <%= t('admin.polls.show.table_title') %><%= t('admin.polls.show.table_assignment') %>
    <%= link_to question.title, admin_question_path(question) %> + + + <%= link_to question.title, admin_question_path(question) %> + + <%= 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/_search_booths.html.erb b/app/views/admin/poll/polls/_search_booths.html.erb index e4b038e3a..a02c9e6ec 100644 --- a/app/views/admin/poll/polls/_search_booths.html.erb +++ b/app/views/admin/poll/polls/_search_booths.html.erb @@ -1,12 +1,16 @@ -<%= form_tag(search_booths_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %> -
    - <%= submit_tag t("admin.shared.booths_search.button"), class: "button" %> -
    +
    +
    + <%= form_tag(search_booths_admin_poll_path(@poll), method: :get, remote: true) do |f| %> +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %> +
    + <%= submit_tag t("admin.shared.booths_search.button"), class: "button" %> +
    +
    + <% end %>
    -<% end %> +
    diff --git a/app/views/admin/poll/polls/_search_booths_results.html.erb b/app/views/admin/poll/polls/_search_booths_results.html.erb index 3de4ffca6..3768fa222 100644 --- a/app/views/admin/poll/polls/_search_booths_results.html.erb +++ b/app/views/admin/poll/polls/_search_booths_results.html.erb @@ -1,32 +1,44 @@ - - - - - - - - <% @booths.each do |booth| %> - - - - - - <% end %> - -
    <%= @booths.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %>
    - <%= booth.name %> - - <%= booth.location %> - - <% if @poll.booth_ids.include?(booth.id) %> - <%= link_to t("admin.polls.show.remove_booth"), - admin_booth_assignment_path(poll: @poll, booth: booth), - method: :delete, - class: "button hollow alert" %> - <% else %> - <%= link_to t("admin.polls.show.add_booth"), - admin_booth_assignments_path(poll: @poll, booth: booth), - method: :post, - class: "button hollow" %> - <% end %> -
    \ No newline at end of file +<% if @booths.blank? %> +
    + <%= t('admin.polls.show.no_search_results') %> +
    +<% else %> +

    <%= t('admin.polls.show.search_results') %>

    +<% end %> + +<% if @booths.any? %> + + + + + + + + + + <% @booths.each do |booth| %> + + + + + + <% end %> + +
    <%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_location") %><%= t("admin.polls.show.table_assignment") %>
    + <%= booth.name %> + + <%= booth.location %> + + <% if @poll.booth_ids.include?(booth.id) %> + <%= link_to t("admin.polls.show.remove_booth"), + admin_booth_assignment_path(poll: @poll, booth: booth), + method: :delete, + class: "button hollow alert" %> + <% else %> + <%= link_to t("admin.polls.show.add_booth"), + admin_booth_assignments_path(poll: @poll, booth: booth), + method: :post, + class: "button hollow" %> + <% end %> +
    +<% end %> diff --git a/app/views/admin/poll/polls/_search_officers.html.erb b/app/views/admin/poll/polls/_search_officers.html.erb index 53d7c1105..b26c98d0c 100644 --- a/app/views/admin/poll/polls/_search_officers.html.erb +++ b/app/views/admin/poll/polls/_search_officers.html.erb @@ -1,12 +1,16 @@ -<%= form_tag(search_officers_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %> -
    - <%= submit_tag t("admin.shared.poll_officers_search.button"), class: "button" %> -
    +
    +
    + <%= form_tag(search_officers_admin_poll_path(@poll), method: :get, remote: true) do |f| %> +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %> +
    + <%= submit_tag t("admin.shared.poll_officers_search.button"), class: "button" %> +
    +
    + <% end %>
    -<% end %> +
    diff --git a/app/views/admin/poll/polls/_search_officers_results.html.erb b/app/views/admin/poll/polls/_search_officers_results.html.erb index 6225ad9c5..818a7fa8d 100644 --- a/app/views/admin/poll/polls/_search_officers_results.html.erb +++ b/app/views/admin/poll/polls/_search_officers_results.html.erb @@ -1,30 +1,42 @@ - - - - - - - - <% @officers.each do |user| %> - - - - - - <% end %> - -
    <%= @officers.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %>
    - <%= user.name %> - - <%= user.email %> - - <% if @poll.officer_ids.include?(user.poll_officer.id) %> - <%= link_to t("admin.polls.show.edit_officer_assignments"), - admin_officer_assignments_path(poll: @poll, officer: user.poll_officer), - class: "button hollow alert" %> - <% else %> - <%= link_to t("admin.polls.show.add_officer_assignments"), - admin_officer_assignments_path(poll: @poll, officer: user.poll_officer), - class: "button hollow" %> - <% end %> -
    \ No newline at end of file +<% if @officers.blank? %> +
    + <%= t('admin.polls.show.no_search_results') %> +
    +<% else %> +

    <%= t('admin.polls.show.search_results') %>

    +<% end %> + +<% if @officers.any? %> + + + + + + + + + + <% @officers.each do |user| %> + + + + + + <% end %> + +
    <%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_email") %><%= t("admin.polls.show.table_assignment") %>
    + <%= user.name %> + + <%= user.email %> + + <% if @poll.officer_ids.include?(user.poll_officer.id) %> + <%= link_to t("admin.polls.show.edit_officer_assignments"), + admin_officer_assignments_path(poll: @poll, officer: user.poll_officer), + class: "button hollow alert" %> + <% else %> + <%= link_to t("admin.polls.show.add_officer_assignments"), + admin_officer_assignments_path(poll: @poll, officer: user.poll_officer), + class: "button hollow" %> + <% end %> +
    +<% end %> diff --git a/app/views/admin/poll/polls/_search_questions.html.erb b/app/views/admin/poll/polls/_search_questions.html.erb index 2f82d82cf..659cdcd37 100644 --- a/app/views/admin/poll/polls/_search_questions.html.erb +++ b/app/views/admin/poll/polls/_search_questions.html.erb @@ -1,13 +1,17 @@ -<%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
    - <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %> +
    +
    + <%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %> +
    + <%= text_field_tag :search, + @search, + placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %> -
    - <%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %> -
    +
    + <%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %> +
    +
    + <% end %>
    -<% end %> +
    diff --git a/app/views/admin/poll/polls/_search_questions_results.html.erb b/app/views/admin/poll/polls/_search_questions_results.html.erb index e7012edd3..27dcbb652 100644 --- a/app/views/admin/poll/polls/_search_questions_results.html.erb +++ b/app/views/admin/poll/polls/_search_questions_results.html.erb @@ -1,25 +1,37 @@ - - - - - - - - <% @questions.each do |question| %> - - - - - - <% end %> - -
    <%= @questions.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %>
    - <%= question.title %> - - <%= question.summary %> - - <%= link_to t("admin.polls.show.add_question"), - add_question_admin_poll_path(poll_id: @poll.id, question_id: question.id), - method: :patch, - class: "button hollow" %> -
    \ No newline at end of file +<% if @questions.blank? %> +
    + <%= t('admin.polls.show.no_search_results') %> +
    +<% else %> +

    <%= t('admin.polls.show.search_results') %>

    +<% end %> + +<% if @questions.any? %> + + + + + + + + + + <% @questions.each do |question| %> + + + + + + <% end %> + +
    <%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_summary") %><%= t("admin.polls.show.table_assignment") %>
    + <%= question.title %> + + <%= question.summary %> + + <%= link_to t("admin.polls.show.add_question"), + add_question_admin_poll_path(poll_id: @poll.id, question_id: question.id), + method: :patch, + class: "button hollow" %> +
    +<% end %> diff --git a/app/views/admin/poll/polls/show.html.erb b/app/views/admin/poll/polls/show.html.erb index 5a59cfa9e..fdc00b949 100644 --- a/app/views/admin/poll/polls/show.html.erb +++ b/app/views/admin/poll/polls/show.html.erb @@ -1,39 +1,30 @@ -

    - <%= @poll.name %> - <%= 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 float-right" %> +

    + <%= @poll.name %> +

    +
    +

    + (<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>) +

    +
    <%= render "filter_subnav" %>
    -
    -
    - <%= render "search_questions" %> -
    -
    + <%= render "search_questions" %> <%= render "questions" %>
    -
    -
    - <%= render "search_booths" %> -
    -
    + <%= render "search_booths" %> <%= render "booths" %>
    -
    -
    - <%= render "search_officers" %> -
    -
    + <%= render "search_officers" %> <%= render 'officers' %>
    \ No newline at end of file diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 1bf130359..91bf398af 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -7,14 +7,17 @@
    - <% if @question.proposal.present? %> - <%= t("admin.questions.show.proposal") %> - <%= link_to @question.proposal.title, proposal_path(@question.proposal) %> - <% end %> - <%= t("admin.questions.show.title") %>

    <%= @question.title %>

    + <% if @question.proposal.present? %> +

    + <%= t("admin.questions.show.proposal") %> +
    + <%= link_to @question.proposal.title, proposal_path(@question.proposal) %> +

    + <% end %> +

    <%= t("admin.questions.show.author") %>
    diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 42613832b..310a9142e 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -173,12 +173,13 @@ en: new_assignment: "New shift" date: "Date" booth: "Booth" + assignment: "Assignment" select_date: "Select day" select_booth: "Select booth" add_assignment: "Add shift" remove_assignment: "Remove" assignments: "Officing shifts in this poll" - no_assignments: "This user has no officing shifts in this poll" + no_assignments: "This user has no officing shifts in this poll." polls: index: title: "List of polls" @@ -200,8 +201,8 @@ en: questions_tab: Questions booths_tab: Booths officers_tab: Officers - no_booths: "There are no booths in this poll." - no_questions: "There are no questions assigned to this poll yet." + no_booths: "There are no booths assigned to this poll." + no_questions: "There are no questions assigned to this poll." no_officers: "There are no officers assigned to this poll." remove_booth: "Remove booth from poll" booths_title: "List of booths" @@ -212,11 +213,14 @@ en: add_question: "Include question" add_officer_assignments: "Add shifts as officer" edit_officer_assignments: "Edit officing shifts" - name: "Name" - location: "Location" - email: "Email" search_results: "Search results" - no_search_results: "No results found" + no_search_results: "No results found." + table_title: "Title" + table_summary: "Summary" + table_assignment: "Assignment" + table_name: "Name" + table_location: "Location" + table_email: "Email" flash: question_added: "Question added to this poll" error_on_question_added: "Question could not be assigned to this poll" diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 6394c6daa..a461d165e 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -173,12 +173,13 @@ es: new_assignment: "Nuevo turno" date: "Fecha" booth: "Urna" + assignment: "Asignación" select_date: "Seleccionar día" select_booth: "Seleccionar urna" add_assignment: "Añadir turno" remove_assignment: "Eliminar turno" assignments: "Turnos como presidente de mesa en esta votación" - no_assignments: "No tiene turnos como presidente de mesa en esta votación" + no_assignments: "No tiene turnos como presidente de mesa en esta votación." polls: index: title: "Listado de votaciones" @@ -200,9 +201,9 @@ es: questions_tab: Preguntas booths_tab: Urnas officers_tab: Presidentes de mesa - no_booths: "No hay urnas en esta votación." - no_questions: "No hay preguntas asignadas a esta votación todavía." - no_officers: "No hay presidentes de mesa asignados." + no_booths: "No hay urnas asignadas a esta votación." + no_questions: "No hay preguntas asignadas a esta votación." + no_officers: "No hay presidentes de mesa asignados a esta votación." remove_booth: "Desasignar urna" booths_title: "Listado de urnas asignadas" officers_title: "Listado de presidentes de mesa asignados" @@ -212,11 +213,14 @@ es: add_question: "Incluir pregunta" add_officer_assignments: "Añadir turnos como presidente de mesa" edit_officer_assignments: "Editar turnos" - name: "Nombre" - location: "Ubicación" - email: "Email" search_results: "Resultados de la búsqueda" - no_search_results: "No se han encontrado resultados" + no_search_results: "No se han encontrado resultados." + table_title: "Título" + table_summary: "Resumen" + table_assignment: "Asignación" + table_name: "Nombre" + table_location: "Ubicación" + table_email: "Email" flash: question_added: "Pregunta añadida a esta votación" error_on_question_added: "No se pudo asignar la pregunta" From f08cbed08034313064711bfbbafb0e18bfd74524 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 13:48:39 +0100 Subject: [PATCH 6/8] adds missing i18n --- app/views/admin/poll/polls/_officers.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/poll/polls/_officers.html.erb b/app/views/admin/poll/polls/_officers.html.erb index 5f1c1d9c0..a3c78c656 100644 --- a/app/views/admin/poll/polls/_officers.html.erb +++ b/app/views/admin/poll/polls/_officers.html.erb @@ -7,8 +7,8 @@ <% else %> - - + + <% @poll.officers.each do |officer| %> From 5c6dfefe0cdae9dc6c4efbdf51a5e8e5c4f57cd9 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 13:56:01 +0100 Subject: [PATCH 7/8] changes color of back link on dark heading --- app/assets/stylesheets/participation.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index a375df091..46332b20e 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -961,7 +961,10 @@ color: white; text-decoration: underline; } + } + .back, .icon-angle-left { + color: white; } &.poll-show { From 4ab9a417fb45ea49287f1413aac89b665d37b497 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 28 Dec 2016 14:04:28 +0100 Subject: [PATCH 8/8] updates specs --- spec/features/admin/poll/booth_assigments_spec.rb | 8 ++++---- spec/features/admin/poll/officers_spec.rb | 4 +--- spec/features/admin/poll/polls_spec.rb | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/spec/features/admin/poll/booth_assigments_spec.rb b/spec/features/admin/poll/booth_assigments_spec.rb index ba7f3445a..3f21e0089 100644 --- a/spec/features/admin/poll/booth_assigments_spec.rb +++ b/spec/features/admin/poll/booth_assigments_spec.rb @@ -16,7 +16,7 @@ feature 'Admin booths assignments' do click_link 'Booths (0)' end - expect(page).to have_content 'There are no booths in this poll' + expect(page).to have_content 'There are no booths assigned to this poll.' fill_in 'search-booths', with: booth.name click_button 'Search' @@ -32,7 +32,7 @@ feature 'Admin booths assignments' do click_link 'Booths (1)' end - expect(page).to_not have_content 'There are no booths in this poll' + expect(page).to_not have_content 'There are no booths assigned to this poll.' expect(page).to have_content booth.name end @@ -46,7 +46,7 @@ feature 'Admin booths assignments' do click_link 'Booths (1)' end - expect(page).to_not have_content 'There are no booths in this poll' + expect(page).to_not have_content 'There are no booths assigned to this poll.' expect(page).to have_content booth.name within("#booth_#{booth.id}") do @@ -60,7 +60,7 @@ feature 'Admin booths assignments' do click_link 'Booths (0)' end - expect(page).to have_content 'There are no booths in this poll' + expect(page).to have_content 'There are no booths assigned to this poll.' expect(page).to_not have_content booth.name end end \ No newline at end of file diff --git a/spec/features/admin/poll/officers_spec.rb b/spec/features/admin/poll/officers_spec.rb index 5eac71744..d9ea89638 100644 --- a/spec/features/admin/poll/officers_spec.rb +++ b/spec/features/admin/poll/officers_spec.rb @@ -30,9 +30,7 @@ feature 'Admin poll officers' do scenario 'Delete' do click_link 'Delete position' - within("#officers") do - expect(page).to_not have_content @officer.name - end + expect(page).to_not have_css '#officers' end end \ No newline at end of file diff --git a/spec/features/admin/poll/polls_spec.rb b/spec/features/admin/poll/polls_spec.rb index 31d7f6128..6f4f60a3d 100644 --- a/spec/features/admin/poll/polls_spec.rb +++ b/spec/features/admin/poll/polls_spec.rb @@ -103,7 +103,7 @@ feature 'Admin polls' do visit admin_poll_path(poll) click_link "Booths (0)" - expect(page).to have_content "There are no booths in this poll." + expect(page).to have_content "There are no booths assigned to this poll." end scenario "Booth list", :js do @@ -122,7 +122,7 @@ feature 'Admin polls' do expect(page).to have_content booth.location end end - expect(page).to_not have_content "There are no booths" + expect(page).to_not have_content "There are no booths assigned to this poll." end end end
    <%= t("admin.polls.show.name") %><%= t("admin.polls.show.email") %><%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_email") %>