From ca24be79e3c81a2ba36c0cf04d33a403861af148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Sat, 7 Oct 2017 19:12:17 +0200 Subject: [PATCH 1/4] Moved token message below questions --- app/views/polls/show.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 437328615..5ec66751c 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -39,12 +39,6 @@ <% else %> - <% if poll_voter_token(@poll, current_user).empty? %> - - <% end %> - <% if current_user && !@poll.votable_by?(current_user) %>
<%= t("polls.show.already_voted_in_web") %> @@ -55,6 +49,12 @@ <% @questions.each do |question| %> <%= render 'polls/questions/question', question: question, token: @token %> <% end %> + + <% if poll_voter_token(@poll, current_user).empty? %> + + <% end %>
From 728edf64a516dd2a2a95aefe1405cbeee4d977fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Sat, 7 Oct 2017 19:12:58 +0200 Subject: [PATCH 2/4] Added "participate in other polls" link in poll show --- app/views/polls/show.html.erb | 2 ++ config/locales/en/general.yml | 1 + config/locales/es/general.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 5ec66751c..7d53fcb50 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -55,6 +55,8 @@ <%= t('poll_questions.show.voted_token') %> <% end %> + + <%= link_to t("polls.show.participate_in_other_polls"), polls_path, class: "button" %>pconfig/locales/en/general.yml diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 297ec276a..413a6abf8 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -494,6 +494,7 @@ en: zoom_plus: Expand image read_more: "Read more about %{answer}" read_less: "Read less about %{answer}" + participate_in_other_polls: Participate in other polls poll_questions: create_question: "Create question" default_valid_answers: "Yes, No" diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index da81699d0..b8747406b 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -494,6 +494,7 @@ es: zoom_plus: Ampliar imagen read_more: "Leer más sobre %{answer}" read_less: "Leer menos sobre %{answer}" + participate_in_other_polls: Participar en otras votaciones poll_questions: create_question: "Crear pregunta para votación" default_valid_answers: "Sí, No" From 65f5c9efa94aa337af3a7a6f7f6d444207c0e402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Sat, 7 Oct 2017 19:21:27 +0200 Subject: [PATCH 3/4] Changed token message background color --- app/assets/stylesheets/participation.scss | 6 ++++++ app/views/polls/show.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 605afaee8..d5af311ef 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -335,6 +335,12 @@ word-wrap: break-word; } + .callout.token-message { + background-color: #FFFFFF; + border-color: $info-border; + color: $color-info; + } + .callout.proposal-retired { font-size: $base-font-size; } diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 7d53fcb50..44a5112b6 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -51,12 +51,12 @@ <% end %> <% if poll_voter_token(@poll, current_user).empty? %> - From 316ba37d91c19588ed25dc68ec5b3ceab30f4512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Sat, 7 Oct 2017 20:27:44 +0200 Subject: [PATCH 4/4] Requested changes --- app/assets/stylesheets/participation.scss | 16 +++++++++------- app/views/polls/show.html.erb | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index d5af311ef..5753fb7f5 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -335,14 +335,16 @@ word-wrap: break-word; } - .callout.token-message { - background-color: #FFFFFF; - border-color: $info-border; - color: $color-info; - } + .callout { + &.token-message { + background-color: #fff; + border-color: $info-border; + color: $color-info; + } - .callout.proposal-retired { - font-size: $base-font-size; + &.proposal-retired { + font-size: $base-font-size; + } } .social-share-full .social-share-button { diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 44a5112b6..19daf5e35 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -56,7 +56,7 @@ <% end %> - <%= link_to t("polls.show.participate_in_other_polls"), polls_path, class: "button" %> + <%= link_to t("polls.show.participate_in_other_polls"), polls_path, class: "button hollow" %>