harmonize admin header for dashboard view

This commit is contained in:
Lisa Durand 2023-06-19 15:19:58 +02:00
parent 8f777ef587
commit 7ee62a170d
4 changed files with 21 additions and 12 deletions

View file

@ -22,12 +22,21 @@
- if defined?(metadatas)
.metadatas.pb-3
%h1.fr-h6.fr-mb-0= t('created_at', scope: [:layouts, :breadcrumb], number: @procedure.id, date: @procedure.created_at.strftime('%d/%m/%Y'))
%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?
%p.fr-h2= t('closed_at', scope: [:layouts, :breadcrumb], date: @procedure.closed_at.strftime('%d/%m/%Y'))
%p
- if @procedure.locked?
%span.fr-badge.fr-badge--warning
= t('closed_at', scope: [:layouts, :breadcrumb], date: @procedure.closed_at.strftime('%d/%m/%Y'))
- elsif @procedure.locked?
.flex
%span.fr-badge.fr-badge--success.fr-mr-1w
= t('published', scope: [:layouts, :breadcrumb])
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path)
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link"
- else
%span.fr-badge.fr-badge--info
= t('draft', scope: [:layouts, :breadcrumb])

View file

@ -7,7 +7,7 @@ en:
preview: "Preview the form"
continue: "Continue"
continue_title: "You can comeback using this link"
created_at: "Procedure n° %{number} created at %{date}"
created_at: "- n° %{number} created at %{date}"
closed_at: "Closed at %{date}"
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: "Démarche n° %{number}, créée le %{date}"
created_at: "- n° %{number}, créée le %{date}"
closed_at: "Close le %{date}"
published: "Publiée "
draft: "Brouillon"
published: "Publiée"
draft: "En test"

View file

@ -22,7 +22,7 @@ describe 'administrateurs/procedures/show', type: :view do
end
describe 'procedure path is not customized' do
it { expect(rendered).to have_content('Brouillon') }
it { expect(rendered).to have_content('En test') }
end
describe 'archive button' do