remove form previsualisation button from dashboard and improve design action buttons

This commit is contained in:
Lisa Durand 2023-05-31 12:15:53 +02:00
parent c6f13f63b5
commit 6b1c80ebc9
2 changed files with 26 additions and 37 deletions

View file

@ -1,5 +1,5 @@
#breadcrumbs.sub-header #breadcrumbs
.container.flex.justify-between.align-baseline.column .fr-container.flex.justify-between.align-baseline.column
%nav.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } } %nav.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } }
%button.fr-breadcrumb__button{ aria: { expanded: "false", controls: "breadcrumb-1" } } %button.fr-breadcrumb__button{ aria: { expanded: "false", controls: "breadcrumb-1" } }
= t('show', scope: [:layouts, :breadcrumb]) = t('show', scope: [:layouts, :breadcrumb])

View file

@ -1,49 +1,38 @@
.sub-header
= render partial: 'administrateurs/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)], locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
["#{@procedure.libelle.truncate_words(10)}"]], ["#{@procedure.libelle.truncate_words(10)}"]],
metadatas: true } metadatas: true }
.container.procedure-admin-container .fr-container.procedure-admin-container
%ul.fr-btns-group.fr-btns-group--inline-sm.fr-btns-group--icon-left
- if @procedure.draft_revision.valid? - if @procedure.draft_revision.valid?
- if !@procedure.brouillon? - if !@procedure.brouillon?
= link_to admin_procedure_archives_path(@procedure), class: 'button', id: "archive-procedure" do = link_to 'Télécharger', admin_procedure_archives_path(@procedure), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-download-line', id: "archive-procedure"
%span.icon.download
Télécharger
= link_to commencer_dossier_vide_for_revision_path(@procedure.active_revision), target: "_blank", rel: "noopener", class: 'button', id: "pdf-procedure" do = link_to 'PDF', commencer_dossier_vide_for_revision_path(@procedure.active_revision), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-printer-line', id: "pdf-procedure"
%span.icon.printer
PDF
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
%span.icon.preview
Prévisualiser
- if @procedure.brouillon? || @procedure.draft_changed? - if @procedure.brouillon? || @procedure.draft_changed?
= link_to sanitize_url(@procedure_lien_test), target: :blank, rel: :noopener, class: 'button' do = link_to 'Tester la démarche', sanitize_url(@procedure_lien_test), target: :blank, rel: :noopener, class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-edit-line'
%span.icon.in-progress
Tester
- if @procedure.publiee? || @procedure.brouillon? - if @procedure.publiee? || @procedure.brouillon?
= link_to admin_procedure_transfert_path(@procedure), class: 'button' do = link_to 'Envoyer une copie', admin_procedure_transfert_path(@procedure), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-arrow-right-up-line'
%span.icon.reply
Envoyer une copie
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee? - if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." } = link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'fr-btn fr-btn--primary fr-btn--icon-left fr-icon-success-line', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
- if (@procedure.close? || @procedure.depubliee?) && !@procedure.draft_changed? - if (@procedure.close? || @procedure.depubliee?) && !@procedure.draft_changed?
= link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." } = link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'fr-btn fr-btn--primary fr-btn--icon-left fr-icon-success-line', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
- if @procedure.locked? && !@procedure.close? - if @procedure.locked? && !@procedure.close?
= link_to admin_procedure_archive_path(procedure_id: @procedure.id), method: :put, class: 'button', id: "close-procedure-link", data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."} do = link_to 'Clore', admin_procedure_archive_path(procedure_id: @procedure.id), method: :put, class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-archive-line', id: "close-procedure-link", data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."}
%span.icon.archive
Clore
.container
.fr-container
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision) = render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)
- if @procedure.draft_changed? - if @procedure.draft_changed?
.container .fr-container
.card.featured .card.featured
.card-title .card-title
= t(:has_changes, scope: [:administrateurs, :revision_changes]) = t(:has_changes, scope: [:administrateurs, :revision_changes])
@ -54,7 +43,7 @@
- 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 }
.container .fr-container
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication %h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication
.fr-grid-row.fr-grid-row--gutters .fr-grid-row.fr-grid-row--gutters
= render Procedure::Card::PresentationComponent.new(procedure: @procedure) = render Procedure::Card::PresentationComponent.new(procedure: @procedure)