diff options
| -rw-r--r-- | app/controllers/workbenches_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/workbenches/index.html.slim | 6 |
2 files changed, 4 insertions, 3 deletions
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 diff --git a/app/views/workbenches/index.html.slim b/app/views/workbenches/index.html.slim index 1bd116a85..ca61d439d 100644 --- a/app/views/workbenches/index.html.slim +++ b/app/views/workbenches/index.html.slim @@ -33,14 +33,14 @@ h3.panel-title.with_actions div = t('.offers.referentials') - span.badge.ml-xs = @workbench.referentials.count if @workbench.all_referentials.any? + span.badge.ml-xs = @referentials.count if @referentials.any? div = link_to '', workbench_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('.offers.see') - - if @workbench.all_referentials.any? + - if @referentials.any? .list-group - - @workbench.all_referentials.each_with_index do |referential, i| + - @referentials.each_with_index do |referential, i| = link_to referential.name, referential_path(referential), class: 'list-group-item' if i < 6 - else |
