2018-04-24 10:07:20 +02:00
|
|
|
= render partial: 'new_administrateur/breadcrumbs',
|
2018-11-27 16:20:55 +01:00
|
|
|
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
2018-04-24 10:07:20 +02:00
|
|
|
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
|
|
|
'choix du service'] }
|
|
|
|
|
2018-04-20 12:03:02 +02:00
|
|
|
#services-index.container
|
2018-09-05 14:48:42 +02:00
|
|
|
%h1 Choix du service pour la démarche
|
2018-04-20 12:03:02 +02:00
|
|
|
|
|
|
|
= form_for @procedure, url: { controller: "new_administrateur/services", action: :add_to_procedure } , html: { class: 'form' } do |f|
|
2018-09-05 14:48:42 +02:00
|
|
|
= f.label :service_id, "La démarche #{@procedure.libelle} est affectée au service"
|
2018-04-20 12:03:02 +02:00
|
|
|
= f.select :service_id,
|
|
|
|
current_administrateur.services.map { |s| [ s.nom, s.id ] },
|
|
|
|
{ prompt: 'choisir un service', selected: @procedure.service&.id },
|
|
|
|
required: true
|
|
|
|
|
|
|
|
= f.hidden_field :id
|
|
|
|
= f.submit 'valider', class: 'button primary'
|
|
|
|
|
2018-04-19 16:15:44 +02:00
|
|
|
%h1 Liste des Services
|
|
|
|
|
2018-04-19 18:12:48 +02:00
|
|
|
%table.table.table-service.hoverable
|
2018-04-19 16:15:44 +02:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th
|
|
|
|
nom
|
2018-04-19 18:12:48 +02:00
|
|
|
%th.change
|
2018-04-24 10:07:20 +02:00
|
|
|
= link_to('Nouveau service', new_service_path(procedure_id: @procedure.id), class: 'button')
|
2018-04-19 16:15:44 +02:00
|
|
|
|
|
|
|
%tbody
|
|
|
|
- @services.each do |service|
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= service.nom
|
2018-04-19 18:12:48 +02:00
|
|
|
%td.change
|
2018-04-24 10:07:20 +02:00
|
|
|
= link_to('modifier', edit_service_path(service, procedure_id: @procedure.id))
|
2018-04-23 15:32:27 +02:00
|
|
|
= link_to 'supprimer',
|
2018-04-24 10:07:20 +02:00
|
|
|
service_path(service, procedure_id: @procedure.id),
|
2018-04-23 15:32:27 +02:00
|
|
|
method: :delete,
|
|
|
|
data: { confirm: "Confirmez vous la suppression de #{service.nom}" }
|