From 655bd61e19ecf68f5c4b90966d619bde0990aa25 Mon Sep 17 00:00:00 2001 From: jpl Date: Mon, 17 Jul 2017 14:41:11 +0200 Subject: Refs #4108: adding workbenches#index --- app/controllers/workbenches_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/controllers/workbenches_controller.rb') diff --git a/app/controllers/workbenches_controller.rb b/app/controllers/workbenches_controller.rb index 22a71863a..171db6a07 100644 --- a/app/controllers/workbenches_controller.rb +++ b/app/controllers/workbenches_controller.rb @@ -2,7 +2,13 @@ class WorkbenchesController < BreadcrumbController before_action :query_params, only: [:show] defaults resource_class: Workbench - respond_to :html, only: [:show] + respond_to :html, only: [:show, :index] + + def index + # Only display Wb with selected name, according to #4108 + @workbench = current_organisation.workbenches.find_by(name: "Gestion de l'offre") + @calendars = Calendar.where('organisation_id = ? OR shared = ?', current_organisation.id, true) + end def show scope = resource.all_referentials -- cgit v1.2.3 From 7b297ba1410e82ea3d38f2be3c2d34596e52306a Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Fri, 21 Jul 2017 09:58:02 +0200 Subject: Fix referentials count in homepage Refs #4136 @1 --- app/controllers/workbenches_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers/workbenches_controller.rb') diff --git a/app/controllers/workbenches_controller.rb b/app/controllers/workbenches_controller.rb index 171db6a07..19af28a98 100644 --- a/app/controllers/workbenches_controller.rb +++ b/app/controllers/workbenches_controller.rb @@ -7,6 +7,7 @@ class WorkbenchesController < BreadcrumbController def index # Only display Wb with selected name, according to #4108 @workbench = current_organisation.workbenches.find_by(name: "Gestion de l'offre") + @referentials = @workbench.all_referentials @calendars = Calendar.where('organisation_id = ? OR shared = ?', current_organisation.id, true) end -- cgit v1.2.3