Add accompagnateur tab on all procedure navbar
This commit is contained in:
parent
143a683303
commit
fe4d921997
4 changed files with 28 additions and 0 deletions
11
app/controllers/admin/accompagnateurs_controller.rb
Normal file
11
app/controllers/admin/accompagnateurs_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class Admin::AccompagnateursController < AdminController
|
||||
before_action :retrieve_procedure
|
||||
|
||||
def show
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
end
|
||||
end
|
9
app/views/admin/accompagnateurs/show.html.haml
Normal file
9
app/views/admin/accompagnateurs/show.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
%h2.text-info
|
||||
=@procedure.libelle
|
||||
%br
|
||||
|
||||
%ul.nav.nav-tabs
|
||||
= render partial: 'admin/procedures/navbar', locals: {active: 'Accompagnateurs'}
|
||||
|
||||
#accompagnateur_form
|
||||
plop
|
|
@ -1,6 +1,9 @@
|
|||
%li{ class: ('active' if active == 'Informations') }
|
||||
= link_to('Informations', admin_procedure_path(@procedure))
|
||||
|
||||
%li{ class: ('active' if active == 'Accompagnateurs') }
|
||||
= link_to('Accompagnateurs', admin_procedure_accompagnateurs_path(@procedure))
|
||||
|
||||
%li{ class: ('disabled' if @procedure.locked?) || ('active' if active == 'Description') }
|
||||
= link_to_unless(@procedure.locked?, 'Description', edit_admin_procedure_path(@procedure)) do
|
||||
= link_to('Description', '#')
|
||||
|
|
|
@ -80,6 +80,7 @@ Rails.application.routes.draw do
|
|||
get 'sign_in' => '/administrateurs/sessions#new'
|
||||
get 'procedures/archived' => 'procedures#archived'
|
||||
get 'profile' => 'profile#show', as: :profile
|
||||
|
||||
resources :procedures do
|
||||
resource :types_de_champ, only: [:show, :update] do
|
||||
post '/:index/move_up' => 'types_de_champ#move_up', as: :move_up
|
||||
|
@ -88,10 +89,14 @@ Rails.application.routes.draw do
|
|||
|
||||
put 'archive' => 'procedures#archive', as: :archive
|
||||
|
||||
resource :accompagnateurs, only: [:show, :update]
|
||||
|
||||
resources :types_de_champ, only: [:destroy]
|
||||
resource :pieces_justificatives, only: [:show, :update]
|
||||
resources :pieces_justificatives, only: :destroy
|
||||
end
|
||||
|
||||
|
||||
resources :gestionnaires, only: [:index, :create, :destroy]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue