Merge pull request #6682 from betagouv/bye-bye-new-administrateur
This commit is contained in:
commit
eb0c54f3a8
97 changed files with 155 additions and 158 deletions
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class AdministrateurController < ApplicationController
|
||||
before_action :authenticate_administrateur!
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class AttestationTemplatesController < AdministrateurController
|
||||
before_action :retrieve_procedure
|
||||
|
||||
|
@ -33,7 +33,7 @@ module NewAdministrateur
|
|||
attestation = @procedure.attestation_template || AttestationTemplate.new
|
||||
@attestation = attestation.render_attributes_for({})
|
||||
|
||||
render 'new_administrateur/attestation_templates/show', formats: [:pdf]
|
||||
render 'administrateurs/attestation_templates/show', formats: [:pdf]
|
||||
end
|
||||
|
||||
private
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class ExpertsProceduresController < AdministrateurController
|
||||
before_action :retrieve_procedure
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class GroupeInstructeursController < AdministrateurController
|
||||
include ActiveSupport::NumberHelper
|
||||
ITEMS_PER_PAGE = 25
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class JetonParticulierController < AdministrateurController
|
||||
before_action :retrieve_procedure
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class MailTemplatesController < AdministrateurController
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class ProcedureAdministrateursController < AdministrateurController
|
||||
before_action :retrieve_procedure, except: [:new]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
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 :procedure_revisable?, only: [:champs, :annotations]
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class ServicesController < AdministrateurController
|
||||
def index
|
||||
@services = services.ordered
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class SourcesParticulierController < AdministrateurController
|
||||
before_action :retrieve_procedure
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module NewAdministrateur
|
||||
module Administrateurs
|
||||
class TypesDeChampController < AdministrateurController
|
||||
before_action :retrieve_procedure, only: [:create, :update, :move, :destroy]
|
||||
before_action :procedure_revisable?, only: [:create, :update, :move, :destroy]
|
|
@ -28,7 +28,7 @@ module Instructeurs
|
|||
def apercu_attestation
|
||||
@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
|
||||
|
||||
def bilans_bdf
|
||||
|
|
|
@ -119,7 +119,7 @@ class AttestationTemplate < ApplicationRecord
|
|||
def build_pdf(dossier)
|
||||
attestation = render_attributes_for(dossier: dossier)
|
||||
attestation_view = ApplicationController.render(
|
||||
template: 'new_administrateur/attestation_templates/show',
|
||||
template: 'administrateurs/attestation_templates/show',
|
||||
formats: :pdf,
|
||||
assigns: { attestation: attestation }
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- 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),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Attestation'] }
|
||||
|
@ -8,7 +8,7 @@
|
|||
.procedure-form#attestation-template-edit
|
||||
.procedure-form__columns.container
|
||||
= 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,
|
||||
html: { class: 'form procedure-form__column--form' } do |f|
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
L’email d’accusé d’acceptation envoyé à l’usager comporte alors un lien vers l’attestation ;
|
||||
celle-ci est également disponible au téléchargement depuis l’espace personnel de l’usager.
|
||||
|
||||
= render partial: 'new_administrateur/attestation_templates/informations', locals: { f: f }
|
||||
= render partial: 'administrateurs/attestation_templates/informations', locals: { f: f }
|
||||
|
||||
.procedure-form__actions.sticky--bottom
|
||||
.actions-left
|
||||
|
@ -53,4 +53,4 @@
|
|||
.notice
|
||||
Cet aperçu est mis à jour après chaque sauvegarde.
|
||||
.procedure-preview
|
||||
= render partial: 'new_administrateur/attestation_templates/apercu', locals: { procedure: @procedure }
|
||||
= render partial: 'administrateurs/attestation_templates/apercu', locals: { procedure: @procedure }
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Liste des experts'] }
|
|
@ -20,7 +20,7 @@
|
|||
= f.text_field :label, placeholder: 'ex. Ville de Bordeaux', required: true
|
||||
= 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
|
||||
= 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.
|
|
@ -1,23 +1,22 @@
|
|||
- if @procedure.routee?
|
||||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Groupes d’instructeurs'] }
|
||||
- else
|
||||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Instructeurs'] }
|
||||
|
||||
.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?
|
||||
= 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
|
||||
= render partial: 'new_administrateur/groupe_instructeurs/instructeurs',
|
||||
= render partial: 'administrateurs/groupe_instructeurs/instructeurs',
|
||||
locals: { procedure: @procedure,
|
||||
groupe_instructeur: @procedure.defaut_groupe_instructeur,
|
||||
instructeurs: @instructeurs,
|
||||
available_instructeur_emails: @available_instructeur_emails }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to('Groupes d’instructeurs', admin_procedure_groupe_instructeurs_path(@procedure)),
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to('Groupes d’instructeurs', admin_procedure_groupe_instructeurs_path(@procedure)),
|
||||
@groupe_instructeur.label] }
|
||||
|
||||
.container.groupe-instructeur
|
||||
= render partial: 'new_administrateur/groups_header'
|
||||
= render partial: 'new_administrateur/groupe_instructeurs/instructeurs',
|
||||
= render partial: 'administrateurs/groups_header'
|
||||
= render partial: 'administrateurs/groupe_instructeurs/instructeurs',
|
||||
locals: { procedure: @procedure,
|
||||
groupe_instructeur: @groupe_instructeur,
|
||||
instructeurs: @instructeurs,
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
Procedure.human_attribute_name(:jeton_api_particulier)] }
|
||||
|
@ -30,5 +30,5 @@
|
|||
%span.icon.accept
|
||||
%p.card-admin-status-accept= t('.already_configured')
|
||||
%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')
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)),
|
|
@ -2,7 +2,7 @@
|
|||
- if params[:id] == 'closed_mail'
|
||||
= 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),
|
||||
link_to(@procedure.libelle, admin_procedure_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.
|
||||
.procedure-preview
|
||||
= render partial: 'apercu', locals: { procedure: @procedure }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to("#{@procedure.libelle}", admin_procedure_path(@procedure)), "Configuration des emails"] }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Administrateurs'], preview: false }
|
|
@ -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)
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Configuration des annotations privées'], preview: true }
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Configuration des champs'], preview: true }
|
|
@ -1,19 +1,19 @@
|
|||
- 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),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Description'] }
|
||||
.procedure-form
|
||||
.procedure-form__columns.container
|
||||
= 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,
|
||||
html: { class: 'form procedure-form__column--form' } do |f|
|
||||
|
||||
%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
|
||||
.actions-right
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Jeton'] }
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
.container
|
||||
%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
|
||||
Démarches Simplifiées utilise
|
||||
= link_to 'API Entreprise', "https://entreprise.api.gouv.fr/"
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'MonAvis'] }
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
.container
|
||||
%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 }
|
||||
.text-right
|
||||
= f.button 'Enregistrer', class: 'button primary send'
|
|
@ -1,19 +1,19 @@
|
|||
- 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),
|
||||
'Nouvelle'] }
|
||||
|
||||
.procedure-form
|
||||
.procedure-form__columns.container
|
||||
= 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,
|
||||
html: { class: 'form procedure-form__column--form' } do |f|
|
||||
|
||||
%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
|
||||
.actions-right
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Publication'] }
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
"#{@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"}"] }
|
||||
|
@ -36,7 +36,7 @@
|
|||
.container
|
||||
.card.featured
|
||||
.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 }
|
||||
|
||||
.container
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'Transfert'] }
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to('choix du service', admin_services_path(procedure_id: @procedure.id)),
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
'choix du service'] }
|
||||
|
@ -6,7 +6,7 @@
|
|||
#services-index.container
|
||||
%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.select :service_id,
|
||||
@services.map { |s| [ s.nom, s.id ] },
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to('choix du service', admin_services_path(procedure_id: @procedure.id)),
|
|
@ -1,4 +1,4 @@
|
|||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||||
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
||||
link_to(Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)),
|
|
@ -2,7 +2,7 @@
|
|||
Bonjour,
|
||||
|
||||
%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
|
||||
Cliquez sur le lien ci-dessous pour voir la liste des instructeurs de ce groupe :
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- 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)),
|
||||
'Archives'] }
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- 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)),
|
||||
'Groupes d’instructeurs'] }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- if @procedure.routee?
|
||||
- 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)),
|
||||
link_to('Groupes d’instructeurs', instructeur_groupes_path(@procedure)),
|
||||
@groupe_instructeur.label] }
|
||||
|
@ -9,7 +9,7 @@
|
|||
- else
|
||||
- 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'] }
|
||||
|
||||
.container.groupe-instructeur
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- 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)),
|
||||
'Notifications'] }
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- 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)),
|
||||
'Contacter les usagers (brouillon)'] }
|
||||
.messagerie.container
|
||||
|
@ -28,4 +28,3 @@
|
|||
- else
|
||||
.page-title.center
|
||||
%h2 Il n'y a aucun dossier en brouillon dans vos groupes instructeurs
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- title = "Statistiques · #{@procedure.libelle}"
|
||||
- content_for(:title, title)
|
||||
|
||||
= render partial: 'new_administrateur/breadcrumbs',
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
|
||||
'Statistiques'] }
|
||||
|
||||
|
|
|
@ -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)
|
|
@ -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),
|
||||
'Profil'] }
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ fr:
|
|||
identity_saved: "Identité enregistrée"
|
||||
attestation:
|
||||
no_longer_available: "L’attestation n'est plus disponible sur ce dossier."
|
||||
new_administrateur:
|
||||
administrateurs:
|
||||
procedures:
|
||||
show:
|
||||
ready: "Validé"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
fr:
|
||||
new_administrateur:
|
||||
administrateurs:
|
||||
experts_procedures:
|
||||
wrong_address:
|
||||
one: "%{value} n’est pas une adresse email valide"
|
||||
|
@ -38,7 +38,7 @@ fr:
|
|||
<br><br>
|
||||
Cette fonctionnalité permet d’acheminer les dossier vers chaque groupe, et de ne plus avoir besoin de filtrer ses dossiers parmi une grande quantité de demandes. Elle est donc particulièrement adaptée pour les démarches nationales instruites localement.
|
||||
<br><br>
|
||||
Les instructeurs ne voient que les dossiers les concernant, et n’ont donc pas accès aux données extérieures à leur périmètre.
|
||||
Les instructeurs ne voient que les dossiers les concernant, et n’ont donc pas accès aux données extérieures à leur périmètre.
|
||||
self_managment_notice_html: |
|
||||
L’autogestion des instructeurs permet aux instructeurs de gérer eux-mêmes la liste des instructeurs de la démarche.
|
||||
button:
|
|
@ -1,5 +1,5 @@
|
|||
fr:
|
||||
new_administrateur:
|
||||
administrateurs:
|
||||
revision_changes:
|
||||
has_changes: Modifications en cours (appliqué à la prochaine publication)
|
||||
add: Le champ « %{label} » a été ajouté
|
|
@ -190,7 +190,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
# 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
|
||||
get 'activate' => '/administrateurs/activate#new'
|
||||
|
@ -397,7 +397,7 @@ Rails.application.routes.draw do
|
|||
# Administrateur
|
||||
#
|
||||
|
||||
namespace :admin, module: 'new_administrateur' do
|
||||
scope module: 'administrateurs', path: 'admin', as: 'admin' do
|
||||
resources :procedures do
|
||||
collection do
|
||||
get 'new_from_existing'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
describe NewAdministrateur::AdministrateurController, type: :controller do
|
||||
describe Administrateurs::AdministrateurController, type: :controller do
|
||||
describe 'before actions: authenticate_administrateur!' do
|
||||
it 'is present' do
|
||||
before_actions = NewAdministrateur::AdministrateurController
|
||||
before_actions = Administrateurs::AdministrateurController
|
||||
._process_action_callbacks
|
||||
.filter { |process_action_callbacks| process_action_callbacks.kind == :before }
|
||||
.map(&:filter)
|
|
@ -1,6 +1,6 @@
|
|||
include ActionDispatch::TestProcess
|
||||
|
||||
describe NewAdministrateur::AttestationTemplatesController, type: :controller do
|
||||
describe Administrateurs::AttestationTemplatesController, type: :controller do
|
||||
let!(:attestation_template) { create(:attestation_template) }
|
||||
let(:admin) { create(:administrateur) }
|
||||
let!(:procedure) { create :procedure, administrateur: admin, attestation_template: attestation_template }
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::ExpertsProceduresController, type: :controller do
|
||||
describe Administrateurs::ExpertsProceduresController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
let(:procedure) { create :procedure, administrateur: admin }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::GroupeInstructeursController, type: :controller do
|
||||
describe Administrateurs::GroupeInstructeursController, type: :controller do
|
||||
render_views
|
||||
|
||||
let(:admin) { create(:administrateur) }
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::JetonParticulierController, type: :controller do
|
||||
describe Administrateurs::JetonParticulierController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
let(:procedure) { create(:procedure, administrateur: admin) }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::MailTemplatesController, type: :controller do
|
||||
describe Administrateurs::MailTemplatesController, type: :controller do
|
||||
render_views
|
||||
let(:procedure) { create :procedure }
|
||||
let(:initiated_mail) { Mails::InitiatedMail.default_for_procedure(procedure) }
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::ProceduresController, type: :controller do
|
||||
describe Administrateurs::ProceduresController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
let(:bad_procedure_id) { 100000 }
|
||||
|
||||
|
@ -64,7 +64,7 @@ describe NewAdministrateur::ProceduresController, type: :controller do
|
|||
|
||||
describe 'GET #new_from_existing' do
|
||||
before do
|
||||
stub_const("NewAdministrateur::ProceduresController::SIGNIFICANT_DOSSIERS_THRESHOLD", 2)
|
||||
stub_const("Administrateurs::ProceduresController::SIGNIFICANT_DOSSIERS_THRESHOLD", 2)
|
||||
end
|
||||
|
||||
subject { get :new_from_existing }
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::ServicesController, type: :controller do
|
||||
describe Administrateurs::ServicesController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
let(:procedure) { create(:procedure, administrateur: admin) }
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::SourcesParticulierController, type: :controller do
|
||||
describe Administrateurs::SourcesParticulierController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
|
||||
before { sign_in(admin.user) }
|
||||
|
@ -53,7 +53,7 @@ describe NewAdministrateur::SourcesParticulierController, type: :controller do
|
|||
|
||||
it 'saves the source' do
|
||||
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
|
|
@ -1,4 +1,4 @@
|
|||
describe NewAdministrateur::TypesDeChampController, type: :controller do
|
||||
describe Administrateurs::TypesDeChampController, type: :controller do
|
||||
let(:admin) { create(:administrateur) }
|
||||
|
||||
describe '#types_de_champs editor api' do
|
|
@ -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
|
||||
include ProcedureSpecHelper
|
|
@ -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
|
||||
include ProcedureSpecHelper
|
|
@ -1,4 +1,4 @@
|
|||
require 'system/admin/procedure_spec_helper'
|
||||
require 'system/administrateurs/procedure_spec_helper'
|
||||
|
||||
describe 'Publication de démarches', js: true do
|
||||
include ProcedureSpecHelper
|
|
@ -1,4 +1,4 @@
|
|||
require 'system/admin/procedure_spec_helper'
|
||||
require 'system/administrateurs/procedure_spec_helper'
|
||||
|
||||
describe 'Administrateurs can edit procedures', js: true do
|
||||
include ProcedureSpecHelper
|
|
@ -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) }
|
||||
|
||||
before do
|
|
@ -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(:mail_template) { create(:received_mail, procedure: procedure) }
|
||||
let(:all_tags) { mail_template.tags }
|
|
@ -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(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') }
|
||||
|
|
@ -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(:procedure) { create(:procedure, :with_service, closed_at: closed_at) }
|
||||
|
Loading…
Reference in a new issue