Merge pull request #9210 from demarches-simplifiees/design-harmonize-header-admin
[design ADMIN] Mettre le libellé de la procédure en h1 et harmoniser le header
This commit is contained in:
commit
34609ffffe
6 changed files with 33 additions and 19 deletions
|
@ -22,12 +22,24 @@
|
|||
|
||||
- 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
|
||||
|
||||
- if @procedure.close?
|
||||
%p.fr-h2= t('closed_at', scope: [:layouts, :breadcrumb], date: @procedure.closed_at.strftime('%d/%m/%Y'))
|
||||
%p
|
||||
- if @procedure.locked?
|
||||
.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?
|
||||
= 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)
|
||||
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.published_at.to_date))
|
||||
|
||||
- else
|
||||
.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))
|
||||
|
|
|
@ -44,8 +44,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)
|
||||
|
@ -54,8 +55,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)
|
||||
|
|
|
@ -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}"
|
||||
closed_at: "Closed at %{date}"
|
||||
since: "since %{date}"
|
||||
closed: "Closed"
|
||||
published: "Published"
|
||||
draft: "Draft"
|
||||
|
|
|
@ -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}"
|
||||
closed_at: "Close le %{date}"
|
||||
published: "Publiée – "
|
||||
draft: "Brouillon"
|
||||
since: "depuis le %{date}"
|
||||
closed: "Close"
|
||||
published: "Publiée"
|
||||
draft: "En test"
|
||||
|
|
|
@ -7,6 +7,7 @@ describe 'Creating a new procedure', js: true do
|
|||
let(:procedure) do
|
||||
create(:procedure, :with_service, :with_instructeur,
|
||||
aasm_state: :publiee,
|
||||
published_at: Date.today,
|
||||
administrateurs: [administrateur],
|
||||
libelle: 'libellé de la procédure',
|
||||
path: 'libelle-de-la-procedure')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue