From 9e582245d367f1cafdb1b0e0498fac2742b892a8 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 10 Mar 2017 12:04:47 +0100 Subject: [PATCH 01/15] avoids use tabindex attribute --- app/views/devise/sessions/new.html.erb | 10 ++++------ app/views/users/registrations/new.html.erb | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index ad375e772..910135853 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -11,18 +11,18 @@ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
- <%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label"), tabindex: "1" %> + <%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label") %>
- <%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name), class: "float-right", tabindex: "3" %> - <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label"), tabindex: "2" %> + <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label") %> + <%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name), class: "float-right" %>
<% if devise_mapping.rememberable? -%>
<%= f.label :remember_me do %> - <%= f.check_box :remember_me, title: t('devise_views.sessions.new.remember_me'), label: false, tabindex: "4" %> + <%= f.check_box :remember_me, title: t('devise_views.sessions.new.remember_me'), label: false %> <%= t("devise_views.sessions.new.remember_me") %> <% end %>
@@ -35,5 +35,3 @@ <% end %> <%= render "devise/shared/links" %> - - diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 1c6f81455..3ae3156f7 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -19,7 +19,7 @@ <%= f.label :username %>

<%= t("devise_views.users.registrations.new.username_note") %>

- <%= f.text_field :username, maxlength: User.username_max_length, placeholder: t("devise_views.users.registrations.new.username_label"), label: false %> + <%= f.text_field :username, autofocus: true, maxlength: User.username_max_length, placeholder: t("devise_views.users.registrations.new.username_label"), label: false %> <%= f.invisible_captcha :family_name %> From a7b9f830164b4e1e12b6fb8a33a15665ba81af9d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 10 Mar 2017 12:06:33 +0100 Subject: [PATCH 02/15] fixes contrast color on form social buttons --- app/assets/stylesheets/layout.scss | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 1511910b1..baa6853d2 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1167,6 +1167,9 @@ table { .button.button-twitter, .button.button-facebook, .button.button-google { + background: white; + color: $text; + font-weight: bold; height: $line-height*2; line-height: $line-height*2; padding: 0; @@ -1174,9 +1177,11 @@ table { } .button.button-twitter { - background: #45B0E3; + background: #ECF7FC; + border-left: 3px solid #45B0E3; &:before { + color: #45B0E3; content: "f"; font-family: "icons" !important; font-size: rem-calc(24); @@ -1214,9 +1219,11 @@ table { } .button.button-facebook { - background: #3B5998; + background: #EBEEF4; + border-left: 3px solid #3B5998; &:before { + color: #3B5998; content: "A"; font-family: "icons" !important; font-size: rem-calc(24); @@ -1254,9 +1261,11 @@ table { } .button.button-google { - background: #DE4C34; + background: #FCEDEA; + border-left: 3px solid #DE4C34; &:before { + color: #DE4C34; content: "B"; font-family: "icons" !important; font-size: rem-calc(24); From f3da84bc20c9602441ac395d1b6446d418e10aff Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 10 Mar 2017 12:55:56 +0100 Subject: [PATCH 03/15] improves colors contrast --- app/assets/stylesheets/layout.scss | 5 +++-- app/assets/stylesheets/participation.scss | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 1511910b1..e6d7dc5a2 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1104,11 +1104,12 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar { // -------------------- [class^="level-"] { - color: white; + color: black; } .is-author { - background: #008CCF; + background: #00A5F1; + color: black; } .is-association { diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index c72b981c7..235b58291 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -455,7 +455,7 @@ } .bullet { - color: $border; + color: $text; } .investment-project-show p, .budget-investment-show p { From 11e5dee9a3bf639150d18fef50f37452561a1ca3 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 10 Mar 2017 12:57:40 +0100 Subject: [PATCH 04/15] removes placeholder on input date --- app/views/shared/_advanced_search.html.erb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/shared/_advanced_search.html.erb b/app/views/shared/_advanced_search.html.erb index 7ce6108b4..56157c4a7 100644 --- a/app/views/shared/_advanced_search.html.erb +++ b/app/views/shared/_advanced_search.html.erb @@ -37,7 +37,6 @@ <%= text_field_tag 'advanced_search[date_min]', params[:advanced_search].try(:[], :date_min), type: "date", - placeholder: t("shared.advanced_search.date_placeholder"), class: 'js-calendar' %>
@@ -47,7 +46,6 @@ <%= text_field_tag 'advanced_search[date_max]', params[:advanced_search].try(:[], :date_max), type: "date", - placeholder: t("shared.advanced_search.date_placeholder"), class: 'js-calendar' %>
From c6617e5c4af9092676880d47075be403ec7ee04c Mon Sep 17 00:00:00 2001 From: rgarcia Date: Mon, 13 Mar 2017 11:57:58 +0100 Subject: [PATCH 05/15] updates minor gem versions --- Gemfile | 38 +++++++-------- Gemfile.lock | 128 +++++++++++++++++++++++++++------------------------ 2 files changed, 86 insertions(+), 80 deletions(-) diff --git a/Gemfile b/Gemfile index 13a0b3567..81b87806d 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'pg', '~> 0.19.0' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0', '>= 5.0.4' # Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 3.0.4' +gem 'uglifier', '~> 3.1.6' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2.1' # See https://github.com/rails/execjs#readme for more supported runtimes @@ -40,11 +40,11 @@ gem 'foundation_rails_helper', '~> 2.0.0' gem 'acts_as_votable' gem 'ckeditor', '~> 4.2.2' gem 'invisible_captcha', '~> 0.9.2' -gem 'cancancan' +gem 'cancancan', '~> 1.16.0' gem 'social-share-button' gem 'initialjs-rails', '0.2.0.4' gem 'unicorn', '~> 5.2.0' -gem 'paranoia', '~> 2.2.0' +gem 'paranoia', '~> 2.2.1' gem 'rinku', '~> 2.0.2', require: 'rails_rinku' gem 'savon' gem 'dalli' @@ -52,18 +52,18 @@ gem 'rollbar', '~> 2.14.0' gem 'delayed_job_active_record', '~> 4.1.0' gem 'daemons' gem 'devise-async' -gem 'newrelic_rpm', '~> 3.17.2.327' +gem 'newrelic_rpm', '~> 3.18.1.330' gem 'whenever', require: false gem 'pg_search' -gem 'sitemap_generator' +gem 'sitemap_generator', '~> 5.3.1' gem 'ahoy_matey', '~> 1.5.3' -gem 'groupdate', '~> 3.1.0' # group temporary data +gem 'groupdate', '~> 3.2.0' # group temporary data gem 'tolk', '~> 2.0.0' # Web interface for translations gem 'browser' gem 'turnout', '~> 2.4.0' -gem 'redcarpet' +gem 'redcarpet', '~> 3.4.0' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console @@ -72,28 +72,28 @@ group :development, :test do gem 'spring' gem 'spring-commands-rspec' gem 'rspec-rails', '~> 3.5' - gem 'capybara' - gem 'factory_girl_rails' + gem 'capybara', '~> 2.12.1' + gem 'factory_girl_rails', '~> 4.8.0' gem 'fuubar' gem 'launchy' gem 'quiet_assets' - gem 'letter_opener_web', '~> 1.3.0' - gem 'i18n-tasks' - gem 'capistrano', '3.5.0', require: false + gem 'letter_opener_web', '~> 1.3.1' + gem 'i18n-tasks', '~> 0.9.12' + gem 'capistrano', '~> 3.7.2', require: false gem 'capistrano-bundler', '~> 1.2', require: false - gem "capistrano-rails", '1.1.8', require: false + gem "capistrano-rails", '~> 1.2.3', require: false gem 'rvm1-capistrano3', require: false - gem 'capistrano3-delayed-job', '~> 1.0' - gem "bullet" - gem "faker" - gem 'rubocop', '~> 0.45.0', require: false + gem 'capistrano3-delayed-job', '~> 1.7.3' + gem "bullet", '~> 5.5.1' + gem "faker", '~> 1.7.3' + gem 'rubocop', '~> 0.47.1', require: false gem 'knapsack' end group :test do gem 'database_cleaner' - gem 'poltergeist' - gem 'coveralls', require: false + gem 'poltergeist', '~> 1.13.0' + gem 'coveralls', '~> 0.8.19', require: false gem 'email_spec' end diff --git a/Gemfile.lock b/Gemfile.lock index e2c21605c..f8e67edab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,8 +39,9 @@ GEM acts-as-taggable-on (3.5.0) activerecord (>= 3.2, < 5) acts_as_votable (0.10.0) - addressable (2.4.0) - ahoy_matey (1.5.3) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + ahoy_matey (1.5.4) addressable browser (~> 2.0) geocoder @@ -51,14 +52,14 @@ GEM safely_block (>= 0.1.1) user_agent_parser uuidtools - airbrussh (1.1.1) + airbrussh (1.1.2) sshkit (>= 1.6.1, != 1.7.0) akami (1.3.1) gyoku (>= 0.4.0) nokogiri ancestry (2.2.2) activerecord (>= 3.0.0) - arel (6.0.3) + arel (6.0.4) ast (2.3.0) babel-source (5.8.35) babel-transpiler (0.7.0) @@ -66,13 +67,13 @@ GEM execjs (~> 2.0) bcrypt (3.1.11) browser (2.3.0) - builder (3.2.2) - bullet (5.4.2) + builder (3.2.3) + bullet (5.5.1) activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) byebug (9.0.6) - cancancan (1.15.0) - capistrano (3.5.0) + cancancan (1.16.0) + capistrano (3.7.2) airbrussh (>= 1.0.0) capistrano-harrow i18n @@ -82,12 +83,13 @@ GEM capistrano (~> 3.1) sshkit (~> 1.2) capistrano-harrow (0.5.3) - capistrano-rails (1.1.8) + capistrano-rails (1.2.3) capistrano (~> 3.1) capistrano-bundler (~> 1.1) - capistrano3-delayed-job (1.7.2) + capistrano3-delayed-job (1.7.3) capistrano (~> 3.0, >= 3.0.0) - capybara (2.7.1) + daemons (~> 1.2.4) + capybara (2.12.1) addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -111,7 +113,7 @@ GEM execjs coffee-script-source (1.10.0) concurrent-ruby (1.0.4) - coveralls (0.8.17) + coveralls (0.8.19) json (>= 1.8, < 3) simplecov (~> 0.12.0) term-ansicolor (~> 1.3) @@ -151,12 +153,12 @@ GEM errbase (0.0.3) erubis (2.7.0) execjs (2.7.0) - factory_girl (4.7.0) + factory_girl (4.8.0) activesupport (>= 3.0.0) - factory_girl_rails (4.7.0) - factory_girl (~> 4.7.0) + factory_girl_rails (4.8.0) + factory_girl (~> 4.8.0) railties (>= 3.0.0) - faker (1.6.6) + faker (1.7.3) i18n (~> 0.5) faraday (0.9.2) multipart-post (>= 1.2, < 3) @@ -173,10 +175,10 @@ GEM fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - geocoder (1.4.1) + geocoder (1.4.3) globalid (0.3.7) activesupport (>= 4.1.0) - groupdate (3.1.1) + groupdate (3.2.0) activesupport (>= 3) gyoku (1.3.1) builder (>= 2.1.2) @@ -185,8 +187,8 @@ GEM htmlentities (4.3.4) httpi (2.4.1) rack - i18n (0.7.0) - i18n-tasks (0.9.6) + i18n (0.8.1) + i18n-tasks (0.9.12) activesupport (>= 4.0.2) ast (>= 2.1.0) easy_translate (>= 0.5.0) @@ -219,7 +221,7 @@ GEM addressable (~> 2.3) letter_opener (1.4.1) launchy (~> 2.2) - letter_opener_web (1.3.0) + letter_opener_web (1.3.1) actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) @@ -237,9 +239,9 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (3.2.0) - newrelic_rpm (3.17.2.327) - nokogiri (1.6.8.1) + net-ssh (4.1.0) + newrelic_rpm (3.18.1.330) + nokogiri (1.7.0.1) mini_portile2 (~> 2.1.0) nori (2.6.0) oauth (0.5.0) @@ -269,20 +271,21 @@ GEM json (~> 1.3) omniauth-oauth (~> 1.1) orm_adapter (0.5.0) - paranoia (2.2.0) + paranoia (2.2.1) activerecord (>= 4.0, < 5.1) - parser (2.3.3.1) + parser (2.4.0.0) ast (~> 2.2) pg (0.19.0) pg_search (1.0.6) activerecord (>= 3.1) activesupport (>= 3.1) arel - poltergeist (1.10.0) + poltergeist (1.13.0) capybara (~> 2.1) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) powerpack (0.1.1) + public_suffix (2.0.5) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) rack (1.6.5) @@ -305,9 +308,9 @@ GEM sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) + rails-dom-testing (1.0.8) activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) @@ -316,12 +319,12 @@ GEM activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) + rainbow (2.2.1) raindrops (0.17.0) rake (12.0.0) - redcarpet (3.3.4) + redcarpet (3.4.0) referer-parser (0.3.0) - request_store (1.3.1) + request_store (1.3.2) responders (2.3.0) railties (>= 4.2.0, < 5.1) rinku (2.0.2) @@ -344,8 +347,8 @@ GEM rspec-mocks (~> 3.5.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) - rubocop (0.45.0) - parser (>= 2.3.1.1, < 3.0) + rubocop (0.47.1) + parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) @@ -355,7 +358,7 @@ GEM capistrano (~> 3.0) sshkit (>= 1.2) safe_yaml (1.0.4) - safely_block (0.1.1) + safely_block (0.2.0) errbase sass (3.4.22) sass-rails (5.0.6) @@ -377,7 +380,7 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) - sitemap_generator (5.2.0) + sitemap_generator (5.3.1) builder (~> 3.0) social-share-button (0.3.1) coffee-rails @@ -396,7 +399,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sshkit (1.11.4) + sshkit (1.12.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) term-ansicolor (1.4.0) @@ -405,10 +408,10 @@ GEM unicode-display_width (~> 1.1.1) thor (0.19.4) thread (0.2.2) - thread_safe (0.3.5) + thread_safe (0.3.6) tilt (2.0.5) timecop (0.8.1) - tins (1.13.0) + tins (1.13.2) tolk (2.0.0) rails (>= 4.0) safe_yaml (>= 0.8.6) @@ -421,9 +424,9 @@ GEM tilt (>= 1.4, < 3) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.4) + uglifier (3.1.6) execjs (>= 0.3.0, < 3) - unicode-display_width (1.1.1) + unicode-display_width (1.1.3) unicorn (5.2.0) kgio (~> 2.6) raindrops (~> 0.7) @@ -439,7 +442,7 @@ GEM activemodel (>= 4.2) debug_inspector railties (>= 4.2) - websocket-driver (0.6.4) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) whenever (0.9.7) @@ -456,17 +459,17 @@ DEPENDENCIES ahoy_matey (~> 1.5.3) ancestry (~> 2.2.2) browser - bullet + bullet (~> 5.5.1) byebug - cancancan - capistrano (= 3.5.0) + cancancan (~> 1.16.0) + capistrano (~> 3.7.2) capistrano-bundler (~> 1.2) - capistrano-rails (= 1.1.8) - capistrano3-delayed-job (~> 1.0) - capybara + capistrano-rails (~> 1.2.3) + capistrano3-delayed-job (~> 1.7.3) + capybara (~> 2.12.1) ckeditor (~> 4.2.2) coffee-rails (~> 4.2.1) - coveralls + coveralls (~> 0.8.19) daemons dalli database_cleaner @@ -475,13 +478,13 @@ DEPENDENCIES devise-async devise_security_extension email_spec - factory_girl_rails - faker + factory_girl_rails (~> 4.8.0) + faker (~> 1.7.3) foundation-rails (~> 6.2.4.0) foundation_rails_helper (~> 2.0.0) fuubar - groupdate (~> 3.1.0) - i18n-tasks + groupdate (~> 3.2.0) + i18n-tasks (~> 0.9.12) initialjs-rails (= 0.2.0.4) invisible_captcha (~> 0.9.2) jquery-rails (~> 4.2.2) @@ -489,28 +492,28 @@ DEPENDENCIES kaminari knapsack launchy - letter_opener_web (~> 1.3.0) - newrelic_rpm (~> 3.17.2.327) + letter_opener_web (~> 1.3.1) + newrelic_rpm (~> 3.18.1.330) omniauth omniauth-facebook (~> 3.0.0) omniauth-google-oauth2 (~> 0.4.0) omniauth-twitter - paranoia (~> 2.2.0) + paranoia (~> 2.2.1) pg (~> 0.19.0) pg_search - poltergeist + poltergeist (~> 1.13.0) quiet_assets rails (= 4.2.7.1) - redcarpet + redcarpet (~> 3.4.0) responders (~> 2.3.0) rinku (~> 2.0.2) rollbar (~> 2.14.0) rspec-rails (~> 3.5) - rubocop (~> 0.45.0) + rubocop (~> 0.47.1) rvm1-capistrano3 sass-rails (~> 5.0, >= 5.0.4) savon - sitemap_generator + sitemap_generator (~> 5.3.1) social-share-button spring spring-commands-rspec @@ -518,7 +521,10 @@ DEPENDENCIES tolk (~> 2.0.0) turbolinks turnout (~> 2.4.0) - uglifier (>= 3.0.4) + uglifier (~> 3.1.6) unicorn (~> 5.2.0) web-console (= 3.3.0) whenever + +BUNDLED WITH + 1.13.7 From d0ada346319193b4a55e5bf211d058be0e82aec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Tue, 14 Mar 2017 12:01:46 +0100 Subject: [PATCH 06/15] rails version up to 4.2.8 --- Gemfile | 2 +- Gemfile.lock | 65 ++++++++++++++++++++++++++-------------------------- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/Gemfile b/Gemfile index 81b87806d..262a44ba4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.2.7.1' +gem 'rails', '4.2.8' # Use PostgreSQL gem 'pg', '~> 0.19.0' # Use SCSS for stylesheets diff --git a/Gemfile.lock b/Gemfile.lock index f8e67edab..738087adf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,38 +1,37 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.7.1) - actionpack (= 4.2.7.1) - actionview (= 4.2.7.1) - activejob (= 4.2.7.1) + actionmailer (4.2.8) + actionpack (= 4.2.8) + actionview (= 4.2.8) + activejob (= 4.2.8) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.7.1) - actionview (= 4.2.7.1) - activesupport (= 4.2.7.1) + actionpack (4.2.8) + actionview (= 4.2.8) + activesupport (= 4.2.8) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.7.1) - activesupport (= 4.2.7.1) + actionview (4.2.8) + activesupport (= 4.2.8) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.7.1) - activesupport (= 4.2.7.1) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (4.2.8) + activesupport (= 4.2.8) globalid (>= 0.3.0) - activemodel (4.2.7.1) - activesupport (= 4.2.7.1) + activemodel (4.2.8) + activesupport (= 4.2.8) builder (~> 3.1) - activerecord (4.2.7.1) - activemodel (= 4.2.7.1) - activesupport (= 4.2.7.1) + activerecord (4.2.8) + activemodel (= 4.2.8) + activesupport (= 4.2.8) arel (~> 6.0) - activesupport (4.2.7.1) + activesupport (4.2.8) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) @@ -208,7 +207,7 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (5.0.5) railties (>= 3.2.16) - json (1.8.3) + json (1.8.6) jwt (1.5.4) kaminari (0.17.0) actionpack (>= 3.0.0) @@ -295,16 +294,16 @@ GEM rack rack-test (0.6.3) rack (>= 1.0) - rails (4.2.7.1) - actionmailer (= 4.2.7.1) - actionpack (= 4.2.7.1) - actionview (= 4.2.7.1) - activejob (= 4.2.7.1) - activemodel (= 4.2.7.1) - activerecord (= 4.2.7.1) - activesupport (= 4.2.7.1) + rails (4.2.8) + actionmailer (= 4.2.8) + actionpack (= 4.2.8) + actionview (= 4.2.8) + activejob (= 4.2.8) + activemodel (= 4.2.8) + activerecord (= 4.2.8) + activesupport (= 4.2.8) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.7.1) + railties (= 4.2.8) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -314,9 +313,9 @@ GEM rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.7.1) - actionpack (= 4.2.7.1) - activesupport (= 4.2.7.1) + railties (4.2.8) + actionpack (= 4.2.8) + activesupport (= 4.2.8) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.2.1) @@ -503,7 +502,7 @@ DEPENDENCIES pg_search poltergeist (~> 1.13.0) quiet_assets - rails (= 4.2.7.1) + rails (= 4.2.8) redcarpet (~> 3.4.0) responders (~> 2.3.0) rinku (~> 2.0.2) From ed44d8cc5f76fc00c3f10ae13b55fcf25d80b3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Tue, 14 Mar 2017 12:03:14 +0100 Subject: [PATCH 07/15] removes wrong search attribute --- app/views/shared/_tags.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb index 3cdb3c40e..ec2b7a1b1 100644 --- a/app/views/shared/_tags.html.erb +++ b/app/views/shared/_tags.html.erb @@ -5,8 +5,7 @@ <% taggable.tag_list_with_limit(limit).each do |tag| %>
  • <%= link_to sanitize(tag.name), - taggables_path(taggable.class.name.underscore, tag.name), - search: tag.name %>
  • + taggables_path(taggable.class.name.underscore, tag.name) %> <% end %> <% if taggable.tags_count_out_of_limit(limit) > 0 %> From 45def094fe45a078b6db4e29880f1d107a49beb0 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 14 Mar 2017 18:42:21 +0100 Subject: [PATCH 08/15] removes accesskey on top links and login items links --- app/views/devise/menu/_login_items.html.erb | 12 ++++++------ app/views/shared/_top_links.html.erb | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb index 0ab28e2ee..b7db4a22c 100644 --- a/app/views/devise/menu/_login_items.html.erb +++ b/app/views/devise/menu/_login_items.html.erb @@ -1,6 +1,6 @@ <% if user_signed_in? %>
  • - <%= link_to notifications_path, class: "notifications", accesskey: "n" do %> + <%= link_to notifications_path, class: "notifications" do %> <%= t("layouts.header.notifications") %> <% if current_user.notifications_count > 0 %> @@ -12,19 +12,19 @@ <% end %>
  • - <%= link_to(t("layouts.header.my_activity_link"), user_path(current_user), accesskey: "a") %> + <%= link_to t("layouts.header.my_activity_link"), user_path(current_user) %>
  • - <%= link_to(t("layouts.header.my_account_link"), account_path, accesskey: "m") %> + <%= link_to t("layouts.header.my_account_link"), account_path %>
  • - <%= link_to(t("devise_views.menu.login_items.logout"), destroy_user_session_path, method: :delete) %> + <%= link_to t("devise_views.menu.login_items.logout"), destroy_user_session_path, method: :delete %>
  • <% else %>
  • - <%= link_to(t("devise_views.menu.login_items.login"), new_user_session_path) %> + <%= link_to t("devise_views.menu.login_items.login"), new_user_session_path %>
  • - <%= link_to(t("devise_views.menu.login_items.signup"), new_user_registration_path, class: "button") %> + <%= link_to t("devise_views.menu.login_items.signup"), new_user_registration_path, class: "button" %>
  • <% end %> diff --git a/app/views/shared/_top_links.html.erb b/app/views/shared/_top_links.html.erb index b6b738aca..40cda54de 100644 --- a/app/views/shared/_top_links.html.erb +++ b/app/views/shared/_top_links.html.erb @@ -2,8 +2,7 @@
  • <%= link_to t("layouts.header.more_information"), page_path('more_information'), - class: ("selected" if current_page?("/more_information")), - accesskey: "i" %> + class: ("selected" if current_page?("/more_information")) %>
  • <%= link_to t("layouts.header.external_link_transparency"), From 02cb83c6835aaf3cd4303884edb528d3fc4b28e1 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 14 Mar 2017 18:43:02 +0100 Subject: [PATCH 09/15] changes accesskey letters to numbers --- app/views/layouts/_header.html.erb | 2 +- app/views/pages/accessibility.html.erb | 28 +++++++----------------- app/views/shared/_subnavigation.html.erb | 11 +++++----- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 223f173b2..9a33662c6 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -21,7 +21,7 @@
    - <%= link_to root_path, class: "hide-for-small-only", accesskey: "/" do %> + <%= link_to root_path, class: "hide-for-small-only", accesskey: "0" do %> <%= image_tag('logo_header.png', class: 'hide-for-small-only float-left', size: '80x80', alt: t("layouts.header.logo")) %> <%= setting['org_name'] %> <% end %> diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index a2c2eff30..197885370 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -27,37 +27,25 @@ - / + 0 Inicio - D + 1 Debates - P + 2 Propuestas - S + 3 + Votaciones + + + 4 Presupuestos participativos - - I - Más información - - - N - Notificaciones - - - A - Mi actividad - - - M - Mi cuenta -
    diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb index ed5694f27..f7bc3c810 100644 --- a/app/views/shared/_subnavigation.html.erb +++ b/app/views/shared/_subnavigation.html.erb @@ -5,27 +5,26 @@ <%= layout_menu_link_to t("layouts.header.debates"), debates_path, controller_name == 'debates', - accesskey: "d" %> + accesskey: "1" %>
  • <% end %>
  • <%= layout_menu_link_to t("layouts.header.proposals"), proposals_path, controller_name == 'proposals', - accesskey: "p" %> + accesskey: "2" %>
  • <%= layout_menu_link_to t("layouts.header.proposal_ballot"), proposal_ballots_path, controller_name == 'proposal_ballots', - accesskey: "v" %> + accesskey: "3" %>
  • <% if feature?(:spending_proposals) %>
  • <%= layout_menu_link_to t("layouts.header.spending_proposals"), spending_proposals_path, - controller_name == 'spending_proposals', - accesskey: "s" %> + controller_name == 'spending_proposals' %>
  • <% end %> <% if feature?(:budgets) %> @@ -33,7 +32,7 @@ <%= layout_menu_link_to t("layouts.header.budgets"), budgets_path, controller_name == "budgets" || controller_name == "investments", - accesskey: "b" %> + accesskey: "4" %> <% end %> From 7541956f5b68e6671289944480b54e14d540cf8d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 14 Mar 2017 18:45:35 +0100 Subject: [PATCH 10/15] adds captions to accessibility page tables --- app/views/pages/accessibility.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index 197885370..de5e64277 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -19,6 +19,7 @@
    + @@ -54,6 +55,7 @@
    Atajos de teclado para el menú de navegación
    Tecla
    + From e9bc450745aabbda07b1b2adb99890ec761d4348 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 14 Mar 2017 19:11:00 +0100 Subject: [PATCH 11/15] adds scope attribute on accessibility page tables --- app/views/pages/accessibility.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index de5e64277..a0f54760d 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -22,8 +22,8 @@ - - + + @@ -58,8 +58,8 @@ - - + + @@ -94,8 +94,8 @@
    Combinación de teclas dependiendo del sistema operativo y navegador
    Navegador
    Atajos de teclado para el menú de navegación
    TeclaPáginaTeclaPágina
    Combinación de teclas dependiendo del sistema operativo y navegador
    NavegadorCombinación de teclasNavegadorCombinación de teclas
    - - + + From ea63c1ccf061922356adae7bad47479a1dc3946b Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 14 Mar 2017 19:19:38 +0100 Subject: [PATCH 12/15] adds accesskey to outdated spending proprosals menu --- app/views/shared/_subnavigation.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb index f7bc3c810..32dc73aa7 100644 --- a/app/views/shared/_subnavigation.html.erb +++ b/app/views/shared/_subnavigation.html.erb @@ -24,7 +24,8 @@
  • <%= layout_menu_link_to t("layouts.header.spending_proposals"), spending_proposals_path, - controller_name == 'spending_proposals' %> + controller_name == 'spending_proposals', + accesskey: "s" %>
  • <% end %> <% if feature?(:budgets) %> From 170cb89a5c1ca90af42aa2ffabf3f8bfa62fa979 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 15 Mar 2017 14:50:50 +0100 Subject: [PATCH 13/15] allows admins to see budgets in reviewing and selecting phase --- .../management/budgets_controller.rb | 9 +++ .../management/budget_investments_spec.rb | 55 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/app/controllers/management/budgets_controller.rb b/app/controllers/management/budgets_controller.rb index c5cfdee76..dd7259c99 100644 --- a/app/controllers/management/budgets_controller.rb +++ b/app/controllers/management/budgets_controller.rb @@ -7,6 +7,11 @@ class Management::BudgetsController < Management::BaseController def create_investments @budgets = Budget.accepting.order(created_at: :desc).page(params[:page]) + + if current_manager_administrator? + @budgets += Budget.reviewing.order(created_at: :desc) + + Budget.selecting.order(created_at: :desc) + end end def support_investments @@ -23,4 +28,8 @@ class Management::BudgetsController < Management::BaseController check_verified_user t("management.budget_investments.alert.unverified_user") end + def current_manager_administrator? + session[:manager]["login"].match("admin") + end + end diff --git a/spec/features/management/budget_investments_spec.rb b/spec/features/management/budget_investments_spec.rb index 5b3961306..c4d7a8797 100644 --- a/spec/features/management/budget_investments_spec.rb +++ b/spec/features/management/budget_investments_spec.rb @@ -137,6 +137,61 @@ feature 'Budget Investments' do end end + scenario "Listing - managers can see budgets in accepting phase" do + accepting_budget = create(:budget, phase: "accepting") + reviewing_budget = create(:budget, phase: "reviewing") + selecting_budget = create(:budget, phase: "selecting") + valuating_budget = create(:budget, phase: "valuating") + balloting_budget = create(:budget, phase: "balloting") + reviewing_ballots_budget = create(:budget, phase: "reviewing_ballots") + finished = create(:budget, phase: "finished") + + user = create(:user, :level_two) + login_managed_user(user) + + click_link "Create budget investment" + + expect(page).to have_content(accepting_budget.name) + + expect(page).to_not have_content(reviewing_budget.name) + expect(page).to_not have_content(selecting_budget.name) + expect(page).to_not have_content(valuating_budget.name) + expect(page).to_not have_content(balloting_budget.name) + expect(page).to_not have_content(reviewing_ballots_budget.name) + expect(page).to_not have_content(finished.name) + end + + scenario "Listing - admins can see budgets in accepting, reviewing and selecting phases" do + accepting_budget = create(:budget, phase: "accepting") + reviewing_budget = create(:budget, phase: "reviewing") + selecting_budget = create(:budget, phase: "selecting") + valuating_budget = create(:budget, phase: "valuating") + balloting_budget = create(:budget, phase: "balloting") + reviewing_ballots_budget = create(:budget, phase: "reviewing_ballots") + finished = create(:budget, phase: "finished") + + visit root_path + click_link "Sign out" + + admin = create(:administrator) + login_as(admin.user) + + user = create(:user, :level_two) + login_managed_user(user) + visit management_sign_in_path + + click_link "Create budget investment" + + expect(page).to have_content(accepting_budget.name) + expect(page).to have_content(reviewing_budget.name) + expect(page).to have_content(selecting_budget.name) + + expect(page).to_not have_content(valuating_budget.name) + expect(page).to_not have_content(balloting_budget.name) + expect(page).to_not have_content(reviewing_ballots_budget.name) + expect(page).to_not have_content(finished.name) + end + context "Supporting" do scenario 'Supporting budget investments on behalf of someone in index view', :js do From b8b7cda4e6ed399c8b3997172c437bd77c653bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Thu, 16 Mar 2017 14:30:31 +0100 Subject: [PATCH 14/15] keeps Budget::Investment's group in sync with heading --- app/models/budget/investment.rb | 2 +- spec/models/budget/investment_spec.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index 100433707..230e25d82 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -259,7 +259,7 @@ class Budget private def set_denormalized_ids - self.group_id ||= self.heading.try(:group_id) + self.group_id = self.heading.try(:group_id) if self.heading_id_changed? self.budget_id ||= self.heading.try(:group).try(:budget_id) end end diff --git a/spec/models/budget/investment_spec.rb b/spec/models/budget/investment_spec.rb index abbc8ad26..e36a1c062 100644 --- a/spec/models/budget/investment_spec.rb +++ b/spec/models/budget/investment_spec.rb @@ -35,6 +35,25 @@ describe Budget::Investment do expect(investment.description).to eq("alert('danger');") end + it "set correct group and budget ids" do + budget = create(:budget) + group_1 = create(:budget_group, budget: budget) + group_2 = create(:budget_group, budget: budget) + + heading_1 = create(:budget_heading, group: group_1) + heading_2 = create(:budget_heading, group: group_2) + + investment = create(:budget_investment, heading: heading_1) + + expect(investment.budget_id).to eq budget.id + expect(investment.group_id).to eq group_1.id + + investment.update(heading: heading_2) + + expect(investment.budget_id).to eq budget.id + expect(investment.group_id).to eq group_2.id + end + describe "#unfeasibility_explanation" do it "should be valid if valuation not finished" do investment.unfeasibility_explanation = "" From 8f13c0e2ec7e49f43f40dba5c526602d49b867fa Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 16 Mar 2017 17:04:36 +0100 Subject: [PATCH 15/15] adds setting to add per page code on and --- app/views/layouts/application.html.erb | 4 +++- config/locales/fr.yml | 3 ++- config/locales/pt-BR.yml | 3 ++- config/locales/settings.en.yml | 3 ++- config/locales/settings.es.yml | 3 ++- db/dev_seeds.rb | 3 ++- db/seeds.rb | 7 +++++-- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7a1dae4d9..ef4455320 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -20,9 +20,11 @@ type: "image/png" %> <%= content_for :social_media_meta_tags %> - <%= setting['per_page_code'].try(:html_safe) %> + <%= setting['per_page_code_head'].try(:html_safe) %> + <%= setting['per_page_code_body'].try(:html_safe) %> +

    <%= setting['org_name'] %>

    diff --git a/config/locales/fr.yml b/config/locales/fr.yml index cc0b1c590..25ed4b86e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1354,7 +1354,8 @@ fr: official_level_3_name: Niveau 3 personne officielle official_level_4_name: Niveau 4 personne officielle official_level_5_name: Niveau 5 personne officielle - per_page_code: Code à inclure dans chaque page + per_page_code_head: "Code à inclure dans chaque page ()" + per_page_code_body: "Code à inclure dans chaque page ()" proposal_code_prefix: Préfixe pour les codes de propositions votes_for_proposal_success: Nombre de votes nécessaires pour l'approbation d'une proposition diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index febe0ed5c..4718085a4 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1370,7 +1370,8 @@ pt-BR: official_level_3_name: Nível 3 coordenador público official_level_4_name: Nível 4 coordenador público official_level_5_name: Nível 5 coordenador público - per_page_code: Código a ser incluído em cada página + per_page_code_head: "Código a ser incluído em cada página ()" + per_page_code_body: "Código a ser incluído em cada página ()" proposal_code_prefix: Prefixo para códigos de Proposta votes_for_proposal_success: Número de votos necessários para aprovar uma Proposta shared: diff --git a/config/locales/settings.en.yml b/config/locales/settings.en.yml index 811f10557..7e126bc35 100755 --- a/config/locales/settings.en.yml +++ b/config/locales/settings.en.yml @@ -13,7 +13,8 @@ en: votes_for_proposal_success: "Number of votes necessary for approval of a Proposal" months_to_archive_proposals: "Months to archive Proposals" email_domain_for_officials: "Email domain for public officials" - per_page_code: "Code to be included on every page" + per_page_code_head: "Code to be included on every page ()" + per_page_code_body: "Code to be included on every page ()" twitter_handle: "Twitter handle" twitter_hashtag: "Twitter hashtag" facebook_handle: "Facebook handle" diff --git a/config/locales/settings.es.yml b/config/locales/settings.es.yml index b4575432e..27224d90b 100644 --- a/config/locales/settings.es.yml +++ b/config/locales/settings.es.yml @@ -13,7 +13,8 @@ es: votes_for_proposal_success: "Número de votos necesarios para aprobar una Propuesta" months_to_archive_proposals: "Meses para archivar las Propuestas" email_domain_for_officials: "Dominio de email para cargos públicos" - per_page_code: "Código a incluir en cada página" + per_page_code_head: "Código a incluir en cada página ()" + per_page_code_body: "Código a incluir en cada página ()" twitter_handle: "Usuario de Twitter" twitter_hashtag: "Hashtag para Twitter" facebook_handle: "Identificador de Facebook" diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index a59a3c9b9..7ad046c42 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -32,7 +32,8 @@ Setting.create(key: 'feature.twitter_login', value: "true") Setting.create(key: 'feature.facebook_login', value: "true") Setting.create(key: 'feature.google_login', value: "true") Setting.create(key: 'feature.signature_sheets', value: "true") -Setting.create(key: 'per_page_code', value: "") +Setting.create(key: 'per_page_code_head', value: "") +Setting.create(key: 'per_page_code_body', value: "") Setting.create(key: 'comments_body_max_length', value: '1000') Setting.create(key: 'mailer_from_name', value: 'Consul') Setting.create(key: 'mailer_from_address', value: 'noreply@consul.dev') diff --git a/db/seeds.rb b/db/seeds.rb index 41261d9d7..5ff079f2f 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -38,8 +38,11 @@ Setting["months_to_archive_proposals"] = 12 # Emails under the domain's subdomains will also be included Setting["email_domain_for_officials"] = '' -# Code to be included at the top (header) of every page (useful for tracking) -Setting['per_page_code'] = '' +# Code to be included at the top (inside ) of every page (useful for tracking) +Setting['per_page_code_head'] = '' + +# Code to be included at the top (inside ) of every page +Setting['per_page_code_body'] = '' # Social settings Setting["twitter_handle"] = nil
    NavegadorAcción a realizar NavegadorAcción a realizar