2022-12-01 19:59:34 +01:00
|
|
|
%tr.procedure{ id: "procedure_#{procedure.id}" }
|
|
|
|
%td
|
2023-01-06 17:53:20 +01:00
|
|
|
- title = show_detail ? 'Cacher les détails de la démarche' : 'Afficher les détails de la démarche'
|
|
|
|
- icon = show_detail ? 'fr-icon-subtract-line' : 'fr-icon-add-line'
|
|
|
|
- params = show_detail ? {} : { show_detail: true }
|
|
|
|
= button_to detail_admin_procedure_path(procedure["id"]), method: :post, params:, title:, class: [icon, "fr-icon--sm fr-mr-1w fr-mb-1w fr-text-action-high--blue-france fr-btn fr-btn--tertiary-no-outline" ] do
|
|
|
|
= title
|
|
|
|
|
2022-12-01 19:59:34 +01:00
|
|
|
%td= procedure.libelle
|
|
|
|
%td= procedure.id
|
|
|
|
%td= procedure.administrateurs.count
|
|
|
|
%td= t procedure.aasm_state, scope: 'activerecord.attributes.procedure.aasm_state'
|
|
|
|
%td= l(procedure.published_at, format: :message_date_without_time)
|
2023-02-02 06:59:46 +01:00
|
|
|
%td= link_to('Cloner', admin_procedure_clone_path(procedure.id, from_new_from_existing: true), 'data-method' => :put, class: 'fr-btn fr-btn--tertiary fr-btn--sm')
|
|
|
|
|
2022-12-01 19:59:34 +01:00
|
|
|
|
|
|
|
- if show_detail
|
|
|
|
%tr.procedure{ id: "procedure_detail_#{procedure.id}" }
|
2023-02-09 12:43:03 +01:00
|
|
|
%td.fr-highlight--beige-gris-galet{ colspan: '7' }
|
2022-12-01 19:59:34 +01:00
|
|
|
.fr-container
|
|
|
|
.fr-grid-row
|
|
|
|
.fr-col-6
|
|
|
|
- procedure.zones.uniq.each do |zone|
|
|
|
|
= zone.label_at(procedure.published_or_created_at)
|
|
|
|
.fr-col-6
|
|
|
|
- procedure.administrateurs.uniq.each do |admin|
|
|
|
|
= admin.email
|