demarches-normaliennes/app/views/shared/_procedure_description.html.haml

82 lines
3.5 KiB
Text
Raw Normal View History

.procedure-logos
- procedure_logo_alt = ''
- if procedure.service.present?
- procedure_logo_alt = "#{procedure.service.nom} #{procedure.service.organisme}"
= image_tag procedure.logo_url, alt: procedure_logo_alt
- if procedure.euro_flag
2019-09-24 16:38:58 +02:00
= image_tag("flag_of_europe.svg", id: 'euro_flag', class: (!procedure.euro_flag ? "hidden" : ""))
%h1.fr-h2
= procedure.libelle
- if procedure.persisted? && procedure.estimated_duration_visible?
%p
%small
%span.fr-icon-timer-line
= t('shared.procedure_description.estimated_fill_duration', estimated_minutes: estimated_fill_duration_minutes(procedure))
- if procedure.auto_archive_on
%p
%small
%span.fr-icon-calendar-line
Date limite : #{procedure_auto_archive_datetime(procedure)}.
= yield
- unless @no_description
.fr-accordions-group
%section.fr-accordion
%h2.fr-accordion__title
%button.fr-accordion__btn{ "aria-controls" => "accordion-114", "aria-expanded" => "true" }
= t('activerecord.attributes.procedure.description')
#accordion-114.fr-collapse
= h render SimpleFormatComponent.new(procedure.description, allow_a: true)
- if procedure.description_target_audience.present?
%section.fr-accordion
%h2.fr-accordion__title
%button.fr-accordion__btn{ "aria-controls" => "accordion-115", "aria-expanded" => "false" }
= t('activerecord.attributes.procedure.description_target_audience')
#accordion-115.fr-collapse
= h render SimpleFormatComponent.new(procedure.description_target_audience, allow_a: true)
- if procedure.description_pj.present?
%section.fr-accordion.pieces_jointes
%h2.fr-accordion__title
%button.fr-accordion__btn{ "aria-controls" => "accordion-116", "aria-expanded" => "false" }
= t('shared.procedure_description.pieces_jointes')
#accordion-116.fr-collapse
= h render SimpleFormatComponent.new(procedure.description_pj, allow_a: true)
- elsif procedure.pieces_jointes_list?
%section.fr-accordion.pieces_jointes
%h2.fr-accordion__title
%button.fr-accordion__btn{ "aria-controls" => "accordion-116", "aria-expanded" => "false" }
= t('shared.procedure_description.pieces_jointes')
#accordion-116.fr-collapse
- if procedure.pieces_jointes_list_without_conditionnal.present?
%ul
- procedure.pieces_jointes_list_without_conditionnal.each do |pj|
%li
= pj.libelle
2023-06-15 14:33:13 +02:00
= t('utils.no_mandatory') if !pj.mandatory?
- if procedure.pieces_jointes_list_with_conditionnal.present?
%h3.fr-text--sm.fr-mb-0.fr-mt-2w
= t('shared.procedure_description.pieces_jointes_conditionnal_list_title')
%ul
- procedure.pieces_jointes_list_with_conditionnal.each do |pj|
%li
= pj.libelle
2023-06-15 14:33:13 +02:00
= t('utils.no_mandatory') if !pj.mandatory?
- if procedure.persisted? && procedure.estimated_duration_visible?
%section.fr-accordion
%h2.fr-accordion__title
%button.fr-accordion__btn{ "aria-controls" => "accordion-117", "aria-expanded" => "false" }
= t('shared.procedure_description.estimated_fill_duration_title')
#accordion-117.fr-collapse
= t('shared.procedure_description.estimated_fill_duration_detail', estimated_minutes: estimated_fill_duration_minutes(procedure))
.fr-my-3w
= render Procedure::NoticeComponent.new(procedure:)