From 501d8928ce3722c2b5a2e11445eead0cd8737a7c Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 12:48:23 +0100 Subject: [PATCH 01/21] fixes heading structure --- app/views/spending_proposals/_sidebar.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spending_proposals/_sidebar.html.erb b/app/views/spending_proposals/_sidebar.html.erb index 57d115d8c..fc6878698 100644 --- a/app/views/spending_proposals/_sidebar.html.erb +++ b/app/views/spending_proposals/_sidebar.html.erb @@ -10,6 +10,6 @@ - +
<%= link_to t('spending_proposals.index.sidebar.unfeasible'), spending_proposals_path(unfeasible: '1') %> \ No newline at end of file From 442e5df46177f5987005258009c5c102f5c56516 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 12:49:15 +0100 Subject: [PATCH 02/21] removes unnecessary heading and nav tag on pagination --- app/views/kaminari/_paginator.html.erb | 27 ++++++++++++-------------- config/locales/en.yml | 1 - config/locales/es.yml | 1 - 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb index ee5371ce5..de9e89c93 100644 --- a/app/views/kaminari/_paginator.html.erb +++ b/app/views/kaminari/_paginator.html.erb @@ -1,22 +1,19 @@ <%= paginator.render do -%>
- + <%= next_page_tag unless current_page.last? %> + <%= last_page_tag unless current_page.last? %> +
<% end -%> diff --git a/config/locales/en.yml b/config/locales/en.yml index 40a371652..3ae90565f 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -455,7 +455,6 @@ en: debates: Debates proposals: Proposals budget: Participatory budget - pagination: Pagination searcher: Searcher social: blog: Blog diff --git a/config/locales/es.yml b/config/locales/es.yml index 5312b445b..6ebfc866c 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -455,7 +455,6 @@ es: debates: Debates proposals: Propuestas budget: Presupuestos ciudadanos - pagination: Paginación searcher: Buscador social: blog: Blog From 1968cc97f302b464e0b9b2462c18afff678a51dd Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 13:52:19 +0100 Subject: [PATCH 03/21] improves colours contrast --- app/assets/stylesheets/_settings.scss | 9 +++++---- app/assets/stylesheets/layout.scss | 5 +++++ app/assets/stylesheets/participation.scss | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss index 4149020fa..3821f22c7 100644 --- a/app/assets/stylesheets/_settings.scss +++ b/app/assets/stylesheets/_settings.scss @@ -57,15 +57,15 @@ $brand: #004A83; $dark: darken($brand, 10%); $text: #222222; -$text-medium: #999999; -$text-light: #CCCCCC; +$text-medium: #515151; +$text-light: #BFBFBF; $border: #DEE0E3; -$link: #2895F1; +$link: $brand; $link-hover: darken($link, 20%); -$debates: #008CCF; +$debates: $brand; $like: #7BD2A8; $unlike: #EF8585; @@ -74,6 +74,7 @@ $delete: #F04124; $check: #46DB91; $proposals: #FFA42D; +$proposals-dark: #794500; $budget: #454372; $budget-hover: #7571BF; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 4c447479f..ecfe95612 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -56,6 +56,7 @@ a { } &:focus { + color: $link-hover; outline: 3px solid #ffbf47; } } @@ -258,6 +259,10 @@ a { margin: 0 $line-height/2; } +.pagination .current { + background: $brand; +} + // 02. Header // ---------- diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index c299d59cb..a5e1d7df2 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -528,7 +528,7 @@ } .label-proposal { - color: $proposals; + color: $proposals-dark; } .label-investment-project { @@ -566,7 +566,7 @@ } .icon-proposals { - color: $proposals; + color: $proposals-dark; } .icon-budget { From cca30801cc572ffe10b530ab6cd737cdcb95b4f4 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 13:57:48 +0100 Subject: [PATCH 04/21] updates texts --- app/views/pages/accessibility.html.erb | 2 +- app/views/pages/spending_proposals_info.html.erb | 4 ++-- config/locales/es.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index 8d8d6a34d..a2c2eff30 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -40,7 +40,7 @@ S - Presupuestos ciudadanos + Presupuestos participativos I diff --git a/app/views/pages/spending_proposals_info.html.erb b/app/views/pages/spending_proposals_info.html.erb index 60e947343..41332bb96 100644 --- a/app/views/pages/spending_proposals_info.html.erb +++ b/app/views/pages/spending_proposals_info.html.erb @@ -8,8 +8,8 @@
-

¿Cómo funcionan los presupuestos ciudadanos?

+

¿Cómo funcionan los Presupuestos participativos?

Explicación detallada del proceso

-

Próximamente se podrá encontrar aquí una descripción del proceso de participación ciudadana en los presupuestos.

+

Descripción del proceso de participación ciudadana en los presupuestos.

diff --git a/config/locales/es.yml b/config/locales/es.yml index 6ebfc866c..8d5dfb490 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -212,7 +212,7 @@ es: proposals: Propuestas proposal_ballot: Votaciones see_all: Ver propuestas - spending_proposals: Presupuestos ciudadanos + spending_proposals: Presupuestos participativos legislation: help: alt: Selecciona el texto que quieres comentar y pulsa en el botón con el lápiz. @@ -454,7 +454,7 @@ es: outline: debates: Debates proposals: Propuestas - budget: Presupuestos ciudadanos + budget: Presupuestos participativos searcher: Buscador social: blog: Blog From 85c11ec81f37266c21dc0d2dc3b379cfae56dc7d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 13:58:05 +0100 Subject: [PATCH 05/21] adds title on proposal ballots index --- app/views/proposal_ballots/index.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/proposal_ballots/index.html.erb b/app/views/proposal_ballots/index.html.erb index e05f8514a..fe5bdef70 100644 --- a/app/views/proposal_ballots/index.html.erb +++ b/app/views/proposal_ballots/index.html.erb @@ -1,3 +1,4 @@ +<% provide :title do %><%= t("proposal_ballots.title") %><% end %>
From b865eba1abda3e70a86e65729c56754009a133c8 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 17:12:45 +0100 Subject: [PATCH 06/21] removes links on debates and proposals to unlogged users --- app/views/debates/_votes.html.erb | 50 ++++++++++++++++++++--------- app/views/proposals/_votes.html.erb | 30 ++++++++++------- 2 files changed, 54 insertions(+), 26 deletions(-) diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb index cc59a3f3a..9bc3ca555 100644 --- a/app/views/debates/_votes.html.erb +++ b/app/views/debates/_votes.html.erb @@ -1,23 +1,41 @@ <% voted_classes = css_classes_for_vote(@debate_votes, debate) %>
- <%= link_to vote_debate_path(debate, value: 'yes'), - class: "like #{voted_classes[:in_favor]}", title: t('votes.agree'), method: "post", remote: true do %> - - <%= t('votes.agree') %> - - <%= votes_percentage('likes', debate) %> + <% if user_signed_in? %> + <%= link_to vote_debate_path(debate, value: 'yes'), + class: "like #{voted_classes[:in_favor]}", title: t('votes.agree'), method: "post", remote: true do %> + + <%= t('votes.agree') %> + + <%= votes_percentage('likes', debate) %> + <% end %> + <% else %> + <% end %>
- <%= link_to vote_debate_path(debate, value: 'no'), class: "unlike #{voted_classes[:against]}", title: t('votes.disagree'), method: "post", remote: true do %> - - <%= t('votes.disagree') %> - - <%= votes_percentage('dislikes', debate) %> + <% if user_signed_in? %> + <%= link_to vote_debate_path(debate, value: 'no'), class: "unlike #{voted_classes[:against]}", title: t('votes.disagree'), method: "post", remote: true do %> + + <%= t('votes.disagree') %> + + <%= votes_percentage('dislikes', debate) %> + <% end %> + <% else %> +
+ + <%= t('votes.disagree') %> + + <%= votes_percentage('dislikes', debate) %> +
<% end %>
@@ -39,10 +57,12 @@

<% elsif !user_signed_in? %> - diff --git a/app/views/proposals/_votes.html.erb b/app/views/proposals/_votes.html.erb index 4c2a348ca..e1927ec05 100644 --- a/app/views/proposals/_votes.html.erb +++ b/app/views/proposals/_votes.html.erb @@ -19,12 +19,16 @@
<%= t("proposals.proposal.already_supported") %>
- <% else %> + <% elsif user_signed_in? && proposal.votable_by?(current_user) %> <%= link_to vote_url, class: "button button-support small expanded", title: t('proposals.proposal.support_title'), method: "post", remote: true do %> <%= t("proposals.proposal.support") %> <% end %> + <% else %> +
+ <%= t("proposals.proposal.support") %> +
<% end %>
@@ -34,18 +38,22 @@ <%= t("votes.organizations") %>

-<% elsif user_signed_in? && !proposal.votable_by?(current_user)%> -
diff --git a/app/views/proposals/_votes.html.erb b/app/views/proposals/_votes.html.erb index e1927ec05..fb41357af 100644 --- a/app/views/proposals/_votes.html.erb +++ b/app/views/proposals/_votes.html.erb @@ -1,64 +1,66 @@ -
- - - <%= supports_percentage(proposal) %> / <%= t("proposals.proposal.total_percent") %> - -
+
+
+ + + <%= supports_percentage(proposal) %> / <%= t("proposals.proposal.total_percent") %> + +
- - <%= t("proposals.proposal.supports", count: proposal.total_votes) %>  - - "> - <%= t("proposals.proposal.supports_necessary", number: number_with_delimiter(Proposal.votes_needed_for_success)) %> - + + <%= t("proposals.proposal.supports", count: proposal.total_votes) %>  + + "> + <%= t("proposals.proposal.supports_necessary", number: number_with_delimiter(Proposal.votes_needed_for_success)) %> + + - -
- <% if voted_for?(@proposal_votes, proposal) %> -
- <%= t("proposals.proposal.already_supported") %> -
- <% elsif user_signed_in? && proposal.votable_by?(current_user) %> - <%= link_to vote_url, - class: "button button-support small expanded", - title: t('proposals.proposal.support_title'), method: "post", remote: true do %> - <%= t("proposals.proposal.support") %> +
+ <% if voted_for?(@proposal_votes, proposal) %> +
+ <%= t("proposals.proposal.already_supported") %> +
+ <% elsif user_signed_in? && proposal.votable_by?(current_user) %> + <%= link_to vote_url, + class: "button button-support small expanded", + title: t('proposals.proposal.support_title'), method: "post", remote: true do %> + <%= t("proposals.proposal.support") %> + <% end %> + <% else %> +
+ <%= t("proposals.proposal.support") %> +
<% end %> - <% else %> -
- <%= t("proposals.proposal.support") %> +
+ + <% if user_signed_in? && current_user.organization? %> + + <% elsif user_signed_in? && !proposal.votable_by?(current_user) %> +
+ +
+ <% elsif !user_signed_in? %> +
+ +
+ <% end %> + + <% if voted_for?(@proposal_votes, proposal) && setting['twitter_handle'] %> + <% end %>
- -<% if user_signed_in? && current_user.organization? %> - -<% elsif user_signed_in? && !proposal.votable_by?(current_user) %> -
- -
-<% elsif !user_signed_in? %> -
- -
-<% end %> - -<% if voted_for?(@proposal_votes, proposal) && setting['twitter_handle'] %> - -<% end %> From 82a06220b5eb6544e15523819b38ce731ae6fc21 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 17:31:41 +0100 Subject: [PATCH 08/21] removes link on debates and proposals description --- app/views/debates/_debate.html.erb | 2 +- app/views/proposals/_proposal.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index fdb975c79..d084a0241 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -41,7 +41,7 @@

- <%= link_to debate.description, debate %> + <%= debate.description %>
<%= render "shared/tags", taggable: debate, limit: 5 %> diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index 46e6fd9ba..69bf8d164 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -44,7 +44,7 @@ <% end %>

-

<%= link_to proposal.summary, namespaced_proposal_path(proposal) %>

+

<%= proposal.summary %>

<% end %> From 25e85c5ca29543ccd3d75e1370543b5487444809 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 17:38:20 +0100 Subject: [PATCH 09/21] improves styles on hover & focus for social share buttons --- app/assets/stylesheets/layout.scss | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index ecfe95612..8c4549ffd 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1165,7 +1165,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #40A2D1; } @@ -1205,7 +1205,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #354F88; } @@ -1245,7 +1245,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #CE3E26; } @@ -1289,7 +1289,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #40A2D1; } } @@ -1312,7 +1313,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #354F88; } } @@ -1335,7 +1337,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #CE3E26; } } From 99153cc58968d73d9a1b1cbdabe98912a8b5d0bc Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 17:49:16 +0100 Subject: [PATCH 10/21] adds format info on advanced search custom date --- app/views/shared/_advanced_search.html.erb | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/views/shared/_advanced_search.html.erb b/app/views/shared/_advanced_search.html.erb index e8f06f7bc..00db85b9c 100644 --- a/app/views/shared/_advanced_search.html.erb +++ b/app/views/shared/_advanced_search.html.erb @@ -29,19 +29,21 @@
From 87e7e7e4ea393ff1ca1220a9c4ca157d2ae2c0ae Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 7 Dec 2016 18:16:09 +0100 Subject: [PATCH 11/21] fixes specs --- app/views/proposals/show.html.erb | 22 +++++++++++++--------- spec/support/common_actions.rb | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index 920565d11..ba6cb677f 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -102,17 +102,21 @@