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
This commit is contained in:
parent
89244407be
commit
725521c3a1
9 changed files with 101 additions and 81 deletions
|
@ -1,14 +1,25 @@
|
|||
- if dossier.expirable? && 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')
|
||||
-# 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")
|
||||
|
||||
- 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'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
= t('views.users.dossiers.show.header.dossier_number', dossier_id: dossier.id)
|
||||
= t('views.users.dossiers.show.header.created_date', date_du_dossier: I18n.l(dossier.created_at))
|
||||
|
||||
= render(partial: 'shared/dossiers/short_expires_message', locals: {dossier: dossier})
|
||||
= render(partial: 'shared/dossiers/expiration_banner', locals: {dossier: dossier})
|
||||
|
||||
.header-actions
|
||||
- if current_user.owns?(dossier)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
- if dossier.expirable?
|
||||
%p.expires_at
|
||||
%small= t("shared.dossiers.header.expires_at.#{dossier.state}", date: safe_expiration_date(dossier))
|
||||
- else
|
||||
%p.expires_at_en_instruction
|
||||
%small= t("shared.dossiers.header.expires_at.en_instruction")
|
||||
|
||||
|
||||
= render(partial: 'shared/dossiers/expiration_banner', locals: {dossier: dossier})
|
Loading…
Add table
Add a link
Reference in a new issue