Set navbar options from before_action
This commit is contained in:
parent
e9eeb0b4ba
commit
3627a18420
3 changed files with 8 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||
before_action :set_layout_options
|
||||
respond_to :html, :xlsx, :ods, :csv
|
||||
|
||||
def index
|
||||
super
|
||||
@options = ["dossiers/download_dossiers"]
|
||||
dossiers_list_facade.service.filter_procedure_reset!
|
||||
end
|
||||
|
||||
|
@ -131,6 +131,10 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
|||
|
||||
private
|
||||
|
||||
def set_layout_options
|
||||
@navbar_options = ["dossiers/download_dossiers"]
|
||||
end
|
||||
|
||||
def create_dossier_facade dossier_id
|
||||
@facade = DossierFacades.new dossier_id, current_gestionnaire.email
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
Start UP region ile de france (8 dossiers en cours)
|
||||
%div.col-lg-3.col-md-3.options
|
||||
%div.row
|
||||
- if @options
|
||||
- @options.each do |option|
|
||||
- if @navbar_options
|
||||
- @navbar_options.each do |option|
|
||||
%div.col-lg-12.col-md-12
|
||||
= render partial: option
|
||||
%div.col-lg-1.col-md-1.log-options
|
||||
|
|
Loading…
Reference in a new issue