Merge pull request #5436 from betagouv/fix/5402
fix/5402 - clone button to closed procedures
This commit is contained in:
commit
c83a085d6a
4 changed files with 25 additions and 22 deletions
|
@ -44,27 +44,28 @@
|
|||
%span.icon.in-progress
|
||||
.dropdown-description
|
||||
%h4 Tester
|
||||
|
||||
%li
|
||||
= link_to admin_procedure_clone_path(procedure.id), class: 'clone-btn', data: { method: :put } do
|
||||
%span.icon.new-folder
|
||||
.dropdown-description
|
||||
%h4 Cloner
|
||||
|
||||
- if procedure.publiee?
|
||||
%li
|
||||
= link_to admin_procedure_clone_path(procedure.id), class: 'clone-btn', data: { method: :put } do
|
||||
%span.icon.new-folder
|
||||
= link_to admin_procedure_archive_path(procedure_id: procedure.id), method: :put, 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
|
||||
%span.icon.archive
|
||||
.dropdown-description
|
||||
%h4 Cloner
|
||||
%h4 Clore
|
||||
|
||||
- if procedure.publiee?
|
||||
%li
|
||||
= link_to admin_procedure_archive_path(procedure_id: procedure.id), method: :put, 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
|
||||
%span.icon.archive
|
||||
.dropdown-description
|
||||
%h4 Clore
|
||||
- if procedure.brouillon?
|
||||
%li
|
||||
= link_to admin_procedure_path(procedure), method: :delete, data: { confirm: "Voulez-vous vraiment supprimer la démarche ? \nToute suppression est définitive et s'appliquera aux éventuels autres administrateurs de cette démarche !" } do
|
||||
%span.icon.refuse
|
||||
.dropdown-description
|
||||
%h4 Supprimer
|
||||
|
||||
- if procedure.brouillon?
|
||||
%li
|
||||
= link_to admin_procedure_path(procedure), method: :delete, data: { confirm: "Voulez-vous vraiment supprimer la démarche ? \nToute suppression est définitive et s'appliquera aux éventuels autres administrateurs de cette démarche !" } do
|
||||
%span.icon.refuse
|
||||
.dropdown-description
|
||||
%h4 Supprimer
|
||||
|
||||
- else
|
||||
- if procedure.close?
|
||||
%li
|
||||
= link_to admin_procedure_publication_path(procedure) do
|
||||
%span.icon.unarchive
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.sub-header
|
||||
.procedure-admin-listing-container
|
||||
= link_to "Nouvelle Démarche", new_admin_procedure_path, id: 'new-procedure', class: 'button primary'
|
||||
= link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'button primary'
|
||||
.container
|
||||
|
||||
%ul.tabs
|
||||
|
|
|
@ -258,12 +258,12 @@ ActiveRecord::Schema.define(version: 2020_07_22_135121) do
|
|||
t.interval "en_construction_conservation_extension", default: "PT0S"
|
||||
t.datetime "termine_close_to_expiration_notice_sent_at"
|
||||
t.bigint "revision_id"
|
||||
t.index "to_tsvector('french'::regconfig, (search_terms || private_search_terms))", name: "index_dossiers_on_search_terms_private_search_terms", using: :gin
|
||||
t.index "to_tsvector('french'::regconfig, search_terms)", name: "index_dossiers_on_search_terms", using: :gin
|
||||
t.datetime "last_champ_updated_at"
|
||||
t.datetime "last_champ_private_updated_at"
|
||||
t.datetime "last_avis_updated_at"
|
||||
t.datetime "last_commentaire_updated_at"
|
||||
t.index "to_tsvector('french'::regconfig, (search_terms || private_search_terms))", name: "index_dossiers_on_search_terms_private_search_terms", using: :gin
|
||||
t.index "to_tsvector('french'::regconfig, search_terms)", name: "index_dossiers_on_search_terms", using: :gin
|
||||
t.index ["archived"], name: "index_dossiers_on_archived"
|
||||
t.index ["groupe_instructeur_id"], name: "index_dossiers_on_groupe_instructeur_id"
|
||||
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at"
|
||||
|
|
|
@ -33,7 +33,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
expect(page).to have_selector('#new-procedure')
|
||||
find('#new-procedure').click
|
||||
|
||||
expect(page).to have_current_path(new_admin_procedure_path)
|
||||
expect(page).to have_current_path(new_from_existing_admin_procedures_path)
|
||||
click_on 'Créer une nouvelle démarche de zéro'
|
||||
expect(find('#procedure_for_individual_true')).to be_checked
|
||||
expect(find('#procedure_for_individual_false')).not_to be_checked
|
||||
fill_in 'procedure_duree_conservation_dossiers_dans_ds', with: '3'
|
||||
|
@ -54,7 +55,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
expect(page).to have_selector('#new-procedure')
|
||||
find('#new-procedure').click
|
||||
|
||||
expect(page).to have_current_path(new_admin_procedure_path)
|
||||
expect(page).to have_current_path(new_from_existing_admin_procedures_path)
|
||||
click_on 'Créer une nouvelle démarche de zéro'
|
||||
fill_in_dummy_procedure_details
|
||||
click_on 'Créer la démarche'
|
||||
|
||||
|
|
Loading…
Reference in a new issue