demarches-normaliennes/app/views/shared/dossiers/_expiration_banner.html.haml
Martin 725521c3a1 fix(expiration_banner): only show expirations info when flip is enabled
fix(lint): lint haml

fix(spec): enable flipper and allow procedure to receive flipper check when checking banner presence

fix(doc): add missing documentation on readme regarding system testing with a visual feedback

fix(typo): add missing accent

clean(PR): feedback from Tchak, better to wrap feature check for expirability by procedure within dossier.expirable? helper
2021-11-30 16:05:32 +01:00

25 lines
945 B
Text

-# small expires mention
- if dossier.expirable?
%p.expires_at
%small= t("shared.dossiers.header.expires_at.#{dossier.state}", date: safe_expiration_date(dossier))
-# big banner warning
- if dossier.close_to_expiration?
.card.warning.mt-2.mb-3
.card-title= t('shared.dossiers.header.banner.title')
%p
- if dossier.brouillon?
= t('shared.dossiers.header.banner.states.brouillon')
- elsif dossier.en_construction?
= t('shared.dossiers.header.banner.states.en_construction')
- elsif dossier.termine?
= t('shared.dossiers.header.banner.states.termine')
- if dossier.expiration_can_be_extended?
%br
= button_to t('shared.dossiers.header.banner.button_delay_expiration'), users_dossier_repousser_expiration_path(dossier), class: 'button secondary mt-2'
- else
%p.expires_at_en_instruction
%small= t("shared.dossiers.header.expires_at.en_instruction")