Merge pull request #3645 from betagouv/rename-new-user

app: rename `new_user` to `users`
This commit is contained in:
Pierre de La Morinerie 2019-03-25 11:04:49 +01:00 committed by GitHub
commit 14582b6b8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 60 additions and 60 deletions

View file

@ -1,4 +1,4 @@
module NewUser
module Users
class CommencerController < ApplicationController
layout 'procedure_context'

View file

@ -1,4 +1,4 @@
module NewUser
module Users
class DemarchesController < UserController
def index
@previous_demarches_still_active = current_user

View file

@ -1,4 +1,4 @@
module NewUser
module Users
class DossiersController < UserController
include Devise::StoreLocationExtension
include DossierHelper

View file

@ -1,4 +1,4 @@
module NewUser
module Users
class FeedbacksController < UserController
def create
current_user.feedbacks.create!(rating: params[:rating])

View file

@ -1,4 +1,4 @@
module NewUser
module Users
class UserController < ApplicationController
before_action :authenticate_user!

View file

@ -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

View file

@ -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'

View file

@ -1,4 +0,0 @@
%footer.procedure-footer
.container
.footer-row.footer-bottom-line
= render partial: "new_user/general_footer_row", locals: { dossier: nil }

View file

@ -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 }

View file

@ -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 }

View file

@ -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

View file

@ -0,0 +1,4 @@
%footer.procedure-footer
.container
.footer-row.footer-bottom-line
= render partial: "users/general_footer_row", locals: { dossier: nil }

View file

@ -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

View file

@ -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' }

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 }

View file

@ -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 }

View file

@ -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'

View file

@ -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) }

View file

@ -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)

View file

@ -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)

View file

@ -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) }

View file

@ -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) }

View file

@ -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)

View file

@ -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) }

View file

@ -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) }

View file

@ -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) }

View file

@ -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) }

View file

@ -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) }

View file

@ -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

View file

@ -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)

View file

@ -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|

View file

@ -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