-
+

From f1844411c4e8dec97fbb03da981e82223f29386a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 11 Jan 2016 13:58:04 +0100 Subject: [PATCH 2/5] Adds title to notifications page --- app/assets/stylesheets/layout.scss | 2 +- app/views/notifications/index.html.erb | 5 ++++- config/locales/en.yml | 1 + config/locales/es.yml | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 4e92fb7b5..8c279ff78 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -984,7 +984,7 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar { height: 100%; left: 28px; position: absolute; - top: 0; + top: 84px; width: 2px; } diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index cc9170e48..4f57ed5d9 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -1,7 +1,10 @@
+ +

<%= t("notifications.index.title") %>

+ <% if @notifications.empty? %> -
+
<%= t("notifications.index.empty_notifications") %>
<% else %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 468cdc481..321b4b448 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -342,6 +342,7 @@ en: user_permission_verify_info: "* Only for users on Madrid City Census." notifications: index: + title: "Notifications" mark_all_as_read: "Mark all as read" empty_notifications: "You don't have new notifications." comments_on: diff --git a/config/locales/es.yml b/config/locales/es.yml index e1d785a17..4943b0756 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -342,6 +342,7 @@ es: user_permission_verify_info: "* Sólo usuarios empadronados en el municipio de Madrid." notifications: index: + title: "Notificaciones" mark_all_as_read: "Marcar todas como leídas" empty_notifications: "No tienes notificaciones nuevas." comments_on: From 56c23489987db5e9dfa87598565fb7f18bc588a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 12 Jan 2016 13:32:43 +0100 Subject: [PATCH 3/5] updates dependencies --- Gemfile | 2 +- Gemfile.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 9f03d3da7..5430c9c41 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'devise' gem 'omniauth' gem 'omniauth-twitter' gem 'omniauth-facebook', '~> 3.0.0' -gem 'omniauth-google-oauth2', '~> 0.2.10' +gem 'omniauth-google-oauth2', '~> 0.3.0' gem 'kaminari' gem 'ancestry' diff --git a/Gemfile.lock b/Gemfile.lock index 241d301df..4756e3aed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,9 +67,9 @@ GEM arel (6.0.3) ast (2.2.0) bcrypt (3.1.10) - browser (1.0.1) + browser (1.1.0) builder (3.2.2) - bullet (4.14.10) + bullet (5.0.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.9.0) byebug (8.2.1) @@ -96,7 +96,7 @@ GEM rack-test (>= 0.5.4) xpath (~> 2.0) chronic (0.10.2) - ckeditor (4.1.5) + ckeditor (4.1.6) cocaine orm_adapter (~> 0.5.0) climate_control (0.0.3) @@ -173,7 +173,7 @@ GEM fuubar (2.0.0) rspec (~> 3.0) ruby-progressbar (~> 1.4) - geocoder (1.2.13) + geocoder (1.2.14) globalid (0.3.6) activesupport (>= 4.1.0) groupdate (2.5.0) @@ -229,7 +229,7 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (3.0.1) + net-ssh (3.0.2) netrc (0.11.0) newrelic_rpm (3.14.1.311) nokogiri (1.6.7.1) @@ -247,23 +247,23 @@ GEM rack (>= 1.0, < 3) omniauth-facebook (3.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (0.2.10) + omniauth-google-oauth2 (0.3.0) addressable (~> 2.3) jwt (~> 1.0) multi_json (~> 1.3) omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) + omniauth-oauth2 (>= 1.3.1) omniauth-oauth (1.1.0) oauth omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) + omniauth-oauth2 (1.4.0) oauth2 (~> 1.0) omniauth (~> 1.2) omniauth-twitter (1.2.1) json (~> 1.3) omniauth-oauth (~> 1.1) orm_adapter (0.5.0) - paranoia (2.1.4) + paranoia (2.1.5) activerecord (~> 4.0) parser (2.2.3.0) ast (>= 1.1, < 3.0) @@ -312,7 +312,7 @@ GEM rake (10.4.2) redcarpet (3.3.4) referer-parser (0.3.0) - request_store (1.2.1) + request_store (1.3.0) responders (2.1.1) railties (>= 4.2.0, < 5.1) rest-client (1.8.0) @@ -331,7 +331,7 @@ GEM rspec-expectations (3.4.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.4.0) - rspec-mocks (3.4.0) + rspec-mocks (3.4.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.4.0) rspec-rails (3.4.0) @@ -344,14 +344,14 @@ GEM rspec-support (~> 3.4.0) rspec-support (3.4.1) ruby-progressbar (1.7.5) - sass (3.4.20) + sass (3.4.21) sass-rails (5.0.4) railties (>= 4.0.0, < 5.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (1.8.2) + sassc (1.8.3) bundler ffi (~> 1.9.6) sass (>= 3.3.0) @@ -369,14 +369,14 @@ GEM nokogiri (>= 1.4.0) nori (~> 2.4) wasabi (~> 3.4) - simple_captcha2 (0.3.4) + simple_captcha2 (0.4.0) rails (>= 4.1) simplecov (0.11.1) docile (~> 1.1.0) json (~> 1.8) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) - spring (1.6.1) + spring (1.6.2) spring-commands-rspec (1.0.4) spring (>= 0.9.1) sprockets (3.5.2) @@ -395,11 +395,11 @@ GEM thor (0.19.1) thread (0.2.2) thread_safe (0.3.5) - tilt (2.0.1) + tilt (2.0.2) tins (1.6.0) turbolinks (2.5.3) coffee-rails - turnout (2.2.0) + turnout (2.2.1) rack (~> 1.3) rack-accept (~> 0.4) tzinfo (1.2.2) @@ -477,7 +477,7 @@ DEPENDENCIES newrelic_rpm (~> 3.14) omniauth omniauth-facebook (~> 3.0.0) - omniauth-google-oauth2 (~> 0.2.10) + omniauth-google-oauth2 (~> 0.3.0) omniauth-twitter paranoia pg @@ -504,4 +504,4 @@ DEPENDENCIES whenever BUNDLED WITH - 1.10.6 + 1.11.2 From ae6d70b1c193c2d1e6c9110fff96b7ff423911fb Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 13 Jan 2016 16:32:10 +0100 Subject: [PATCH 4/5] Uses Abilities instead of exceptions in the proposals controller --- app/controllers/admin/spending_proposals_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/spending_proposals_controller.rb b/app/controllers/admin/spending_proposals_controller.rb index 03fffeca7..9516ea76d 100644 --- a/app/controllers/admin/spending_proposals_controller.rb +++ b/app/controllers/admin/spending_proposals_controller.rb @@ -1,14 +1,14 @@ class Admin::SpendingProposalsController < Admin::BaseController has_filters %w{unresolved accepted rejected}, only: :index - load_and_authorize_resource except: [:index, :show] + load_and_authorize_resource def index - @spending_proposals = SpendingProposal.includes([:geozone]).send(@current_filter).order(created_at: :desc).page(params[:page]) + @spending_proposals = @spending_proposals.includes([:geozone]).send(@current_filter).order(created_at: :desc).page(params[:page]) end def show - @spending_proposal = SpendingProposal.includes([:author, :geozone]).find(params[:id]) + @spending_proposal = @spending_proposal.includes([:author, :geozone]) end def accept @@ -21,4 +21,4 @@ class Admin::SpendingProposalsController < Admin::BaseController redirect_to request.query_parameters.merge(action: :index) end -end \ No newline at end of file +end From e014b3ad83af632e1fefe6f0ec23275feffbc340 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 13 Jan 2016 16:58:17 +0100 Subject: [PATCH 5/5] fixes failing specs --- app/controllers/admin/spending_proposals_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/admin/spending_proposals_controller.rb b/app/controllers/admin/spending_proposals_controller.rb index 9516ea76d..817de285d 100644 --- a/app/controllers/admin/spending_proposals_controller.rb +++ b/app/controllers/admin/spending_proposals_controller.rb @@ -8,7 +8,6 @@ class Admin::SpendingProposalsController < Admin::BaseController end def show - @spending_proposal = @spending_proposal.includes([:author, :geozone]) end def accept