change date with status + add a title on the page regarding to Olivier Figma

This commit is contained in:
Lisa Durand 2023-06-22 15:38:49 +02:00
parent 7ee62a170d
commit 87347d34c6
4 changed files with 20 additions and 16 deletions

View file

@ -24,19 +24,22 @@
.metadatas.pb-3
%h1.fr-h6.fr-mb-1w
= @procedure.libelle
%span.fr-text--sm
= t('created_at', scope: [:layouts, :breadcrumb], number: @procedure.id, date: @procedure.created_at.strftime('%d/%m/%Y'))
- if @procedure.close?
%span.fr-badge.fr-badge--warning
= t('closed_at', scope: [:layouts, :breadcrumb], date: @procedure.closed_at.strftime('%d/%m/%Y'))
.flex
%span.fr-badge.fr-badge--warning.fr-mr-1w
= t('closed', scope: [:layouts, :breadcrumb])
= t('since', scope: [:layouts, :breadcrumb], date: l(@procedure.closed_at.to_date))
- elsif @procedure.locked?
.flex
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link"
.flex.fr-mt-1w
%span.fr-badge.fr-badge--success.fr-mr-1w
= t('published', scope: [:layouts, :breadcrumb])
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link"
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.published_at.to_date))
- else
%span.fr-badge.fr-badge--info
= t('draft', scope: [:layouts, :breadcrumb])
.flex
%span.fr-badge.fr-badge--new.fr-mr-1w
= t('draft', scope: [:layouts, :breadcrumb])
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.created_at.to_date))

View file

@ -43,8 +43,9 @@
- if !@procedure.procedure_expires_when_termine_enabled?
= render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }
.fr-container
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication
.fr-grid-row.fr-grid-row--gutters
%h2= "Gestion de la démarche № #{@procedure.id}"
%h3.fr-h6 Indispensable avant publication
.fr-grid-row.fr-grid-row--gutters.fr-mb-5w
= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if Rails.application.config.ds_zonage_enabled
= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
@ -53,8 +54,8 @@
= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Pour aller plus loin
.fr-grid-row.fr-grid-row--gutters
%h3.fr-h6 Pour aller plus loin
.fr-grid-row.fr-grid-row--gutters.fr-mb-5w
= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
= render Procedure::Card::EmailsComponent.new(procedure: @procedure)

View file

@ -7,7 +7,7 @@ en:
preview: "Preview the form"
continue: "Continue"
continue_title: "You can comeback using this link"
created_at: "- n° %{number} created at %{date}"
closed_at: "Closed at %{date}"
since: "since %{date}"
closed: "Closed"
published: "Published"
draft: "Draft"

View file

@ -7,7 +7,7 @@ fr:
preview: "Prévisualiser le formulaire"
continue: "Continuer"
continue_title: "Vous pourrez revenir ici par la suite"
created_at: "- n° %{number}, créée le %{date}"
closed_at: "Close le %{date}"
since: "depuis le %{date}"
closed: "Close"
published: "Publiée"
draft: "En test"