-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9653 from demarches-simplifiees/fix-close-procedu…
…re-page [Fix] ETQ admin, je souhaite associer une démarche existante depuis le bouton "clore" du tableau de bord de la démarche
- Loading branch information
Showing
7 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
= render partial: 'administrateurs/breadcrumbs', | ||
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)], | ||
["#{@procedure.libelle.truncate_words(10)} - archiver"]], | ||
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],[t('administrateurs.procedures.close.page_title')]], | ||
metadatas: true } | ||
|
||
.container | ||
.card | ||
%h2.card-title | ||
= t('administrateurs.procedures.close.replacement_procedure_title') | ||
= form_tag admin_procedure_archive_path(@procedure), method: :put, class: "form" do | ||
- options_from_collection_for_select = current_administrateur.procedures.publiees.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h | ||
= select_tag :new_procedure, options_for_select(options_from_collection_for_select), include_blank: true | ||
= submit_tag t('administrateurs.procedures.close.actions.close_procedure'), { class: "button primary", id: 'publish', 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..."} } | ||
.fr-container | ||
.fr-grid-row | ||
.fr-col-12.fr-col-offset-md-2.fr-col-md-8 | ||
%h1= t('administrateurs.procedures.close.page_title') | ||
|
||
%p= t('administrateurs.procedures.close.replacement_procedure_title') | ||
|
||
= form_tag admin_procedure_archive_path(@procedure), method: :put do | ||
- if @published_procedures.present? | ||
.fr-select-group | ||
= label_tag :new_procedure, class: 'fr-label' do | ||
= t('activerecord.attributes.procedure.new_procedure') | ||
= t('utils.no_mandatory') | ||
|
||
= select_tag :new_procedure, options_for_select(@published_procedures), include_blank: true, class: 'fr-select' | ||
|
||
= submit_tag t('administrateurs.procedures.close.actions.close_procedure'), { class: "fr-btn", id: 'publish', 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..."} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,7 @@ | |
= 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? && [email protected]? | ||
= 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..."} | ||
|
||
= link_to 'Clore', admin_procedure_close_path(procedure_id: @procedure.id), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-archive-line', id: "close-procedure-link" | ||
|
||
.fr-container | ||
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters