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
613f2a0f5e
6 changed files with 33 additions and 19 deletions
|
@ -22,12 +22,24 @@
|
||||||
|
|
||||||
- if defined?(metadatas)
|
- if defined?(metadatas)
|
||||||
.metadatas.pb-3
|
.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?
|
- if @procedure.close?
|
||||||
%p.fr-h2= t('closed_at', scope: [:layouts, :breadcrumb], date: @procedure.closed_at.strftime('%d/%m/%Y'))
|
.flex
|
||||||
%p
|
%span.fr-badge.fr-badge--warning.fr-mr-1w
|
||||||
- if @procedure.locked?
|
= t('closed', scope: [:layouts, :breadcrumb])
|
||||||
= t('published', scope: [:layouts, :breadcrumb])
|
= t('since', scope: [:layouts, :breadcrumb], date: l(@procedure.closed_at.to_date))
|
||||||
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path)
|
|
||||||
- else
|
- elsif @procedure.locked?
|
||||||
= t('draft', scope: [:layouts, :breadcrumb])
|
= 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])
|
||||||
|
= 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?
|
- if !@procedure.procedure_expires_when_termine_enabled?
|
||||||
= render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }
|
= render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }
|
||||||
.fr-container
|
.fr-container
|
||||||
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication
|
%h2= "Gestion de la démarche № #{@procedure.id}"
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
%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::PresentationComponent.new(procedure: @procedure)
|
||||||
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if Rails.application.config.ds_zonage_enabled
|
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if Rails.application.config.ds_zonage_enabled
|
||||||
= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
|
= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
|
||||||
|
@ -54,8 +55,8 @@
|
||||||
= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
|
= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
|
||||||
= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
|
= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
|
||||||
|
|
||||||
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Pour aller plus loin
|
%h3.fr-h6 Pour aller plus loin
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
.fr-grid-row.fr-grid-row--gutters.fr-mb-5w
|
||||||
= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
|
= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
|
||||||
= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
|
= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
|
||||||
= render Procedure::Card::EmailsComponent.new(procedure: @procedure)
|
= render Procedure::Card::EmailsComponent.new(procedure: @procedure)
|
||||||
|
|
|
@ -7,7 +7,7 @@ en:
|
||||||
preview: "Preview the form"
|
preview: "Preview the form"
|
||||||
continue: "Continue"
|
continue: "Continue"
|
||||||
continue_title: "You can comeback using this link"
|
continue_title: "You can comeback using this link"
|
||||||
created_at: "Procedure n° %{number} created at %{date}"
|
since: "since %{date}"
|
||||||
closed_at: "Closed at %{date}"
|
closed: "Closed"
|
||||||
published: "Published"
|
published: "Published"
|
||||||
draft: "Draft"
|
draft: "Draft"
|
||||||
|
|
|
@ -7,7 +7,7 @@ fr:
|
||||||
preview: "Prévisualiser le formulaire"
|
preview: "Prévisualiser le formulaire"
|
||||||
continue: "Continuer"
|
continue: "Continuer"
|
||||||
continue_title: "Vous pourrez revenir ici par la suite"
|
continue_title: "Vous pourrez revenir ici par la suite"
|
||||||
created_at: "Démarche n° %{number}, créée le %{date}"
|
since: "depuis le %{date}"
|
||||||
closed_at: "Close le %{date}"
|
closed: "Close"
|
||||||
published: "Publiée – "
|
published: "Publiée"
|
||||||
draft: "Brouillon"
|
draft: "En test"
|
||||||
|
|
|
@ -7,6 +7,7 @@ describe 'Creating a new procedure', js: true do
|
||||||
let(:procedure) do
|
let(:procedure) do
|
||||||
create(:procedure, :with_service, :with_instructeur,
|
create(:procedure, :with_service, :with_instructeur,
|
||||||
aasm_state: :publiee,
|
aasm_state: :publiee,
|
||||||
|
published_at: Date.today,
|
||||||
administrateurs: [administrateur],
|
administrateurs: [administrateur],
|
||||||
libelle: 'libellé de la procédure',
|
libelle: 'libellé de la procédure',
|
||||||
path: 'libelle-de-la-procedure')
|
path: 'libelle-de-la-procedure')
|
||||||
|
|
|
@ -22,7 +22,7 @@ describe 'administrateurs/procedures/show', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'procedure path is not customized' do
|
describe 'procedure path is not customized' do
|
||||||
it { expect(rendered).to have_content('Brouillon') }
|
it { expect(rendered).to have_content('En test') }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'archive button' do
|
describe 'archive button' do
|
||||||
|
|
Loading…
Reference in a new issue