Add accompagnateur tab on all procedure navbar

This commit is contained in:
Xavier J 2016-05-20 15:36:38 +02:00
parent 143a683303
commit fe4d921997
4 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,11 @@
class Admin::AccompagnateursController < AdminController
before_action :retrieve_procedure
def show
end
def update
end
end

View 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

View file

@ -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', '#')

View file

@ -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