Merge pull request #6682 from betagouv/bye-bye-new-administrateur

This commit is contained in:
Pierre de La Morinerie 2021-11-30 08:53:44 +01:00 committed by GitHub
commit eb0c54f3a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 155 additions and 158 deletions

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class AdministrateurController < ApplicationController class AdministrateurController < ApplicationController
before_action :authenticate_administrateur! before_action :authenticate_administrateur!

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class AttestationTemplatesController < AdministrateurController class AttestationTemplatesController < AdministrateurController
before_action :retrieve_procedure before_action :retrieve_procedure
@ -33,7 +33,7 @@ module NewAdministrateur
attestation = @procedure.attestation_template || AttestationTemplate.new attestation = @procedure.attestation_template || AttestationTemplate.new
@attestation = attestation.render_attributes_for({}) @attestation = attestation.render_attributes_for({})
render 'new_administrateur/attestation_templates/show', formats: [:pdf] render 'administrateurs/attestation_templates/show', formats: [:pdf]
end end
private private

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class ExpertsProceduresController < AdministrateurController class ExpertsProceduresController < AdministrateurController
before_action :retrieve_procedure before_action :retrieve_procedure

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class GroupeInstructeursController < AdministrateurController class GroupeInstructeursController < AdministrateurController
include ActiveSupport::NumberHelper include ActiveSupport::NumberHelper
ITEMS_PER_PAGE = 25 ITEMS_PER_PAGE = 25

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class JetonParticulierController < AdministrateurController class JetonParticulierController < AdministrateurController
before_action :retrieve_procedure before_action :retrieve_procedure

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class MailTemplatesController < AdministrateurController class MailTemplatesController < AdministrateurController
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class ProcedureAdministrateursController < AdministrateurController class ProcedureAdministrateursController < AdministrateurController
before_action :retrieve_procedure, except: [:new] before_action :retrieve_procedure, except: [:new]

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class ProceduresController < AdministrateurController class ProceduresController < AdministrateurController
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review, :experts_require_administrateur_invitation] before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review, :experts_require_administrateur_invitation]
before_action :procedure_revisable?, only: [:champs, :annotations] before_action :procedure_revisable?, only: [:champs, :annotations]

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class ServicesController < AdministrateurController class ServicesController < AdministrateurController
def index def index
@services = services.ordered @services = services.ordered

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class SourcesParticulierController < AdministrateurController class SourcesParticulierController < AdministrateurController
before_action :retrieve_procedure before_action :retrieve_procedure

View file

@ -1,4 +1,4 @@
module NewAdministrateur module Administrateurs
class TypesDeChampController < AdministrateurController class TypesDeChampController < AdministrateurController
before_action :retrieve_procedure, only: [:create, :update, :move, :destroy] before_action :retrieve_procedure, only: [:create, :update, :move, :destroy]
before_action :procedure_revisable?, only: [:create, :update, :move, :destroy] before_action :procedure_revisable?, only: [:create, :update, :move, :destroy]

View file

@ -28,7 +28,7 @@ module Instructeurs
def apercu_attestation def apercu_attestation
@attestation = dossier.procedure.attestation_template.render_attributes_for(dossier: dossier) @attestation = dossier.procedure.attestation_template.render_attributes_for(dossier: dossier)
render 'new_administrateur/attestation_templates/show', formats: [:pdf] render 'administrateurs/attestation_templates/show', formats: [:pdf]
end end
def bilans_bdf def bilans_bdf

View file

@ -119,7 +119,7 @@ class AttestationTemplate < ApplicationRecord
def build_pdf(dossier) def build_pdf(dossier)
attestation = render_attributes_for(dossier: dossier) attestation = render_attributes_for(dossier: dossier)
attestation_view = ApplicationController.render( attestation_view = ApplicationController.render(
template: 'new_administrateur/attestation_templates/show', template: 'administrateurs/attestation_templates/show',
formats: :pdf, formats: :pdf,
assigns: { attestation: attestation } assigns: { attestation: attestation }
) )

View file

@ -1,6 +1,6 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer') - content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Attestation'] } 'Attestation'] }
@ -8,7 +8,7 @@
.procedure-form#attestation-template-edit .procedure-form#attestation-template-edit
.procedure-form__columns.container .procedure-form__columns.container
= form_for @attestation_template, = form_for @attestation_template,
url: url_for({ controller: 'new_administrateur/attestation_templates', action: :update, id: @procedure.id }), url: url_for({ controller: 'administrateurs/attestation_templates', action: :update, id: @procedure.id }),
multipart: true, multipart: true,
html: { class: 'form procedure-form__column--form' } do |f| html: { class: 'form procedure-form__column--form' } do |f|
@ -29,7 +29,7 @@
Lemail daccusé dacceptation envoyé à lusager comporte alors un lien vers lattestation ; Lemail daccusé dacceptation envoyé à lusager comporte alors un lien vers lattestation ;
celle-ci est également disponible au téléchargement depuis lespace personnel de lusager. celle-ci est également disponible au téléchargement depuis lespace personnel de lusager.
= render partial: 'new_administrateur/attestation_templates/informations', locals: { f: f } = render partial: 'administrateurs/attestation_templates/informations', locals: { f: f }
.procedure-form__actions.sticky--bottom .procedure-form__actions.sticky--bottom
.actions-left .actions-left
@ -53,4 +53,4 @@
.notice .notice
Cet aperçu est mis à jour après chaque sauvegarde. Cet aperçu est mis à jour après chaque sauvegarde.
.procedure-preview .procedure-preview
= render partial: 'new_administrateur/attestation_templates/apercu', locals: { procedure: @procedure } = render partial: 'administrateurs/attestation_templates/apercu', locals: { procedure: @procedure }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Liste des experts'] } 'Liste des experts'] }

View file

@ -20,7 +20,7 @@
= f.text_field :label, placeholder: 'ex. Ville de Bordeaux', required: true = f.text_field :label, placeholder: 'ex. Ville de Bordeaux', required: true
= f.submit 'Ajouter le groupe', class: "button primary send" = f.submit 'Ajouter le groupe', class: "button primary send"
- csv_max_size = NewAdministrateur::GroupeInstructeursController::CSV_MAX_SIZE - csv_max_size = Administrateurs::GroupeInstructeursController::CSV_MAX_SIZE
= form_tag import_admin_procedure_groupe_instructeurs_path(procedure), method: :post, multipart: true, class: "mt-4 form" do = form_tag import_admin_procedure_groupe_instructeurs_path(procedure), method: :post, multipart: true, class: "mt-4 form" do
= label_tag "Importer par fichier CSV" = label_tag "Importer par fichier CSV"
%p.notice Le fichier csv doit comporter 2 colonnes (Groupe, Email) et être séparé par des virgules. L'import n'écrase pas les groupes et les instructeurs existants. %p.notice Le fichier csv doit comporter 2 colonnes (Groupe, Email) et être séparé par des virgules. L'import n'écrase pas les groupes et les instructeurs existants.

View file

@ -1,23 +1,22 @@
- if @procedure.routee? - if @procedure.routee?
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Groupes dinstructeurs'] } 'Groupes dinstructeurs'] }
- else - else
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Instructeurs'] } 'Instructeurs'] }
.container.groupe-instructeur .container.groupe-instructeur
= render partial: 'new_administrateur/groupe_instructeurs/routing', locals: { procedure: @procedure } = render partial: 'administrateurs/groupe_instructeurs/routing', locals: { procedure: @procedure }
- if @procedure.routee? - if @procedure.routee?
= render partial: 'new_administrateur/groupe_instructeurs/edit', locals: { procedure: @procedure, groupes_instructeurs: @groupes_instructeurs } = render partial: 'administrateurs/groupe_instructeurs/edit', locals: { procedure: @procedure, groupes_instructeurs: @groupes_instructeurs }
- else - else
= render partial: 'new_administrateur/groupe_instructeurs/instructeurs', = render partial: 'administrateurs/groupe_instructeurs/instructeurs',
locals: { procedure: @procedure, locals: { procedure: @procedure,
groupe_instructeur: @procedure.defaut_groupe_instructeur, groupe_instructeur: @procedure.defaut_groupe_instructeur,
instructeurs: @instructeurs, instructeurs: @instructeurs,
available_instructeur_emails: @available_instructeur_emails } available_instructeur_emails: @available_instructeur_emails }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to('Groupes dinstructeurs', admin_procedure_groupe_instructeurs_path(@procedure)), link_to('Groupes dinstructeurs', admin_procedure_groupe_instructeurs_path(@procedure)),

View file

@ -1,13 +1,13 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to('Groupes dinstructeurs', admin_procedure_groupe_instructeurs_path(@procedure)), link_to('Groupes dinstructeurs', admin_procedure_groupe_instructeurs_path(@procedure)),
@groupe_instructeur.label] } @groupe_instructeur.label] }
.container.groupe-instructeur .container.groupe-instructeur
= render partial: 'new_administrateur/groups_header' = render partial: 'administrateurs/groups_header'
= render partial: 'new_administrateur/groupe_instructeurs/instructeurs', = render partial: 'administrateurs/groupe_instructeurs/instructeurs',
locals: { procedure: @procedure, locals: { procedure: @procedure,
groupe_instructeur: @groupe_instructeur, groupe_instructeur: @groupe_instructeur,
instructeurs: @instructeurs, instructeurs: @instructeurs,

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
Procedure.human_attribute_name(:jeton_api_particulier)] } Procedure.human_attribute_name(:jeton_api_particulier)] }
@ -30,5 +30,5 @@
%span.icon.accept %span.icon.accept
%p.card-admin-status-accept= t('.already_configured') %p.card-admin-status-accept= t('.already_configured')
%div %div
%p.card-admin-title= t('new_administrateur.sources_particulier.show.data_sources') %p.card-admin-title= t('administrateurs.sources_particulier.show.data_sources')
%p.button= t('views.shared.actions.edit') %p.button= t('views.shared.actions.edit')

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)), link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)),

View file

@ -2,7 +2,7 @@
- if params[:id] == 'closed_mail' - if params[:id] == 'closed_mail'
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert' = render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to("Emails", admin_procedure_mail_templates_path(@procedure)), link_to("Emails", admin_procedure_mail_templates_path(@procedure)),
@ -31,4 +31,3 @@
Cet aperçu est mis à jour après chaque sauvegarde. Cet aperçu est mis à jour après chaque sauvegarde.
.procedure-preview .procedure-preview
= render partial: 'apercu', locals: { procedure: @procedure } = render partial: 'apercu', locals: { procedure: @procedure }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to("#{@procedure.libelle}", admin_procedure_path(@procedure)), "Configuration des emails"] } link_to("#{@procedure.libelle}", admin_procedure_path(@procedure)), "Configuration des emails"] }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Administrateurs'], preview: false } 'Administrateurs'], preview: false }

View file

@ -0,0 +1,63 @@
%ul.revision-changes
- changes.each do |change|
- postfix = change[:private] ? '_private' : ''
- case change[:op]
- when :add
%li.mb-1= t("add#{postfix}", label: change[:label], scope: [:administrateurs, :revision_changes])
- when :remove
%li.mb-1= t("remove#{postfix}", label: change[:label], scope: [:administrateurs, :revision_changes])
- when :update
- case change[:attribute]
- when :libelle
%li.mb-1= t("update_libelle#{postfix}", label: change[:label], to: change[:to], scope: [:administrateurs, :revision_changes])
- when :type_champ
%li.mb-1= t("update_type_champ#{postfix}", label: change[:label], to: t("activerecord.attributes.type_de_champ.type_champs.#{change[:to]}"), scope: [:administrateurs, :revision_changes])
- when :description
%li.mb-1= t("update_description#{postfix}", label: change[:label], to: change[:to], scope: [:administrateurs, :revision_changes])
- when :drop_down_secondary_libelle
%li.mb-1= t("update_drop_down_secondary_libelle#{postfix}", label: change[:label], to: change[:to], scope: [:administrateurs, :revision_changes])
- when :drop_down_secondary_description
%li.mb-1= t("update_drop_down_secondary_description#{postfix}", label: change[:label], to: change[:to], scope: [:administrateurs, :revision_changes])
- when :mandatory
- if change[:from] == false
-# i18n-tasks-use t('administrateurs.revision_changes.update_mandatory.enabled')
-# i18n-tasks-use t('administrateurs.revision_changes.update_mandatory_private.enabled')
%li.mb-1= t("administrateurs.revision_changes.update_mandatory#{postfix}.enabled", label: change[:label])
- else
-# i18n-tasks-use t('administrateurs.revision_changes.update_mandatory.disabled')
-# i18n-tasks-use t('administrateurs.revision_changes.update_mandatory_private.disabled')
%li.mb-1= t("administrateurs.revision_changes.update_mandatory#{postfix}.disabled", label: change[:label])
- when :piece_justificative_template
-# i18n-tasks-use t('administrateurs.revision_changes.update_piece_justificative_template')
-# i18n-tasks-use t('administrateurs.revision_changes.update_piece_justificative_template_private')
%li.mb-1= t("administrateurs.revision_changes.update_piece_justificative_template#{postfix}", label: change[:label])
- when :drop_down_options
- added = change[:to].sort - change[:from].sort
- removed = change[:from].sort - change[:to].sort
%li.mb-1
= t("update_drop_down_options#{postfix}", scope: [:administrateurs, :revision_changes], label: change[:label])
%ul
- if added.present?
%li= t(:add_option, scope: [:administrateurs, :revision_changes], items: added.map{ |term| "« #{term.strip} »" }.join(", "))
- if removed.present?
%li= t(:remove_option, scope: [:administrateurs, :revision_changes], items: removed.map{ |term| "« #{term.strip} »" }.join(", "))
- when :drop_down_other
- if change[:from] == false
%li.mb-1= t("administrateurs.revision_changes.update_drop_down_other#{postfix}.enabled", label: change[:label])
- else
%li.mb-1= t("administrateurs.revision_changes.update_drop_down_other#{postfix}.disabled", label: change[:label])
- when :carte_layers
- added = change[:to].sort - change[:from].sort
- removed = change[:from].sort - change[:to].sort
%li.mb-1
= t("update_carte_layers#{postfix}", scope: [:administrateurs, :revision_changes], label: change[:label])
%ul
- if added.present?
%li= t(:add_option, scope: [:administrateurs, :revision_changes], items: added.map{ |term| "« #{t(term, scope: [:administrateurs, :carte_layers])} »" }.join(", "))
- if removed.present?
%li= t(:remove_option, scope: [:administrateurs, :revision_changes], items: removed.map{ |term| "« #{t(term, scope: [:administrateurs, :carte_layers])} »" }.join(", "))
- move_changes, move_private_changes = changes.filter { |change| change[:op] == :move }.partition { |change| !change[:private] }
- if move_changes.size != 0
%li.mb-1= t(:move, scope: [:administrateurs, :revision_changes], count: move_changes.size)
- if move_private_changes.size != 0
%li.mb-1= t(:move_private, scope: [:administrateurs, :revision_changes], count: move_private_changes.size)

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Configuration des annotations privées'], preview: true } 'Configuration des annotations privées'], preview: true }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Configuration des champs'], preview: true } 'Configuration des champs'], preview: true }

View file

@ -1,19 +1,19 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer') - content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Description'] } 'Description'] }
.procedure-form .procedure-form
.procedure-form__columns.container .procedure-form__columns.container
= form_for @procedure, = form_for @procedure,
url: url_for({ controller: 'new_administrateur/procedures', action: :update, id: @procedure.id }), url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }),
multipart: true, multipart: true,
html: { class: 'form procedure-form__column--form' } do |f| html: { class: 'form procedure-form__column--form' } do |f|
%h1.page-title Description %h1.page-title Description
= render partial: 'new_administrateur/procedures/informations', locals: { f: f } = render partial: 'administrateurs/procedures/informations', locals: { f: f }
.procedure-form__actions.sticky--bottom .procedure-form__actions.sticky--bottom
.actions-right .actions-right

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Jeton'] } 'Jeton'] }
@ -9,7 +9,7 @@
.container .container
%h1 %h1
= form_with model: @procedure, url: url_for({ controller: 'new_administrateur/procedures', action: :update_jeton }), html: { class: 'form' } do |f| = form_with model: @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_jeton }), html: { class: 'form' } do |f|
%p.explication %p.explication
Démarches Simplifiées utilise Démarches Simplifiées utilise
= link_to 'API Entreprise', "https://entreprise.api.gouv.fr/" = link_to 'API Entreprise', "https://entreprise.api.gouv.fr/"

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'MonAvis'] } 'MonAvis'] }
@ -9,7 +9,7 @@
.container .container
%h1 %h1
= form_for @procedure, url: url_for({ controller: 'new_administrateur/procedures', action: :update_monavis }), multipart: true, html: { class: 'form' } do |f| = form_for @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_monavis }), multipart: true, html: { class: 'form' } do |f|
= render partial: 'monavis', locals: { f: f } = render partial: 'monavis', locals: { f: f }
.text-right .text-right
= f.button 'Enregistrer', class: 'button primary send' = f.button 'Enregistrer', class: 'button primary send'

View file

@ -1,19 +1,19 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer') - content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
'Nouvelle'] } 'Nouvelle'] }
.procedure-form .procedure-form
.procedure-form__columns.container .procedure-form__columns.container
= form_for @procedure, = form_for @procedure,
url: url_for({ controller: 'new_administrateur/procedures', action: :create, id: @procedure.id }), url: url_for({ controller: 'administrateurs/procedures', action: :create, id: @procedure.id }),
multipart: true, multipart: true,
html: { class: 'form procedure-form__column--form' } do |f| html: { class: 'form procedure-form__column--form' } do |f|
%h1.page-title Nouvelle démarche %h1.page-title Nouvelle démarche
= render partial: 'new_administrateur/procedures/informations', locals: { f: f } = render partial: 'administrateurs/procedures/informations', locals: { f: f }
.procedure-form__actions.sticky--bottom .procedure-form__actions.sticky--bottom
.actions-right .actions-right

View file

@ -1,5 +1,5 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Publication'] } 'Publication'] }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
"#{@procedure.libelle}", ], "#{@procedure.libelle}", ],
metadatas: ["Créée le #{@procedure.created_at.strftime('%d/%m/%Y')} - n° #{@procedure.id}", "#{@procedure.close? ? "Close le #{@procedure.closed_at.strftime('%d/%m/%Y')}" : @procedure.locked? ? "Publiée - #{procedure_lien(@procedure)}" : "Brouillon"}"] } metadatas: ["Créée le #{@procedure.created_at.strftime('%d/%m/%Y')} - n° #{@procedure.id}", "#{@procedure.close? ? "Close le #{@procedure.closed_at.strftime('%d/%m/%Y')}" : @procedure.locked? ? "Publiée - #{procedure_lien(@procedure)}" : "Brouillon"}"] }
@ -36,7 +36,7 @@
.container .container
.card.featured .card.featured
.card-title .card-title
= t(:has_changes, scope: [:new_administrateur, :revision_changes]) = t(:has_changes, scope: [:administrateurs, :revision_changes])
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes } = render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
.container .container

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Transfert'] } 'Transfert'] }

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to('choix du service', admin_services_path(procedure_id: @procedure.id)), link_to('choix du service', admin_services_path(procedure_id: @procedure.id)),

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'choix du service'] } 'choix du service'] }
@ -6,7 +6,7 @@
#services-index.container #services-index.container
%h1 Choix du service pour la démarche %h1 Choix du service pour la démarche
= form_for @procedure, url: { controller: "new_administrateur/services", action: :add_to_procedure } , html: { class: 'form' } do |f| = form_for @procedure, url: { controller: "administrateurs/services", action: :add_to_procedure } , html: { class: 'form' } do |f|
= f.label :service_id, "La démarche #{@procedure.libelle} est affectée au service" = f.label :service_id, "La démarche #{@procedure.libelle} est affectée au service"
= f.select :service_id, = f.select :service_id,
@services.map { |s| [ s.nom, s.id ] }, @services.map { |s| [ s.nom, s.id ] },

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to('choix du service', admin_services_path(procedure_id: @procedure.id)), link_to('choix du service', admin_services_path(procedure_id: @procedure.id)),

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path), locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)), link_to(@procedure.libelle, admin_procedure_path(@procedure)),
link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)), link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)),

View file

@ -2,7 +2,7 @@
Bonjour, Bonjour,
%p %p
#{t('new_administrateur.groupe_instructeurs.add_instructeur.assignment', count: @new_instructeur_emails.count, value: @new_instructeur_emails.join(', '), groupe: @group.label).chomp('.')} par « #{@current_instructeur_email} », en charge de la démarche « #{@group.procedure.libelle} ». #{t('administrateurs.groupe_instructeurs.add_instructeur.assignment', count: @new_instructeur_emails.count, value: @new_instructeur_emails.join(', '), groupe: @group.label).chomp('.')} par « #{@current_instructeur_email} », en charge de la démarche « #{@group.procedure.libelle} ».
%p %p
Cliquez sur le lien ci-dessous pour voir la liste des instructeurs de ce groupe : Cliquez sur le lien ci-dessous pour voir la liste des instructeurs de ce groupe :

View file

@ -1,6 +1,6 @@
- content_for(:title, "Archives pour #{@procedure.libelle}") - content_for(:title, "Archives pour #{@procedure.libelle}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
'Archives'] } 'Archives'] }

View file

@ -1,6 +1,6 @@
- content_for(:title, "Notifications pour #{@procedure.libelle}") - content_for(:title, "Notifications pour #{@procedure.libelle}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
'Groupes dinstructeurs'] } 'Groupes dinstructeurs'] }

View file

@ -1,7 +1,7 @@
- if @procedure.routee? - if @procedure.routee?
- content_for(:title, "Instructeurs du groupe #{@groupe_instructeur.label}") - content_for(:title, "Instructeurs du groupe #{@groupe_instructeur.label}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
link_to('Groupes dinstructeurs', instructeur_groupes_path(@procedure)), link_to('Groupes dinstructeurs', instructeur_groupes_path(@procedure)),
@groupe_instructeur.label] } @groupe_instructeur.label] }
@ -9,7 +9,7 @@
- else - else
- content_for(:title, "Instructeurs de la démarche #{@procedure.libelle}") - content_for(:title, "Instructeurs de la démarche #{@procedure.libelle}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), 'Instructeurs'] } locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), 'Instructeurs'] }
.container.groupe-instructeur .container.groupe-instructeur

View file

@ -1,6 +1,6 @@
- content_for(:title, "Notifications pour #{@procedure.libelle}") - content_for(:title, "Notifications pour #{@procedure.libelle}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
'Notifications'] } 'Notifications'] }

View file

@ -1,6 +1,6 @@
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}") - content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
'Contacter les usagers (brouillon)'] } 'Contacter les usagers (brouillon)'] }
.messagerie.container .messagerie.container
@ -28,4 +28,3 @@
- else - else
.page-title.center .page-title.center
%h2 Il n'y a aucun dossier en brouillon dans vos groupes instructeurs %h2 Il n'y a aucun dossier en brouillon dans vos groupes instructeurs

View file

@ -1,7 +1,7 @@
- title = "Statistiques · #{@procedure.libelle}" - title = "Statistiques · #{@procedure.libelle}"
- content_for(:title, title) - content_for(:title, title)
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)), locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
'Statistiques'] } 'Statistiques'] }

View file

@ -1,63 +0,0 @@
%ul.revision-changes
- changes.each do |change|
- postfix = change[:private] ? '_private' : ''
- case change[:op]
- when :add
%li.mb-1= t("add#{postfix}", label: change[:label], scope: [:new_administrateur, :revision_changes])
- when :remove
%li.mb-1= t("remove#{postfix}", label: change[:label], scope: [:new_administrateur, :revision_changes])
- when :update
- case change[:attribute]
- when :libelle
%li.mb-1= t("update_libelle#{postfix}", label: change[:label], to: change[:to], scope: [:new_administrateur, :revision_changes])
- when :type_champ
%li.mb-1= t("update_type_champ#{postfix}", label: change[:label], to: t("activerecord.attributes.type_de_champ.type_champs.#{change[:to]}"), scope: [:new_administrateur, :revision_changes])
- when :description
%li.mb-1= t("update_description#{postfix}", label: change[:label], to: change[:to], scope: [:new_administrateur, :revision_changes])
- when :drop_down_secondary_libelle
%li.mb-1= t("update_drop_down_secondary_libelle#{postfix}", label: change[:label], to: change[:to], scope: [:new_administrateur, :revision_changes])
- when :drop_down_secondary_description
%li.mb-1= t("update_drop_down_secondary_description#{postfix}", label: change[:label], to: change[:to], scope: [:new_administrateur, :revision_changes])
- when :mandatory
- if change[:from] == false
-# i18n-tasks-use t('new_administrateur.revision_changes.update_mandatory.enabled')
-# i18n-tasks-use t('new_administrateur.revision_changes.update_mandatory_private.enabled')
%li.mb-1= t("new_administrateur.revision_changes.update_mandatory#{postfix}.enabled", label: change[:label])
- else
-# i18n-tasks-use t('new_administrateur.revision_changes.update_mandatory.disabled')
-# i18n-tasks-use t('new_administrateur.revision_changes.update_mandatory_private.disabled')
%li.mb-1= t("new_administrateur.revision_changes.update_mandatory#{postfix}.disabled", label: change[:label])
- when :piece_justificative_template
-# i18n-tasks-use t('new_administrateur.revision_changes.update_piece_justificative_template')
-# i18n-tasks-use t('new_administrateur.revision_changes.update_piece_justificative_template_private')
%li.mb-1= t("new_administrateur.revision_changes.update_piece_justificative_template#{postfix}", label: change[:label])
- when :drop_down_options
- added = change[:to].sort - change[:from].sort
- removed = change[:from].sort - change[:to].sort
%li.mb-1
= t("update_drop_down_options#{postfix}", scope: [:new_administrateur, :revision_changes], label: change[:label])
%ul
- if added.present?
%li= t(:add_option, scope: [:new_administrateur, :revision_changes], items: added.map{ |term| "« #{term.strip} »" }.join(", "))
- if removed.present?
%li= t(:remove_option, scope: [:new_administrateur, :revision_changes], items: removed.map{ |term| "« #{term.strip} »" }.join(", "))
- when :drop_down_other
- if change[:from] == false
%li.mb-1= t("new_administrateur.revision_changes.update_drop_down_other#{postfix}.enabled", label: change[:label])
- else
%li.mb-1= t("new_administrateur.revision_changes.update_drop_down_other#{postfix}.disabled", label: change[:label])
- when :carte_layers
- added = change[:to].sort - change[:from].sort
- removed = change[:from].sort - change[:to].sort
%li.mb-1
= t("update_carte_layers#{postfix}", scope: [:new_administrateur, :revision_changes], label: change[:label])
%ul
- if added.present?
%li= t(:add_option, scope: [:new_administrateur, :revision_changes], items: added.map{ |term| "« #{t(term, scope: [:new_administrateur, :carte_layers])} »" }.join(", "))
- if removed.present?
%li= t(:remove_option, scope: [:new_administrateur, :revision_changes], items: removed.map{ |term| "« #{t(term, scope: [:new_administrateur, :carte_layers])} »" }.join(", "))
- move_changes, move_private_changes = changes.filter { |change| change[:op] == :move }.partition { |change| !change[:private] }
- if move_changes.size != 0
%li.mb-1= t(:move, scope: [:new_administrateur, :revision_changes], count: move_changes.size)
- if move_private_changes.size != 0
%li.mb-1= t(:move_private, scope: [:new_administrateur, :revision_changes], count: move_private_changes.size)

View file

@ -1,4 +1,4 @@
= render partial: 'new_administrateur/breadcrumbs', = render partial: 'administrateurs/breadcrumbs',
locals: { steps: [link_to('Tableau de bord', tableau_de_bord_helper_path), locals: { steps: [link_to('Tableau de bord', tableau_de_bord_helper_path),
'Profil'] } 'Profil'] }

View file

@ -398,7 +398,7 @@ fr:
identity_saved: "Identité enregistrée" identity_saved: "Identité enregistrée"
attestation: attestation:
no_longer_available: "Lattestation n'est plus disponible sur ce dossier." no_longer_available: "Lattestation n'est plus disponible sur ce dossier."
new_administrateur: administrateurs:
procedures: procedures:
show: show:
ready: "Validé" ready: "Validé"

View file

@ -1,5 +1,5 @@
fr: fr:
new_administrateur: administrateurs:
experts_procedures: experts_procedures:
wrong_address: wrong_address:
one: "%{value} nest pas une adresse email valide" one: "%{value} nest pas une adresse email valide"

View file

@ -1,5 +1,5 @@
fr: fr:
new_administrateur: administrateurs:
revision_changes: revision_changes:
has_changes: Modifications en cours (appliqué à la prochaine publication) has_changes: Modifications en cours (appliqué à la prochaine publication)
add: Le champ « %{label} » a été ajouté add: Le champ « %{label} » a été ajouté

View file

@ -190,7 +190,7 @@ Rails.application.routes.draw do
end end
# order matters: we don't want those routes to match /admin/procedures/:id # order matters: we don't want those routes to match /admin/procedures/:id
get 'admin/procedures/new' => 'new_administrateur/procedures#new', as: :new_admin_procedure get 'admin/procedures/new' => 'administrateurs/procedures#new', as: :new_admin_procedure
namespace :admin do namespace :admin do
get 'activate' => '/administrateurs/activate#new' get 'activate' => '/administrateurs/activate#new'
@ -397,7 +397,7 @@ Rails.application.routes.draw do
# Administrateur # Administrateur
# #
namespace :admin, module: 'new_administrateur' do scope module: 'administrateurs', path: 'admin', as: 'admin' do
resources :procedures do resources :procedures do
collection do collection do
get 'new_from_existing' get 'new_from_existing'

View file

@ -1,7 +1,7 @@
describe NewAdministrateur::AdministrateurController, type: :controller do describe Administrateurs::AdministrateurController, type: :controller do
describe 'before actions: authenticate_administrateur!' do describe 'before actions: authenticate_administrateur!' do
it 'is present' do it 'is present' do
before_actions = NewAdministrateur::AdministrateurController before_actions = Administrateurs::AdministrateurController
._process_action_callbacks ._process_action_callbacks
.filter { |process_action_callbacks| process_action_callbacks.kind == :before } .filter { |process_action_callbacks| process_action_callbacks.kind == :before }
.map(&:filter) .map(&:filter)

View file

@ -1,6 +1,6 @@
include ActionDispatch::TestProcess include ActionDispatch::TestProcess
describe NewAdministrateur::AttestationTemplatesController, type: :controller do describe Administrateurs::AttestationTemplatesController, type: :controller do
let!(:attestation_template) { create(:attestation_template) } let!(:attestation_template) { create(:attestation_template) }
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
let!(:procedure) { create :procedure, administrateur: admin, attestation_template: attestation_template } let!(:procedure) { create :procedure, administrateur: admin, attestation_template: attestation_template }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::ExpertsProceduresController, type: :controller do describe Administrateurs::ExpertsProceduresController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
let(:procedure) { create :procedure, administrateur: admin } let(:procedure) { create :procedure, administrateur: admin }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::GroupeInstructeursController, type: :controller do describe Administrateurs::GroupeInstructeursController, type: :controller do
render_views render_views
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::JetonParticulierController, type: :controller do describe Administrateurs::JetonParticulierController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
let(:procedure) { create(:procedure, administrateur: admin) } let(:procedure) { create(:procedure, administrateur: admin) }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::MailTemplatesController, type: :controller do describe Administrateurs::MailTemplatesController, type: :controller do
render_views render_views
let(:procedure) { create :procedure } let(:procedure) { create :procedure }
let(:initiated_mail) { Mails::InitiatedMail.default_for_procedure(procedure) } let(:initiated_mail) { Mails::InitiatedMail.default_for_procedure(procedure) }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::ProceduresController, type: :controller do describe Administrateurs::ProceduresController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
let(:bad_procedure_id) { 100000 } let(:bad_procedure_id) { 100000 }
@ -64,7 +64,7 @@ describe NewAdministrateur::ProceduresController, type: :controller do
describe 'GET #new_from_existing' do describe 'GET #new_from_existing' do
before do before do
stub_const("NewAdministrateur::ProceduresController::SIGNIFICANT_DOSSIERS_THRESHOLD", 2) stub_const("Administrateurs::ProceduresController::SIGNIFICANT_DOSSIERS_THRESHOLD", 2)
end end
subject { get :new_from_existing } subject { get :new_from_existing }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::ServicesController, type: :controller do describe Administrateurs::ServicesController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
let(:procedure) { create(:procedure, administrateur: admin) } let(:procedure) { create(:procedure, administrateur: admin) }

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::SourcesParticulierController, type: :controller do describe Administrateurs::SourcesParticulierController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
before { sign_in(admin.user) } before { sign_in(admin.user) }
@ -53,7 +53,7 @@ describe NewAdministrateur::SourcesParticulierController, type: :controller do
it 'saves the source' do it 'saves the source' do
expect(procedure.api_particulier_sources).to eq("cnaf" => { "enfants" => ["nomPrenom"] }) expect(procedure.api_particulier_sources).to eq("cnaf" => { "enfants" => ["nomPrenom"] })
expect(flash.notice).to eq(I18n.t(".new_administrateur.sources_particulier.update.sources_ok")) expect(flash.notice).to eq(I18n.t(".administrateurs.sources_particulier.update.sources_ok"))
end end
end end
end end

View file

@ -1,4 +1,4 @@
describe NewAdministrateur::TypesDeChampController, type: :controller do describe Administrateurs::TypesDeChampController, type: :controller do
let(:admin) { create(:administrateur) } let(:admin) { create(:administrateur) }
describe '#types_de_champs editor api' do describe '#types_de_champs editor api' do

View file

@ -1,4 +1,4 @@
require 'system/admin/procedure_spec_helper' require 'system/administrateurs/procedure_spec_helper'
describe 'As an administrateur I wanna clone a procedure', js: true do describe 'As an administrateur I wanna clone a procedure', js: true do
include ProcedureSpecHelper include ProcedureSpecHelper

View file

@ -1,4 +1,4 @@
require 'system/admin/procedure_spec_helper' require 'system/administrateurs/procedure_spec_helper'
describe 'As an administrateur I wanna create a new procedure', js: true do describe 'As an administrateur I wanna create a new procedure', js: true do
include ProcedureSpecHelper include ProcedureSpecHelper

View file

@ -1,4 +1,4 @@
require 'system/admin/procedure_spec_helper' require 'system/administrateurs/procedure_spec_helper'
describe 'Publication de démarches', js: true do describe 'Publication de démarches', js: true do
include ProcedureSpecHelper include ProcedureSpecHelper

View file

@ -1,4 +1,4 @@
require 'system/admin/procedure_spec_helper' require 'system/administrateurs/procedure_spec_helper'
describe 'Administrateurs can edit procedures', js: true do describe 'Administrateurs can edit procedures', js: true do
include ProcedureSpecHelper include ProcedureSpecHelper

View file

@ -1,4 +1,4 @@
describe 'new_administrateur/experts_procedures/index.html.haml', type: :view do describe 'administrateurs/experts_procedures/index.html.haml', type: :view do
let!(:procedure) { create(:procedure, :published) } let!(:procedure) { create(:procedure, :published) }
before do before do

View file

@ -1,4 +1,4 @@
describe 'new_administrateur/mail_templates/edit.html.haml', type: :view do describe 'administrateurs/mail_templates/edit.html.haml', type: :view do
let(:procedure) { create(:procedure) } let(:procedure) { create(:procedure) }
let(:mail_template) { create(:received_mail, procedure: procedure) } let(:mail_template) { create(:received_mail, procedure: procedure) }
let(:all_tags) { mail_template.tags } let(:all_tags) { mail_template.tags }

View file

@ -1,4 +1,4 @@
describe 'new_administrateur/procedures/edit.html.haml' do describe 'administrateurs/procedures/edit.html.haml' do
let(:logo) { fixture_file_upload('spec/fixtures/files/logo_test_procedure.png', 'image/png') } let(:logo) { fixture_file_upload('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
let(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') } let(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') }

View file

@ -1,4 +1,4 @@
describe 'new_administrateur/procedures/show.html.haml', type: :view do describe 'administrateurs/procedures/show.html.haml', type: :view do
let(:closed_at) { nil } let(:closed_at) { nil }
let(:procedure) { create(:procedure, :with_service, closed_at: closed_at) } let(:procedure) { create(:procedure, :with_service, closed_at: closed_at) }