34 lines
1.4 KiB
Text
34 lines
1.4 KiB
Text
= render partial: 'administrateurs/breadcrumbs',
|
|
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
|
link_to(@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)),
|
|
'Choix du service'] }
|
|
|
|
#services-index.container
|
|
%h1 Liste des Services
|
|
%h2 La démarche #{@procedure.libelle} peut être affectée aux services dans la liste ci-dessous
|
|
|
|
%table.table.table-service.hoverable
|
|
%thead
|
|
%tr
|
|
%th
|
|
Nom
|
|
%th.change
|
|
= link_to('Nouveau service', new_admin_service_path(procedure_id: @procedure.id), class: 'button')
|
|
|
|
%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'
|