2021-11-25 16:26:55 +01:00
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2022-08-17 13:53:07 +02:00
|
|
|
locals: { steps: [['Démarches', admin_procedures_path],
|
2022-09-09 13:08:24 +02:00
|
|
|
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
|
2024-05-22 16:12:48 +02:00
|
|
|
['Service']] }
|
2018-04-24 10:07:20 +02:00
|
|
|
|
2024-05-22 16:12:48 +02:00
|
|
|
#services-index.fr-container
|
|
|
|
%h1.fr-h2 Service
|
2018-04-19 16:15:44 +02:00
|
|
|
|
2024-05-22 16:12:48 +02:00
|
|
|
.fr-table.fr-table--layout-fixed
|
|
|
|
%table
|
|
|
|
%caption Liste des services pouvant être affectés à la démarche
|
|
|
|
%thead
|
2018-04-19 16:15:44 +02:00
|
|
|
%tr
|
2024-05-22 16:12:48 +02:00
|
|
|
%th{ scope: "col" }
|
|
|
|
Nom
|
|
|
|
%th.change{ scope: "col" }
|
|
|
|
= link_to "Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn fr-btn--secondary"
|
|
|
|
|
|
|
|
%tbody
|
|
|
|
- @services.each do |service|
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= service.nom
|
|
|
|
%td.change
|
|
|
|
- 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'
|
|
|
|
|
2024-05-27 17:56:05 +02:00
|
|
|
= render Procedure::FixedFooterComponent.new(procedure: @procedure)
|