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
|
2024-01-30 11:16:24 +01:00
|
|
|
%td
|
|
|
|
- if procedure.template
|
2024-05-21 11:56:50 +02:00
|
|
|
%p.fr-badge.fr-badge--info.fr-badge--sm= "Modèle"
|
|
|
|
%abbr{ title: APPLICATION_NAME }= acronymize(APPLICATION_NAME)
|
2024-01-30 11:16:24 +01:00
|
|
|
= procedure.libelle
|
2022-12-01 19:59:34 +01:00
|
|
|
%td= procedure.id
|
2023-01-03 14:58:46 +01:00
|
|
|
%td= procedure.estimated_dossiers_count
|
2024-05-21 11:56:50 +02:00
|
|
|
%td
|
|
|
|
- if procedure.respond_to?(:parsed_latest_zone_labels)
|
|
|
|
- procedure.parsed_latest_zone_labels.uniq.each do |zone_label|
|
|
|
|
%span.mb-2= zone_label
|
|
|
|
.mb-2
|
|
|
|
- else
|
|
|
|
- procedure.zones.uniq.each do |zone|
|
|
|
|
%span= zone.current_label
|
|
|
|
.mb-1
|
|
|
|
|
2022-12-01 19:59:34 +01:00
|
|
|
%td= t procedure.aasm_state, scope: 'activerecord.attributes.procedure.aasm_state'
|
2023-02-24 17:45:01 +01:00
|
|
|
%td= l(procedure.published_at, format: :message_date_without_time) if procedure.published_at
|
2023-05-03 10:48:44 +02:00
|
|
|
%td
|
|
|
|
= link_to('Consulter', apercu_admin_procedure_path(procedure.id), target: "_blank", class: 'fr-btn fr-btn--tertiary fr-btn--sm fr-mb-1w', title: new_tab_suffix('Aperçu de la démarche'))
|
|
|
|
= 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}" }
|
2024-06-05 13:52:18 +02:00
|
|
|
%td.fr-highlight--green-emeraude{ colspan: '8' }
|
2022-12-01 19:59:34 +01:00
|
|
|
.fr-container
|
2024-05-21 11:56:50 +02:00
|
|
|
.fr-col-6
|
|
|
|
- procedure.administrateurs.uniq.each do |admin|
|
|
|
|
= admin.email
|