demarches-normaliennes/app/views/new_administrateur/groupe_instructeurs/show.html.haml

49 lines
1.8 KiB
Text
Raw Normal View History

2019-10-23 20:22:56 +02:00
= render partial: 'new_administrateur/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to('Groupes dinstructeurs', procedure_groupe_instructeurs_path(@procedure)),
@groupe_instructeur.label] }
.container.groupe-instructeur
2019-10-24 22:09:54 +02:00
%h1 Groupe « #{@groupe_instructeur.label} »
2019-10-23 20:22:56 +02:00
2019-10-23 20:54:59 +02:00
.card.mt-2
= form_for @groupe_instructeur,
url: procedure_groupe_instructeur_path(@procedure, @groupe_instructeur),
html: { class: 'form' } do |f|
= f.label :label, 'Nom du groupe'
= f.text_field :label, placeholder: 'Ville de Bordeaux', required: true
= f.submit 'Renommer', class: 'button primary send'
2019-10-23 20:22:56 +02:00
.card
.card-title Gestion des instructeurs
2019-10-10 19:36:56 +02:00
= form_for :instructeur,
url: { action: :add_instructeur },
html: { class: 'form' } do |f|
.instructeur-wrapper
= select_tag :emails,
options_for_select(@available_instructeur_emails),
multiple: true,
class: 'select-instructeurs select2-limited'
2019-10-10 19:36:56 +02:00
= f.submit 'Affecter', class: 'button primary send'
2019-10-23 20:22:56 +02:00
%table.table.mt-2
%thead
%tr
%th{ colspan: 2 } Instructeurs affectés
%tbody
- @instructeurs.each do |instructeur|
%tr
%td= instructeur.email
2019-10-09 18:23:29 +02:00
%td.actions= button_to 'retirer',
{ action: :remove_instructeur },
{ method: :delete,
data: { confirm: "Êtes-vous sûr de vouloir retirer linstructeur « #{instructeur.email} » du groupe  « #{@groupe_instructeur.label} » ?" },
params: { instructeur: { id: instructeur.id }},
class: 'button' }
2019-10-23 20:22:56 +02:00
= paginate @instructeurs