demarches-normaliennes/app/views/administrateurs/services/index.html.haml

40 lines
1.4 KiB
Text
Raw Normal View History

= render partial: 'administrateurs/breadcrumbs',
2018-11-27 16:20:55 +01:00
locals: { steps: [link_to('Démarches', admin_procedures_path),
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-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: "administrateurs/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,
@services.map { |s| [ s.nom, s.id ] },
2018-04-20 12:03:02 +02:00
{ 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
= link_to('Nouveau service', new_admin_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
= link_to('modifier', edit_admin_service_path(service, procedure_id: @procedure.id))
2018-04-23 15:32:27 +02:00
= link_to 'supprimer',
admin_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}" }