2018-04-20 12:03:02 +02:00
|
|
|
#services-index.container
|
|
|
|
%h1 Choix du service pour la procédure
|
|
|
|
|
|
|
|
= form_for @procedure, url: { controller: "new_administrateur/services", action: :add_to_procedure } , html: { class: 'form' } do |f|
|
|
|
|
= f.label :service_id, "La procédure #{@procedure.libelle} est affectée au service"
|
|
|
|
= 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-19 15:59:11 +02:00
|
|
|
= link_to('Nouveau service', new_service_path(procedure_id: params[: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-19 15:59:11 +02:00
|
|
|
= link_to('modifier', edit_service_path(service, procedure_id: params[:procedure_id]))
|