From 05ed9de8b6c6441ea34f821369906ec8aa21ba6c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 8 Jul 2019 20:51:14 +1200 Subject: [PATCH 1/6] Add leaflet initializer --- config/initializers/leaflet.rb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/initializers/leaflet.rb diff --git a/config/initializers/leaflet.rb b/config/initializers/leaflet.rb new file mode 100644 index 000000000..1f54185ea --- /dev/null +++ b/config/initializers/leaflet.rb @@ -0,0 +1,3 @@ +Leaflet.tile_layer = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' +Leaflet.attribution = '© OpenStreetMap contributors, CC-BY-SA' +Leaflet.max_zoom = 18 \ No newline at end of file From def17e020e273afbd61d5e84089fc0c11e0104b8 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 8 Jul 2019 21:28:39 +1200 Subject: [PATCH 2/6] New line at end of file --- config/initializers/leaflet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/leaflet.rb b/config/initializers/leaflet.rb index 1f54185ea..510a97070 100644 --- a/config/initializers/leaflet.rb +++ b/config/initializers/leaflet.rb @@ -1,3 +1,3 @@ Leaflet.tile_layer = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' Leaflet.attribution = '© OpenStreetMap contributors, CC-BY-SA' -Leaflet.max_zoom = 18 \ No newline at end of file +Leaflet.max_zoom = 18 From 9f9bf5012a899f7fd68cef8f24515a7dc9bdfa00 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 8 Jul 2019 22:27:33 +1200 Subject: [PATCH 3/6] Make headers consistent fixes #2011 --- app/views/plantings/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index 7ae3f41a2..f905e12d2 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -2,7 +2,7 @@ %h1 = planting_icon - %strong= title('plantings', @owner, @crop, @planting) + = title('plantings', @owner, @crop, @planting) = render 'layouts/nav', model: Planting From f127dd18ba2f0b6974d10987b0c3c45fb05f5ab4 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 9 Jul 2019 09:11:49 +1200 Subject: [PATCH 4/6] fix display of inbox item in menu fixes #2046 --- app/views/layouts/_header.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 42e1f7245..8a413fc43 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -46,8 +46,9 @@ = link_to t('.posts'), member_posts_path(current_member), class: 'dropdown-item' - if current_member.notifications.unread_count.positive? - = link_to(t('.inbox_unread', unread_count: current_member.notifications.unread_count), - notifications_path) + .dropdown-divider + %strong= link_to(t('.inbox_unread', unread_count: current_member.notifications.unread_count), + notifications_path, class: 'dropdown-item') - else = link_to t('.inbox'), notifications_path, class: 'dropdown-item' From 68bc237dd90e3e721d22029ac47b37071f6b6c30 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 9 Jul 2019 09:12:52 +1200 Subject: [PATCH 5/6] Wrap for readbility --- app/views/layouts/_header.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 8a413fc43..780789096 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -47,7 +47,8 @@ - if current_member.notifications.unread_count.positive? .dropdown-divider - %strong= link_to(t('.inbox_unread', unread_count: current_member.notifications.unread_count), + %strong= link_to(t('.inbox_unread', + unread_count: current_member.notifications.unread_count), notifications_path, class: 'dropdown-item') - else = link_to t('.inbox'), notifications_path, class: 'dropdown-item' From 7b87f8e4dbc93a853f88e7669a25b066a2e6d394 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 9 Jul 2019 09:19:27 +1200 Subject: [PATCH 6/6] Add flash messages to controllers --- app/controllers/forums_controller.rb | 1 + app/controllers/gardens_controller.rb | 1 + app/controllers/posts_controller.rb | 1 + app/controllers/seeds_controller.rb | 1 + 4 files changed, 4 insertions(+) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 949de10b0..df6d1cad2 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -1,6 +1,7 @@ class ForumsController < ApplicationController load_and_authorize_resource respond_to :html, :json + responders :flash # GET /forums # GET /forums.json diff --git a/app/controllers/gardens_controller.rb b/app/controllers/gardens_controller.rb index 5851ba722..791c6d7b4 100644 --- a/app/controllers/gardens_controller.rb +++ b/app/controllers/gardens_controller.rb @@ -2,6 +2,7 @@ class GardensController < ApplicationController before_action :authenticate_member!, except: %i(index show) after_action :expire_homepage, only: %i(create destroy) load_and_authorize_resource + responders :flash respond_to :html, :json # GET /gardens diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 395212829..0180b1b8d 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -1,6 +1,7 @@ class PostsController < ApplicationController before_action :authenticate_member!, except: %i(index show) load_and_authorize_resource + responders :flash respond_to :html, :json respond_to :rss, only: %i(index show) diff --git a/app/controllers/seeds_controller.rb b/app/controllers/seeds_controller.rb index ba09fca61..1989db825 100644 --- a/app/controllers/seeds_controller.rb +++ b/app/controllers/seeds_controller.rb @@ -1,6 +1,7 @@ class SeedsController < ApplicationController before_action :authenticate_member!, except: %i(index show) load_and_authorize_resource + responders :flash respond_to :html, :json respond_to :csv, only: :index respond_to :rss, only: :index