From ded5b704447e2a66d864b143c43e1b0878820037 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 25 Mar 2019 09:53:45 +0000 Subject: [PATCH] app: rename `new_user` to `users` --- .../{new_user => users}/commencer_controller.rb | 2 +- .../{new_user => users}/demarches_controller.rb | 2 +- .../{new_user => users}/dossiers_controller.rb | 2 +- .../{new_user => users}/feedbacks_controller.rb | 2 +- .../{new_user => users}/user_controller.rb | 2 +- app/views/layouts/_new_header.haml | 2 +- app/views/layouts/procedure_context.html.haml | 4 ++-- app/views/new_user/dossiers/_index_footer.html.haml | 4 ---- app/views/new_user/dossiers/show.html.haml | 13 ------------- .../_dossier_help_dropdown.html.haml | 0 .../_general_footer_row.html.haml | 0 .../{new_user => users}/_procedure_footer.html.haml | 2 +- .../{new_user => users}/demarches/index.html.haml | 2 +- app/views/users/dossiers/_index_footer.html.haml | 4 ++++ .../dossiers/brouillon.html.haml | 2 +- .../{new_user => users}/dossiers/demande.html.haml | 4 ++-- .../dossiers/etablissement.html.haml | 6 +++--- .../etablissement/_infos_association.html.haml | 0 .../etablissement/_infos_entreprise.html.haml | 0 .../{new_user => users}/dossiers/identite.html.haml | 0 .../{new_user => users}/dossiers/index.html.haml | 2 +- .../{new_user => users}/dossiers/merci.html.haml | 2 +- .../dossiers/messagerie.html.haml | 4 ++-- .../{new_user => users}/dossiers/modifier.html.haml | 4 ++-- .../dossiers/purge_champ_piece_justificative.js.erb | 0 app/views/users/dossiers/show.html.haml | 13 +++++++++++++ .../dossiers/show/_header.html.haml | 0 .../dossiers/show/_latest_message.html.haml | 0 .../dossiers/show/_status_overview.html.haml | 0 .../{new_user => users}/dossiers/siret.html.haml | 0 .../{new_user => users}/feedbacks/create.js.erb | 0 config/routes.rb | 2 +- .../commencer_controller_spec.rb | 2 +- .../{new_user => users}/dossiers_controller_spec.rb | 4 ++-- .../{new_user => users}/user_controller_spec.rb | 4 ++-- spec/features/{new_user => users}/brouillon_spec.rb | 0 .../{new_user => users}/dossier_creation_spec.rb | 0 .../{new_user => users}/dossier_details_spec.rb | 2 +- .../{new_user => users}/dossier_shared_examples.rb | 0 spec/features/{new_user => users}/invite_spec.rb | 2 +- .../{new_user => users}/linked_dropdown_spec.rb | 0 .../{new_user => users}/list_dossiers_spec.rb | 0 spec/features/{new_user => users}/sign_up_spec.rb | 0 .../_procedure_footer.html.haml_spec.rb | 4 ++-- .../dossiers/brouillon.html.haml_spec.rb | 2 +- .../dossiers/demande.html.haml_spec.rb | 2 +- .../dossiers/etablissement.html.haml_spec.rb | 2 +- .../dossiers/identite.html.haml_spec.rb | 2 +- .../dossiers/index.html.haml_spec.rb | 2 +- .../dossiers/show.html.haml_spec.rb | 2 +- .../dossiers/show/_header.html.haml_spec.rb | 4 ++-- .../show/_status_overview.html.haml_spec.rb | 4 ++-- .../dossiers/siret.html.haml_spec.rb | 2 +- 53 files changed, 60 insertions(+), 60 deletions(-) rename app/controllers/{new_user => users}/commencer_controller.rb (98%) rename app/controllers/{new_user => users}/demarches_controller.rb (97%) rename app/controllers/{new_user => users}/dossiers_controller.rb (99%) rename app/controllers/{new_user => users}/feedbacks_controller.rb (95%) rename app/controllers/{new_user => users}/user_controller.rb (90%) delete mode 100644 app/views/new_user/dossiers/_index_footer.html.haml delete mode 100644 app/views/new_user/dossiers/show.html.haml rename app/views/{new_user => users}/_dossier_help_dropdown.html.haml (100%) rename app/views/{new_user => users}/_general_footer_row.html.haml (100%) rename app/views/{new_user => users}/_procedure_footer.html.haml (93%) rename app/views/{new_user => users}/demarches/index.html.haml (95%) create mode 100644 app/views/users/dossiers/_index_footer.html.haml rename app/views/{new_user => users}/dossiers/brouillon.html.haml (76%) rename app/views/{new_user => users}/dossiers/demande.html.haml (68%) rename app/views/{new_user => users}/dossiers/etablissement.html.haml (68%) rename app/views/{new_user => users}/dossiers/etablissement/_infos_association.html.haml (100%) rename app/views/{new_user => users}/dossiers/etablissement/_infos_entreprise.html.haml (100%) rename app/views/{new_user => users}/dossiers/identite.html.haml (100%) rename app/views/{new_user => users}/dossiers/index.html.haml (98%) rename app/views/{new_user => users}/dossiers/merci.html.haml (83%) rename app/views/{new_user => users}/dossiers/messagerie.html.haml (71%) rename app/views/{new_user => users}/dossiers/modifier.html.haml (55%) rename app/views/{new_user => users}/dossiers/purge_champ_piece_justificative.js.erb (100%) create mode 100644 app/views/users/dossiers/show.html.haml rename app/views/{new_user => users}/dossiers/show/_header.html.haml (100%) rename app/views/{new_user => users}/dossiers/show/_latest_message.html.haml (100%) rename app/views/{new_user => users}/dossiers/show/_status_overview.html.haml (100%) rename app/views/{new_user => users}/dossiers/siret.html.haml (100%) rename app/views/{new_user => users}/feedbacks/create.js.erb (100%) rename spec/controllers/{new_user => users}/commencer_controller_spec.rb (97%) rename spec/controllers/{new_user => users}/dossiers_controller_spec.rb (99%) rename spec/controllers/{new_user => users}/user_controller_spec.rb (76%) rename spec/features/{new_user => users}/brouillon_spec.rb (100%) rename spec/features/{new_user => users}/dossier_creation_spec.rb (100%) rename spec/features/{new_user => users}/dossier_details_spec.rb (97%) rename spec/features/{new_user => users}/dossier_shared_examples.rb (100%) rename spec/features/{new_user => users}/invite_spec.rb (98%) rename spec/features/{new_user => users}/linked_dropdown_spec.rb (100%) rename spec/features/{new_user => users}/list_dossiers_spec.rb (100%) rename spec/features/{new_user => users}/sign_up_spec.rb (100%) rename spec/views/{new_user => users}/_procedure_footer.html.haml_spec.rb (82%) rename spec/views/{new_user => users}/dossiers/brouillon.html.haml_spec.rb (94%) rename spec/views/{new_user => users}/dossiers/demande.html.haml_spec.rb (95%) rename spec/views/{new_user => users}/dossiers/etablissement.html.haml_spec.rb (93%) rename spec/views/{new_user => users}/dossiers/identite.html.haml_spec.rb (91%) rename spec/views/{new_user => users}/dossiers/index.html.haml_spec.rb (98%) rename spec/views/{new_user => users}/dossiers/show.html.haml_spec.rb (93%) rename spec/views/{new_user => users}/dossiers/show/_header.html.haml_spec.rb (79%) rename spec/views/{new_user => users}/dossiers/show/_status_overview.html.haml_spec.rb (95%) rename spec/views/{new_user => users}/dossiers/siret.html.haml_spec.rb (81%) diff --git a/app/controllers/new_user/commencer_controller.rb b/app/controllers/users/commencer_controller.rb similarity index 98% rename from app/controllers/new_user/commencer_controller.rb rename to app/controllers/users/commencer_controller.rb index 325bf3706..95970cc1b 100644 --- a/app/controllers/new_user/commencer_controller.rb +++ b/app/controllers/users/commencer_controller.rb @@ -1,4 +1,4 @@ -module NewUser +module Users class CommencerController < ApplicationController layout 'procedure_context' diff --git a/app/controllers/new_user/demarches_controller.rb b/app/controllers/users/demarches_controller.rb similarity index 97% rename from app/controllers/new_user/demarches_controller.rb rename to app/controllers/users/demarches_controller.rb index 0a354fa05..45f0fd7f4 100644 --- a/app/controllers/new_user/demarches_controller.rb +++ b/app/controllers/users/demarches_controller.rb @@ -1,4 +1,4 @@ -module NewUser +module Users class DemarchesController < UserController def index @previous_demarches_still_active = current_user diff --git a/app/controllers/new_user/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb similarity index 99% rename from app/controllers/new_user/dossiers_controller.rb rename to app/controllers/users/dossiers_controller.rb index 44091e710..07e9b231c 100644 --- a/app/controllers/new_user/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -1,4 +1,4 @@ -module NewUser +module Users class DossiersController < UserController include Devise::StoreLocationExtension include DossierHelper diff --git a/app/controllers/new_user/feedbacks_controller.rb b/app/controllers/users/feedbacks_controller.rb similarity index 95% rename from app/controllers/new_user/feedbacks_controller.rb rename to app/controllers/users/feedbacks_controller.rb index 500afc525..6436025bb 100644 --- a/app/controllers/new_user/feedbacks_controller.rb +++ b/app/controllers/users/feedbacks_controller.rb @@ -1,4 +1,4 @@ -module NewUser +module Users class FeedbacksController < UserController def create current_user.feedbacks.create!(rating: params[:rating]) diff --git a/app/controllers/new_user/user_controller.rb b/app/controllers/users/user_controller.rb similarity index 90% rename from app/controllers/new_user/user_controller.rb rename to app/controllers/users/user_controller.rb index 35519a3f0..86f39ecef 100644 --- a/app/controllers/new_user/user_controller.rb +++ b/app/controllers/users/user_controller.rb @@ -1,4 +1,4 @@ -module NewUser +module Users class UserController < ApplicationController before_action :authenticate_user! diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index f996d6565..8293280e1 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -89,7 +89,7 @@ %li .header-help - if nav_bar_profile == :user && dossier.present? - = render partial: 'new_user/dossier_help_dropdown', locals: { dossier: dossier } + = render partial: 'users/dossier_help_dropdown', locals: { dossier: dossier } - elsif nav_bar_profile == :gestionnaire = render partial: 'new_gestionnaire/help_dropdown' - else diff --git a/app/views/layouts/procedure_context.html.haml b/app/views/layouts/procedure_context.html.haml index 2199d581b..37c24000c 100644 --- a/app/views/layouts/procedure_context.html.haml +++ b/app/views/layouts/procedure_context.html.haml @@ -15,8 +15,8 @@ - content_for :footer do - if procedure - = render partial: 'new_user/procedure_footer', locals: { procedure: procedure, dossier: @dossier } + = render partial: 'users/procedure_footer', locals: { procedure: procedure, dossier: @dossier } - else - = render partial: 'new_user/dossiers/index_footer' + = render partial: 'users/dossiers/index_footer' = render template: 'layouts/application' diff --git a/app/views/new_user/dossiers/_index_footer.html.haml b/app/views/new_user/dossiers/_index_footer.html.haml deleted file mode 100644 index 77dbec78e..000000000 --- a/app/views/new_user/dossiers/_index_footer.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%footer.procedure-footer - .container - .footer-row.footer-bottom-line - = render partial: "new_user/general_footer_row", locals: { dossier: nil } diff --git a/app/views/new_user/dossiers/show.html.haml b/app/views/new_user/dossiers/show.html.haml deleted file mode 100644 index 40fb9603f..000000000 --- a/app/views/new_user/dossiers/show.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -- content_for(:title, "Résumé · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})") - -- content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } - -#dossier-show - = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier } - - .container - = render partial: 'new_user/dossiers/show/status_overview', locals: { dossier: @dossier } - - - if !@dossier.termine? - = render partial: 'new_user/dossiers/show/latest_message', locals: { dossier: @dossier } diff --git a/app/views/new_user/_dossier_help_dropdown.html.haml b/app/views/users/_dossier_help_dropdown.html.haml similarity index 100% rename from app/views/new_user/_dossier_help_dropdown.html.haml rename to app/views/users/_dossier_help_dropdown.html.haml diff --git a/app/views/new_user/_general_footer_row.html.haml b/app/views/users/_general_footer_row.html.haml similarity index 100% rename from app/views/new_user/_general_footer_row.html.haml rename to app/views/users/_general_footer_row.html.haml diff --git a/app/views/new_user/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml similarity index 93% rename from app/views/new_user/_procedure_footer.html.haml rename to app/views/users/_procedure_footer.html.haml index 81e5c7ccb..495010d95 100644 --- a/app/views/new_user/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -37,4 +37,4 @@ %p= politique .footer-row.footer-bottom-line - = render partial: 'new_user/general_footer_row', locals: { dossier: dossier } + = render partial: 'users/general_footer_row', locals: { dossier: dossier } diff --git a/app/views/new_user/demarches/index.html.haml b/app/views/users/demarches/index.html.haml similarity index 95% rename from app/views/new_user/demarches/index.html.haml rename to app/views/users/demarches/index.html.haml index 0767a4b04..ec87f2045 100644 --- a/app/views/new_user/demarches/index.html.haml +++ b/app/views/users/demarches/index.html.haml @@ -1,7 +1,7 @@ - content_for(:title, "Démarches") - content_for :footer do - = render partial: "new_user/dossiers/index_footer" + = render partial: "users/dossiers/index_footer" #demarches-index .container diff --git a/app/views/users/dossiers/_index_footer.html.haml b/app/views/users/dossiers/_index_footer.html.haml new file mode 100644 index 000000000..935c93bbc --- /dev/null +++ b/app/views/users/dossiers/_index_footer.html.haml @@ -0,0 +1,4 @@ +%footer.procedure-footer + .container + .footer-row.footer-bottom-line + = render partial: "users/general_footer_row", locals: { dossier: nil } diff --git a/app/views/new_user/dossiers/brouillon.html.haml b/app/views/users/dossiers/brouillon.html.haml similarity index 76% rename from app/views/new_user/dossiers/brouillon.html.haml rename to app/views/users/dossiers/brouillon.html.haml index c131e8fc7..766708cef 100644 --- a/app/views/new_user/dossiers/brouillon.html.haml +++ b/app/views/users/dossiers/brouillon.html.haml @@ -1,7 +1,7 @@ - content_for(:title, "Modification du brouillon nº #{@dossier.id} (#{@dossier.procedure.libelle})") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } .dossier-header.sub-header .container diff --git a/app/views/new_user/dossiers/demande.html.haml b/app/views/users/dossiers/demande.html.haml similarity index 68% rename from app/views/new_user/dossiers/demande.html.haml rename to app/views/users/dossiers/demande.html.haml index 0f46abe02..b4050b41d 100644 --- a/app/views/new_user/dossiers/demande.html.haml +++ b/app/views/users/dossiers/demande.html.haml @@ -1,10 +1,10 @@ - content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } #dossier-show - = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier } + = render partial: 'users/dossiers/show/header', locals: { dossier: @dossier } = render partial: 'shared/dossiers/demande', locals: { dossier: @dossier, demande_seen_at: nil, profile: 'usager' } diff --git a/app/views/new_user/dossiers/etablissement.html.haml b/app/views/users/dossiers/etablissement.html.haml similarity index 68% rename from app/views/new_user/dossiers/etablissement.html.haml rename to app/views/users/dossiers/etablissement.html.haml index 60a7f5619..a12999c1d 100644 --- a/app/views/new_user/dossiers/etablissement.html.haml +++ b/app/views/users/dossiers/etablissement.html.haml @@ -1,7 +1,7 @@ - content_for(:title, "Informations sur l’établissement") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } .etablissement .container @@ -17,10 +17,10 @@ - etablissement = @dossier.etablissement %h2.card-title= raison_sociale_or_name(etablissement) - = render partial: 'new_user/dossiers/etablissement/infos_entreprise', locals: { etablissement: etablissement } + = render partial: 'users/dossiers/etablissement/infos_entreprise', locals: { etablissement: etablissement } - if etablissement.association? - = render partial: 'new_user/dossiers/etablissement/infos_association', locals: { etablissement: etablissement } + = render partial: 'users/dossiers/etablissement/infos_association', locals: { etablissement: etablissement } .actions = link_to 'Utiliser un autre numéro SIRET', siret_dossier_path(@dossier), class: 'button' diff --git a/app/views/new_user/dossiers/etablissement/_infos_association.html.haml b/app/views/users/dossiers/etablissement/_infos_association.html.haml similarity index 100% rename from app/views/new_user/dossiers/etablissement/_infos_association.html.haml rename to app/views/users/dossiers/etablissement/_infos_association.html.haml diff --git a/app/views/new_user/dossiers/etablissement/_infos_entreprise.html.haml b/app/views/users/dossiers/etablissement/_infos_entreprise.html.haml similarity index 100% rename from app/views/new_user/dossiers/etablissement/_infos_entreprise.html.haml rename to app/views/users/dossiers/etablissement/_infos_entreprise.html.haml diff --git a/app/views/new_user/dossiers/identite.html.haml b/app/views/users/dossiers/identite.html.haml similarity index 100% rename from app/views/new_user/dossiers/identite.html.haml rename to app/views/users/dossiers/identite.html.haml diff --git a/app/views/new_user/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml similarity index 98% rename from app/views/new_user/dossiers/index.html.haml rename to app/views/users/dossiers/index.html.haml index ca8548dc9..42fa8bb30 100644 --- a/app/views/new_user/dossiers/index.html.haml +++ b/app/views/users/dossiers/index.html.haml @@ -1,7 +1,7 @@ - content_for(:title, "Dossiers") - content_for :footer do - = render partial: "new_user/dossiers/index_footer" + = render partial: "users/dossiers/index_footer" .dossiers-headers.sub-header .container diff --git a/app/views/new_user/dossiers/merci.html.haml b/app/views/users/dossiers/merci.html.haml similarity index 83% rename from app/views/new_user/dossiers/merci.html.haml rename to app/views/users/dossiers/merci.html.haml index b148bd365..5d411136b 100644 --- a/app/views/new_user/dossiers/merci.html.haml +++ b/app/views/users/dossiers/merci.html.haml @@ -1,7 +1,7 @@ - content_for(:title, "Dossier bien envoyé (#{@dossier.procedure.libelle})") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } .merci .container diff --git a/app/views/new_user/dossiers/messagerie.html.haml b/app/views/users/dossiers/messagerie.html.haml similarity index 71% rename from app/views/new_user/dossiers/messagerie.html.haml rename to app/views/users/dossiers/messagerie.html.haml index 93a18f347..e9777fb77 100644 --- a/app/views/new_user/dossiers/messagerie.html.haml +++ b/app/views/users/dossiers/messagerie.html.haml @@ -1,10 +1,10 @@ - content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } #dossier-show - = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier } + = render partial: 'users/dossiers/show/header', locals: { dossier: @dossier } .container %p.messagerie-explanation diff --git a/app/views/new_user/dossiers/modifier.html.haml b/app/views/users/dossiers/modifier.html.haml similarity index 55% rename from app/views/new_user/dossiers/modifier.html.haml rename to app/views/users/dossiers/modifier.html.haml index 0c46b66fa..24fbbf3a6 100644 --- a/app/views/new_user/dossiers/modifier.html.haml +++ b/app/views/users/dossiers/modifier.html.haml @@ -1,10 +1,10 @@ - content_for(:title, "Modifier · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})") - content_for :footer do - = render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } #dossier-show - = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier } + = render partial: 'users/dossiers/show/header', locals: { dossier: @dossier } .container = render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: false } diff --git a/app/views/new_user/dossiers/purge_champ_piece_justificative.js.erb b/app/views/users/dossiers/purge_champ_piece_justificative.js.erb similarity index 100% rename from app/views/new_user/dossiers/purge_champ_piece_justificative.js.erb rename to app/views/users/dossiers/purge_champ_piece_justificative.js.erb diff --git a/app/views/users/dossiers/show.html.haml b/app/views/users/dossiers/show.html.haml new file mode 100644 index 000000000..f23312447 --- /dev/null +++ b/app/views/users/dossiers/show.html.haml @@ -0,0 +1,13 @@ +- content_for(:title, "Résumé · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})") + +- content_for :footer do + = render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier } + +#dossier-show + = render partial: 'users/dossiers/show/header', locals: { dossier: @dossier } + + .container + = render partial: 'users/dossiers/show/status_overview', locals: { dossier: @dossier } + + - if !@dossier.termine? + = render partial: 'users/dossiers/show/latest_message', locals: { dossier: @dossier } diff --git a/app/views/new_user/dossiers/show/_header.html.haml b/app/views/users/dossiers/show/_header.html.haml similarity index 100% rename from app/views/new_user/dossiers/show/_header.html.haml rename to app/views/users/dossiers/show/_header.html.haml diff --git a/app/views/new_user/dossiers/show/_latest_message.html.haml b/app/views/users/dossiers/show/_latest_message.html.haml similarity index 100% rename from app/views/new_user/dossiers/show/_latest_message.html.haml rename to app/views/users/dossiers/show/_latest_message.html.haml diff --git a/app/views/new_user/dossiers/show/_status_overview.html.haml b/app/views/users/dossiers/show/_status_overview.html.haml similarity index 100% rename from app/views/new_user/dossiers/show/_status_overview.html.haml rename to app/views/users/dossiers/show/_status_overview.html.haml diff --git a/app/views/new_user/dossiers/siret.html.haml b/app/views/users/dossiers/siret.html.haml similarity index 100% rename from app/views/new_user/dossiers/siret.html.haml rename to app/views/users/dossiers/siret.html.haml diff --git a/app/views/new_user/feedbacks/create.js.erb b/app/views/users/feedbacks/create.js.erb similarity index 100% rename from app/views/new_user/feedbacks/create.js.erb rename to app/views/users/feedbacks/create.js.erb diff --git a/config/routes.rb b/config/routes.rb index 3a9bc9966..84e00699b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -264,7 +264,7 @@ Rails.application.routes.draw do # User # - scope module: 'new_user' do + scope module: 'users' do namespace :commencer do get '/test/:path', action: 'commencer_test', as: :test get '/:path', action: 'commencer' diff --git a/spec/controllers/new_user/commencer_controller_spec.rb b/spec/controllers/users/commencer_controller_spec.rb similarity index 97% rename from spec/controllers/new_user/commencer_controller_spec.rb rename to spec/controllers/users/commencer_controller_spec.rb index 7fbaea275..2ef2a9ab5 100644 --- a/spec/controllers/new_user/commencer_controller_spec.rb +++ b/spec/controllers/users/commencer_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe NewUser::CommencerController, type: :controller do +describe Users::CommencerController, type: :controller do let(:user) { create(:user) } let(:published_procedure) { create(:procedure, :published) } let(:draft_procedure) { create(:procedure, :with_path) } diff --git a/spec/controllers/new_user/dossiers_controller_spec.rb b/spec/controllers/users/dossiers_controller_spec.rb similarity index 99% rename from spec/controllers/new_user/dossiers_controller_spec.rb rename to spec/controllers/users/dossiers_controller_spec.rb index 6d133d62b..17d3dfa10 100644 --- a/spec/controllers/new_user/dossiers_controller_spec.rb +++ b/spec/controllers/users/dossiers_controller_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe NewUser::DossiersController, type: :controller do +describe Users::DossiersController, type: :controller do let(:user) { create(:user) } describe 'before_actions' do it 'are present' do - before_actions = NewUser::DossiersController + before_actions = Users::DossiersController ._process_action_callbacks .find_all { |process_action_callbacks| process_action_callbacks.kind == :before } .map(&:filter) diff --git a/spec/controllers/new_user/user_controller_spec.rb b/spec/controllers/users/user_controller_spec.rb similarity index 76% rename from spec/controllers/new_user/user_controller_spec.rb rename to spec/controllers/users/user_controller_spec.rb index 82908835d..4ab899460 100644 --- a/spec/controllers/new_user/user_controller_spec.rb +++ b/spec/controllers/users/user_controller_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe NewUser::UserController, type: :controller do +describe Users::UserController, type: :controller do describe 'before actions: authenticate_gestionnaire!' do it 'is present' do - before_actions = NewUser::UserController + before_actions = Users::UserController ._process_action_callbacks .find_all { |process_action_callbacks| process_action_callbacks.kind == :before } .map(&:filter) diff --git a/spec/features/new_user/brouillon_spec.rb b/spec/features/users/brouillon_spec.rb similarity index 100% rename from spec/features/new_user/brouillon_spec.rb rename to spec/features/users/brouillon_spec.rb diff --git a/spec/features/new_user/dossier_creation_spec.rb b/spec/features/users/dossier_creation_spec.rb similarity index 100% rename from spec/features/new_user/dossier_creation_spec.rb rename to spec/features/users/dossier_creation_spec.rb diff --git a/spec/features/new_user/dossier_details_spec.rb b/spec/features/users/dossier_details_spec.rb similarity index 97% rename from spec/features/new_user/dossier_details_spec.rb rename to spec/features/users/dossier_details_spec.rb index a3cc373bb..a99ca51be 100644 --- a/spec/features/new_user/dossier_details_spec.rb +++ b/spec/features/users/dossier_details_spec.rb @@ -1,4 +1,4 @@ -require 'features/new_user/dossier_shared_examples.rb' +require 'features/users/dossier_shared_examples.rb' describe 'Dossier details:' do let(:user) { create(:user) } diff --git a/spec/features/new_user/dossier_shared_examples.rb b/spec/features/users/dossier_shared_examples.rb similarity index 100% rename from spec/features/new_user/dossier_shared_examples.rb rename to spec/features/users/dossier_shared_examples.rb diff --git a/spec/features/new_user/invite_spec.rb b/spec/features/users/invite_spec.rb similarity index 98% rename from spec/features/new_user/invite_spec.rb rename to spec/features/users/invite_spec.rb index 1fdef0ed3..c8706dc7d 100644 --- a/spec/features/new_user/invite_spec.rb +++ b/spec/features/users/invite_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -require 'features/new_user/dossier_shared_examples.rb' +require 'features/users/dossier_shared_examples.rb' feature 'Invitations' do let(:owner) { create(:user) } diff --git a/spec/features/new_user/linked_dropdown_spec.rb b/spec/features/users/linked_dropdown_spec.rb similarity index 100% rename from spec/features/new_user/linked_dropdown_spec.rb rename to spec/features/users/linked_dropdown_spec.rb diff --git a/spec/features/new_user/list_dossiers_spec.rb b/spec/features/users/list_dossiers_spec.rb similarity index 100% rename from spec/features/new_user/list_dossiers_spec.rb rename to spec/features/users/list_dossiers_spec.rb diff --git a/spec/features/new_user/sign_up_spec.rb b/spec/features/users/sign_up_spec.rb similarity index 100% rename from spec/features/new_user/sign_up_spec.rb rename to spec/features/users/sign_up_spec.rb diff --git a/spec/views/new_user/_procedure_footer.html.haml_spec.rb b/spec/views/users/_procedure_footer.html.haml_spec.rb similarity index 82% rename from spec/views/new_user/_procedure_footer.html.haml_spec.rb rename to spec/views/users/_procedure_footer.html.haml_spec.rb index a870abe50..4fc40831d 100644 --- a/spec/views/new_user/_procedure_footer.html.haml_spec.rb +++ b/spec/views/users/_procedure_footer.html.haml_spec.rb @@ -1,4 +1,4 @@ -describe 'new_user/procedure_footer.html.haml', type: :view do +describe 'users/procedure_footer.html.haml', type: :view do let(:service) { create(:service) } let(:dossier) { dossier = create(:dossier) @@ -6,7 +6,7 @@ describe 'new_user/procedure_footer.html.haml', type: :view do return dossier } - subject { render 'new_user/procedure_footer.html.haml', procedure: dossier.procedure, dossier: dossier } + subject { render 'users/procedure_footer.html.haml', procedure: dossier.procedure, dossier: dossier } it "affiche les informations de contact" do expect(subject).to have_text(service.nom) diff --git a/spec/views/new_user/dossiers/brouillon.html.haml_spec.rb b/spec/views/users/dossiers/brouillon.html.haml_spec.rb similarity index 94% rename from spec/views/new_user/dossiers/brouillon.html.haml_spec.rb rename to spec/views/users/dossiers/brouillon.html.haml_spec.rb index c8b916910..0bab7ddb2 100644 --- a/spec/views/new_user/dossiers/brouillon.html.haml_spec.rb +++ b/spec/views/users/dossiers/brouillon.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/brouillon.html.haml', type: :view do +describe 'users/dossiers/brouillon.html.haml', type: :view do let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_notice, for_individual: true) } let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: procedure) } let(:footer) { view.content_for(:footer) } diff --git a/spec/views/new_user/dossiers/demande.html.haml_spec.rb b/spec/views/users/dossiers/demande.html.haml_spec.rb similarity index 95% rename from spec/views/new_user/dossiers/demande.html.haml_spec.rb rename to spec/views/users/dossiers/demande.html.haml_spec.rb index 869128d92..8a67eff98 100644 --- a/spec/views/new_user/dossiers/demande.html.haml_spec.rb +++ b/spec/views/users/dossiers/demande.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/demande.html.haml', type: :view do +describe 'users/dossiers/demande.html.haml', type: :view do let(:procedure) { create(:procedure, :published, :with_two_type_de_piece_justificative, :with_type_de_champ, :with_type_de_champ_private) } let(:dossier) { create(:dossier, :en_construction, :with_entreprise, procedure: procedure) } diff --git a/spec/views/new_user/dossiers/etablissement.html.haml_spec.rb b/spec/views/users/dossiers/etablissement.html.haml_spec.rb similarity index 93% rename from spec/views/new_user/dossiers/etablissement.html.haml_spec.rb rename to spec/views/users/dossiers/etablissement.html.haml_spec.rb index 979696a70..3f7b7ff5f 100644 --- a/spec/views/new_user/dossiers/etablissement.html.haml_spec.rb +++ b/spec/views/users/dossiers/etablissement.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/etablissement.html.haml', type: :view do +describe 'users/dossiers/etablissement.html.haml', type: :view do let(:etablissement) { create(:etablissement, :with_exercices) } let(:dossier) { create(:dossier, etablissement: etablissement) } let(:footer) { view.content_for(:footer) } diff --git a/spec/views/new_user/dossiers/identite.html.haml_spec.rb b/spec/views/users/dossiers/identite.html.haml_spec.rb similarity index 91% rename from spec/views/new_user/dossiers/identite.html.haml_spec.rb rename to spec/views/users/dossiers/identite.html.haml_spec.rb index 38b6e709f..b5d954c67 100644 --- a/spec/views/new_user/dossiers/identite.html.haml_spec.rb +++ b/spec/views/users/dossiers/identite.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/identite.html.haml', type: :view do +describe 'users/dossiers/identite.html.haml', type: :view do let(:procedure) { create(:simple_procedure, for_individual: true) } let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: procedure) } diff --git a/spec/views/new_user/dossiers/index.html.haml_spec.rb b/spec/views/users/dossiers/index.html.haml_spec.rb similarity index 98% rename from spec/views/new_user/dossiers/index.html.haml_spec.rb rename to spec/views/users/dossiers/index.html.haml_spec.rb index e8430093f..f220b8f86 100644 --- a/spec/views/new_user/dossiers/index.html.haml_spec.rb +++ b/spec/views/users/dossiers/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/index.html.haml', type: :view do +describe 'users/dossiers/index.html.haml', type: :view do let(:user) { create(:user) } let(:dossier_brouillon) { create(:dossier, state: Dossier.states.fetch(:brouillon), user: user) } let(:dossier_en_construction) { create(:dossier, state: Dossier.states.fetch(:en_construction), user: user) } diff --git a/spec/views/new_user/dossiers/show.html.haml_spec.rb b/spec/views/users/dossiers/show.html.haml_spec.rb similarity index 93% rename from spec/views/new_user/dossiers/show.html.haml_spec.rb rename to spec/views/users/dossiers/show.html.haml_spec.rb index e81b50482..30f6e8d72 100644 --- a/spec/views/new_user/dossiers/show.html.haml_spec.rb +++ b/spec/views/users/dossiers/show.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/show.html.haml', type: :view do +describe 'users/dossiers/show.html.haml', type: :view do let(:dossier) { create(:dossier, :en_construction) } before do diff --git a/spec/views/new_user/dossiers/show/_header.html.haml_spec.rb b/spec/views/users/dossiers/show/_header.html.haml_spec.rb similarity index 79% rename from spec/views/new_user/dossiers/show/_header.html.haml_spec.rb rename to spec/views/users/dossiers/show/_header.html.haml_spec.rb index ad082af8a..d53157165 100644 --- a/spec/views/new_user/dossiers/show/_header.html.haml_spec.rb +++ b/spec/views/users/dossiers/show/_header.html.haml_spec.rb @@ -1,11 +1,11 @@ -describe 'new_user/dossiers/show/header.html.haml', type: :view do +describe 'users/dossiers/show/header.html.haml', type: :view do let(:dossier) { create(:dossier, :en_construction, procedure: create(:procedure)) } before do sign_in dossier.user end - subject! { render 'new_user/dossiers/show/header.html.haml', dossier: dossier } + subject! { render 'users/dossiers/show/header.html.haml', dossier: dossier } it 'affiche les informations du dossier' do expect(rendered).to have_text(dossier.procedure.libelle) diff --git a/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb b/spec/views/users/dossiers/show/_status_overview.html.haml_spec.rb similarity index 95% rename from spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb rename to spec/views/users/dossiers/show/_status_overview.html.haml_spec.rb index 9aabaf058..5e029c883 100644 --- a/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb +++ b/spec/views/users/dossiers/show/_status_overview.html.haml_spec.rb @@ -1,5 +1,5 @@ -describe 'new_user/dossiers/show/_status_overview.html.haml', type: :view do - subject! { render 'new_user/dossiers/show/status_overview.html.haml', dossier: dossier } +describe 'users/dossiers/show/_status_overview.html.haml', type: :view do + subject! { render 'users/dossiers/show/status_overview.html.haml', dossier: dossier } matcher :have_timeline_item do |selector| match do |rendered| diff --git a/spec/views/new_user/dossiers/siret.html.haml_spec.rb b/spec/views/users/dossiers/siret.html.haml_spec.rb similarity index 81% rename from spec/views/new_user/dossiers/siret.html.haml_spec.rb rename to spec/views/users/dossiers/siret.html.haml_spec.rb index 318542e05..23890b1e7 100644 --- a/spec/views/new_user/dossiers/siret.html.haml_spec.rb +++ b/spec/views/users/dossiers/siret.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'new_user/dossiers/siret.html.haml', type: :view do +describe 'users/dossiers/siret.html.haml', type: :view do let(:dossier) { create(:dossier) } before do