[#10799] Add warning badges when token is expiring
This commit is contained in:
parent
ec2c913ab4
commit
2bf773b0b7
4 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,11 @@
|
|||
- elsif @procedure.locked?
|
||||
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link"
|
||||
.flex.fr-mt-1w
|
||||
|
||||
- if @procedure.api_entreprise_token_expired_or_expires_soon?
|
||||
%span.fr-badge.fr-badge--warning.fr-mr-1w
|
||||
= t('to_modify', scope: [:layouts, :breadcrumb])
|
||||
|
||||
%span.fr-badge.fr-badge--success.fr-mr-1w
|
||||
= t('published', scope: [:layouts, :breadcrumb])
|
||||
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.published_at.to_date))
|
||||
|
|
|
@ -54,11 +54,15 @@
|
|||
|
||||
.text-right
|
||||
%p.fr-mb-0.width-max-content N° #{number_with_html_delimiter(procedure.id)}
|
||||
|
||||
- if procedure.close? || procedure.depubliee?
|
||||
%span.fr-badge.fr-badge--sm.fr-badge--warning
|
||||
= t('closed', scope: [:layouts, :breadcrumb])
|
||||
|
||||
- elsif procedure.publiee?
|
||||
- if procedure.api_entreprise_token_expired_or_expires_soon?
|
||||
%span.fr-badge.fr-badge--sm.fr-badge--warning
|
||||
= t('to_modify', scope: [:layouts, :breadcrumb])
|
||||
%span.fr-badge.fr-badge--sm.fr-badge--success
|
||||
= t('published', scope: [:layouts, :breadcrumb])
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ en:
|
|||
closed: "Closed"
|
||||
published: "Published"
|
||||
draft: "Draft"
|
||||
to_modify: "To modify"
|
||||
more_info_on_test: "For more information on test stage"
|
||||
go_to_FAQ: "read FAQ"
|
||||
url_FAQ: "/faq#accordion-administrateur-2"
|
||||
|
|
|
@ -11,6 +11,7 @@ fr:
|
|||
closed: "Close"
|
||||
published: "Publiée"
|
||||
draft: "En test"
|
||||
to_modify: "À modifier"
|
||||
more_info_on_test: "Pour plus d’information sur la phase de test"
|
||||
go_to_FAQ: "consulter la FAQ"
|
||||
url_FAQ: "/faq#accordion-administrateur-2"
|
||||
|
|
Loading…
Reference in a new issue