From 1b3cdc181dcda64ef56964c6a2af1907fa74ba6f Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 2 Oct 2017 20:44:28 +0200 Subject: [PATCH 01/10] improves polls show layout --- app/assets/stylesheets/layout.scss | 4 +++ app/assets/stylesheets/participation.scss | 37 ++--------------------- app/views/polls/show.html.erb | 35 ++++++++------------- config/locales/en/general.yml | 3 +- config/locales/es/general.yml | 3 +- 5 files changed, 22 insertions(+), 60 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 44b450779..a0844d6b2 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -303,6 +303,10 @@ a { float: left; } +.back:not([class^="icon-"]) { + text-decoration: underline; +} + .tabs-content { border: 0; } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 8b7390191..21160f7e9 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1549,18 +1549,8 @@ // 08. Polls // ---------------------- -.dark-heading { - background: #2d3e50; - color: #fff; - - .title { - color: #92ba48; - } - - .button { - background: #fff; - color: $brand; - } +.polls-show-header { + background: #fafafa; .callout { @@ -1576,29 +1566,6 @@ color: $color-alert; } } - - .info { - background: #314253; - padding: $line-height; - - @include breakpoint(medium) { - border-top: rem-calc(6) solid #92ba48; - } - } - - a:not(.button) { - color: #fff; - text-decoration: underline; - } - - .back, - .icon-angle-left { - color: #fff; - } - - &.polls-show-header { - min-height: $line-height * 8; - } } .poll, diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 6895397de..04dce1d40 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -1,10 +1,10 @@ <% provide :title do %><%= @poll.name %><% end %>
-
+
- <%= back_link_to polls_path %> + <%= back_link_to polls_path, t("polls.show.back") %>

<%= @poll.name %>

    @@ -12,25 +12,22 @@
  • <%= g.name %>
  • <% end %>
+
- <%= render "callout" %> -
-
-
-

- - <%= t("polls.show.dates_title") %> - -
- <%= poll_dates(@poll) %> -

-
-
+
+ <%= render "callout" %> + <% if @poll.voted_in_booth?(current_user) %>
<%= t("polls.show.already_voted_in_booth") %> @@ -41,13 +38,5 @@ <% end %> <% end %>
- -
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index ff8a77014..5042eedb8 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -482,7 +482,7 @@ en: help_text_2: "To participate in the next vote you have to sign up on %{org} and verify your account. All registered voters in the city over 16 years old can vote. The results of all votes are binding on the government." show: already_voted_in_booth: "You have already participated in a booth for this poll." - dates_title: "Participation dates" + back: Back to voting cant_answer_not_logged_in: "You must %{signin} or %{signup} to participate." signin: Sign in signup: Sign up @@ -607,6 +607,7 @@ en: budget: Participatory budget searcher: Searcher go_to_page: "Go to page of " + share: Share social: blog: "%{org} Blog" facebook: "%{org} Facebook" diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index aaa59a900..e984f6675 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -482,7 +482,7 @@ es: help_text_2: "Para participar en la próxima votación tienes que registrarte en %{org} y verificar tu cuenta. Pueden votar todas las personas empadronadas en la ciudad mayores de 16 años. Los resultados de todas las votaciones serán vinculantes para el gobierno." show: already_voted_in_booth: "Ya has participado en esta votación en una urna." - dates_title: "Fechas de participación" + back: Volver a votaciones cant_answer_not_logged_in: "Necesitas %{signin} o %{signup} para participar." signin: iniciar sesión signup: registrarte @@ -607,6 +607,7 @@ es: budget: Presupuestos participativos searcher: Buscador go_to_page: "Ir a la página de " + share: Compartir social: blog: "Blog de %{org}" facebook: "Facebook de %{org}" From ad08303dfdf8ca445fe6117e5385769d6f44ff25 Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 3 Oct 2017 20:24:10 +0200 Subject: [PATCH 02/10] removes question link on polls index --- app/views/polls/_poll_group.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/polls/_poll_group.html.erb b/app/views/polls/_poll_group.html.erb index 9372aee17..fe12c341b 100644 --- a/app/views/polls/_poll_group.html.erb +++ b/app/views/polls/_poll_group.html.erb @@ -51,7 +51,7 @@ <%= poll_dates(poll) %>
    <% poll.questions.each do |question| %> -
  • <%= link_to question.title, question_path(question) %>
  • +
  • <%= question.title %>
  • <% end %>
<% end %> From 87676f52964ffd744ebf957ae2e7557e7f9b99bf Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 3 Oct 2017 20:45:31 +0200 Subject: [PATCH 03/10] include lorem ipsum content on polls show --- app/assets/stylesheets/participation.scss | 9 ++++++ app/views/polls/show.html.erb | 37 +++++++++++++++++++---- config/locales/en/general.yml | 2 ++ config/locales/es/general.yml | 2 ++ 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 21160f7e9..5be764745 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1568,6 +1568,15 @@ } } +.poll-more-info, +.poll-more-info-answers { + border-top: 1px solid #eee; +} + +.poll-more-info-answers { + background: #fafafa; +} + .poll, .poll-question { border: 1px solid $border; diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 04dce1d40..890e8c56f 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -7,11 +7,19 @@ <%= back_link_to polls_path, t("polls.show.back") %>

<%= @poll.name %>

-
    - <% @poll.geozones.each do |g| %> -
  • <%= g.name %>
  • - <% end %> -
+ + +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat.

+ + + <% if @poll.geozones.any? %> +
    + <% @poll.geozones.each do |g| %> +
  • <%= g.name %>
  • + <% end %> +
+ <% end %>
+ +
+
+ + +
+ + +

Answer 1

+ + + + <%= render "gallery" %> + + + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + +
+
+ + +
From 3edd59c8d61fe5a1200a9e59501e77c9f4cfda3c Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 4 Oct 2017 10:54:59 +0200 Subject: [PATCH 07/10] replaces lorem with poll summary and description --- app/views/polls/show.html.erb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 1d4153356..b3a78e402 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -8,10 +8,7 @@

<%= @poll.name %>

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat.

- + <%= safe_html_with_links simple_format(@poll.summary) %> <% if @poll.geozones.any? %>