2021-11-25 16:26:55 +01:00
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2018-11-27 16:20:55 +01:00
|
|
|
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
2022-05-11 12:19:48 +02:00
|
|
|
link_to(@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)),
|
|
|
|
'Choix du service'] }
|
2018-04-24 10:07:20 +02:00
|
|
|
|
2018-04-20 12:03:02 +02:00
|
|
|
#services-index.container
|
2018-04-19 16:15:44 +02:00
|
|
|
%h1 Liste des Services
|
|
|
|
|
2022-08-18 10:30:37 +02:00
|
|
|
%table.fr-table.width-100.mt-3
|
|
|
|
%caption La démarche “#{@procedure.libelle}” peut être affectée aux services dans la liste ci-dessous
|
2018-04-19 16:15:44 +02:00
|
|
|
%thead
|
|
|
|
%tr
|
2022-08-18 10:30:37 +02:00
|
|
|
%th{ scope: "col" }
|
2022-08-17 17:55:10 +02:00
|
|
|
Nom
|
2022-08-18 10:30:37 +02:00
|
|
|
%th.change{ scope: "col" }
|
|
|
|
= render Dsfr::ButtonComponent.new(label: "Nouveau service", url: new_admin_service_path(procedure_id: @procedure.id), class_names: ['fr-btn--secondary'])
|
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
|
2022-08-17 17:55:10 +02:00
|
|
|
- if @procedure.service == service
|
|
|
|
%strong.mr-2 (Assigné)
|
|
|
|
- else
|
|
|
|
= button_to "Assigner", add_to_procedure_admin_services_path(procedure: { id: @procedure.id, service_id: service.id, }), method: :patch, class: 'link mr-2', form_class: 'inline'
|
|
|
|
= link_to('Modifier', edit_admin_service_path(service, procedure_id: @procedure.id), class: 'link my-2')
|
|
|
|
- if @procedure.service != service
|
|
|
|
= link_to 'Supprimer',
|
|
|
|
admin_service_path(service, procedure_id: @procedure.id),
|
|
|
|
method: :delete,
|
|
|
|
data: { confirm: "Confirmez vous la suppression de #{service.nom}" },
|
|
|
|
class: 'btn btn-link ml-2'
|