Add locales dynamics (opensimplif)
This commit is contained in:
parent
e596f71b07
commit
68951c3a53
28 changed files with 169 additions and 59 deletions
|
@ -36,10 +36,10 @@ class PreferenceListDossier < ActiveRecord::Base
|
|||
table = nil
|
||||
|
||||
{
|
||||
dossier_id: create_column('ID', table, 'id', 'id', 1),
|
||||
dossier_id: create_column('N°', table, 'id', 'id', 1),
|
||||
created_at: create_column('Créé le', table, 'created_at', 'first_creation', 2),
|
||||
updated_at: create_column('Mise à jour le', table, 'updated_at', 'last_update', 2),
|
||||
state: create_column('Statut', table, 'state', 'display_state', 1)
|
||||
state: create_column('État', table, 'state', 'display_state', 1)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
= smart_listing_render :accompagnateurs_not_assign
|
||||
|
||||
%br
|
||||
%h3 Ajouter un accompagnateur
|
||||
%h3
|
||||
=t('dynamics.admin.procedure.onglet_accompagnateurs.add.title')
|
||||
#procedure_new.section.section-label
|
||||
= form_for @gestionnaire, url: {controller: 'admin/gestionnaires', action: :create} do |f|
|
||||
.row
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
= link_to('Informations', admin_procedure_path(@procedure))
|
||||
|
||||
%li{ class: ('active' if active == 'Accompagnateurs') }
|
||||
= link_to('Accompagnateurs', admin_procedure_accompagnateurs_path(@procedure))
|
||||
= link_to(t('dynamics.admin.procedure.onglets.accompagnateurs'), admin_procedure_accompagnateurs_path(@procedure))
|
||||
|
||||
%li{ class: ('disabled' if @procedure.locked?) || ('active' if active == 'Description') }
|
||||
= link_to_unless(@procedure.locked?, 'Description', edit_admin_procedure_path(@procedure)) do
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
= link_to("Nouvelle procédure", "/admin/procedures/new", class: 'btn btn-success', style: 'float:right; margin-top:2%;')
|
||||
%h1 Gestion des procédures
|
||||
= link_to(t('dynamics.admin.dossiers.tableau_de_bord.nouvelle_procedure'), "/admin/procedures/new", class: 'btn btn-success', style: 'float:right; margin-top:2%;')
|
||||
%h1
|
||||
=t('dynamics.admin.dossiers.tableau_de_bord.title')
|
||||
%br
|
||||
|
||||
= render partial: 'onglets'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
%h2 Nouvelle procédure
|
||||
%h2
|
||||
=t('dynamics.admin.dossiers.tableau_de_bord.nouvelle_procedure')
|
||||
|
||||
#procedure_new.section.section-label
|
||||
= form_for @procedure, url: {controller: 'admin/procedures', action: :create}, multipart: true do |f|
|
||||
|
|
|
@ -83,7 +83,8 @@
|
|||
= piece_justificative.libelle
|
||||
%br
|
||||
%br
|
||||
%h3 Dossiers
|
||||
%h3
|
||||
=t('dynamics.admin.procedure.stats.title')
|
||||
|
||||
.row
|
||||
.col-md-6.col-lg-6{style:'margin-left:3%'}
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
%li
|
||||
= link_to(admin_procedures_path, id: :menu_item_procedure) do
|
||||
%i.fa.fa-list{ style: "background-size: 10px;"}
|
||||
Procédures
|
||||
|
||||
=t('dynamics.admin.menu.procedures')
|
||||
%li
|
||||
= link_to(admin_gestionnaires_path) do
|
||||
%i.fa.fa-user
|
||||
Accompagnateur
|
||||
|
||||
=t('dynamics.admin.menu.accompagnateurs')
|
||||
%li.divider{ role: :separator}
|
||||
%li
|
||||
= link_to(admin_profile_path, id: :profile) do
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
%br
|
||||
= image_tag('logo-tps.png')
|
||||
%br
|
||||
%h2#login_admin Administration
|
||||
%h2#login_admin
|
||||
=t('dynamics.admin.connexion_title')
|
||||
|
||||
%br
|
||||
%br
|
||||
|
@ -16,7 +17,7 @@
|
|||
= f.email_field :email, class: 'form-control'
|
||||
%br
|
||||
%h4
|
||||
= f.label :password
|
||||
= f.label 'Mot de passe'
|
||||
.input-group
|
||||
.input-group-addon
|
||||
%span.glyphicon.glyphicon-asterisk
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- if current_gestionnaire.follow?(@facade.dossier.id)
|
||||
= link_to('Quitter'.html_safe, backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'btn btn-md btn-danger', id: "suivre_dossier_#{@facade.dossier.id}")
|
||||
= link_to('Se désabonner'.html_safe, backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'btn btn-md btn-danger', id: "suivre_dossier_#{@facade.dossier.id}")
|
||||
-else
|
||||
= link_to('Suivre', backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'btn btn-md btn-primary', id: "suivre_dossier_#{@facade.dossier.id}")
|
||||
= link_to("S'abonner", backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'btn btn-md btn-primary', id: "suivre_dossier_#{@facade.dossier.id}")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
%h3 Personnes suivant l'activité de ce dossier
|
||||
%h3
|
||||
=t('dynamics.dossiers.followers.title')
|
||||
|
||||
%br
|
||||
.row
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#filter_by_procedure{style:'margin-left: 5%'}
|
||||
#filter_by_procedure{style:'margin-left: 2%'}
|
||||
%b.text-info
|
||||
= t('dynamics.backoffice.filter_procedure.title')
|
||||
%select{onchange: 'location = this.value', style:'margin-top: 10px; margin-bottom: 10px', id: 'filter_by_procedure_select'}
|
||||
%option{value: backoffice_dossiers_path}
|
||||
= t('dynamics.backoffice.filter_procedure.first')
|
||||
- @dossiers_list_facade.gestionnaire_procedures_name_and_id_list.each do |procedure|
|
||||
%option{value: backoffice_dossiers_procedure_path(procedure[:id]), ('selected' if procedure[:id] == params[:id].to_i) => '' }
|
||||
= truncate(procedure[:libelle], {length: 50})
|
||||
|
@ -55,7 +58,7 @@
|
|||
%a
|
||||
= form_tag(backoffice_dossiers_search_url, method: :get) do
|
||||
.input-group{style:'width: 300px'}
|
||||
= text_field_tag('q', "#{@search_terms unless @search_terms.nil? }", id: 'q', placeholder: "Rechercher un dossier ...", class:'form-control')
|
||||
= text_field_tag('q', "#{@search_terms unless @search_terms.nil? }", id: 'q', placeholder: t('dynamics.backoffice.research.placeholder'), class:'form-control')
|
||||
%span.input-group-btn
|
||||
%button.btn.btn-default{ id:'search_button' }
|
||||
%i.fa.fa-search
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
%button#pref_list_dossier_close_action.btn.btn-danger.btn-xs{style:'float:right'}
|
||||
%i.fa.fa-close
|
||||
%h3 Gestion de colonnes affichées
|
||||
%h3
|
||||
=t('dynamics.backoffice.pref_list.title')
|
||||
|
||||
%p{style:'margin-top: 15px; margin-bottom: 20px'}
|
||||
Ce menu vous permet de choisir les différentes colonnes que vous souhaitez voir apparaitrent dans votre interface de suivi des dossiers.
|
||||
=t('dynamics.backoffice.pref_list.description')
|
||||
|
||||
%h4.text-primary
|
||||
Actuelles
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
#pref_list_menu
|
||||
= render partial: 'backoffice/dossiers/pref_list'
|
||||
|
||||
=link_to 'Tous mes dossiers en CSV', backoffice_download_dossiers_tps_path, {class: 'btn btn-success btn-sm', style: 'float: right; margin-right: 4%; margin-top: 7px'}
|
||||
%h1 Gestion des dossiers
|
||||
=link_to t('dynamics.backoffice.download_all_dossiers'), backoffice_download_dossiers_tps_path, {class: 'btn btn-success btn-sm', style: 'float: right; margin-right: 4%; margin-top: 7px'}
|
||||
%h1
|
||||
=t('dynamics.backoffice.title')
|
||||
|
||||
= render partial: 'backoffice/dossiers/onglets'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#backoffice_dossier_show
|
||||
%h1#dossier_id.text-info{ :style => 'text-align:right'}
|
||||
= "Dossier n°#{@facade.dossier.id}"
|
||||
= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
||||
|
||||
%div{:style => 'text-align:right'}
|
||||
%h3{:class => 'text-success'}
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
- if @facade.procedure.for_individual?
|
||||
%br
|
||||
.individual.text-info
|
||||
%h4 Dépositaire
|
||||
%h4
|
||||
=t('dynamics.dossiers.depositaite')
|
||||
|
||||
%table.table{style:'width: 60%'}
|
||||
%tr
|
||||
|
@ -25,6 +26,7 @@
|
|||
Prénom
|
||||
%td.col-md-5.col-lg-5
|
||||
= @facade.individual.prenom
|
||||
- unless Features.opensimplif
|
||||
%tr
|
||||
%th.col-md-3.col-lg-3
|
||||
Date de naissance
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
%li
|
||||
= invite.email
|
||||
- else
|
||||
Aucune personne invité
|
||||
Aucune personne invitée
|
||||
|
||||
.col-md-3.col-lg-3
|
||||
=form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
Abonnés
|
||||
%li{role: "presentation"}
|
||||
%a{href: "#champs_private", 'aria-controls' => "champs_private", role: "tab", 'data-toggle' => "tab"}
|
||||
Formulaire
|
||||
Champs privés
|
||||
|
||||
%div{class: "tab-content"}
|
||||
%div{role: "tabpanel", class: "tab-pane fade in active", id:"commentaires"}
|
||||
|
@ -34,11 +34,11 @@
|
|||
%div{role: "tabpanel", class: "tab-pane fade", id:"followers"}
|
||||
= render partial: 'followers'
|
||||
%div{role: "tabpanel", class: "tab-pane fade", id:"champs_private"}
|
||||
%h3 Formulaire privé
|
||||
%h3 Champs privés
|
||||
- if @champs.nil? || @champs.empty?
|
||||
%br
|
||||
%h4.text-primary
|
||||
Pas de formulaire privé pour ce dossier
|
||||
Pas de champ privé pour ce dossier
|
||||
- else
|
||||
= form_for @facade.dossier, url: {controller: 'backoffice/private_formulaires', action: :update, dossier_id: @facade.dossier.id}, remote: true do
|
||||
= render partial: '/users/description/champs'
|
||||
|
|
|
@ -9,18 +9,18 @@
|
|||
|
||||
- if gestionnaire_signed_in? && user_signed_in?
|
||||
%a{href: (current_gestionnaire.procedure_filter.blank? ? backoffice_dossiers_path : backoffice_dossiers_procedure_path(current_gestionnaire.procedure_filter)), class: 'btn btn-md'}
|
||||
Dossiers
|
||||
=t('dynamics.backoffice.dossiers')
|
||||
%a{href: users_dossiers_path, class: 'btn btn-md'}
|
||||
Mes Dossiers
|
||||
=t('dynamics.users.mes_dossiers')
|
||||
- elsif gestionnaire_signed_in?
|
||||
%a{href: (current_gestionnaire.procedure_filter.blank? ? backoffice_dossiers_path : backoffice_dossiers_procedure_path(current_gestionnaire.procedure_filter)), class: 'btn btn-md'}
|
||||
Mes Dossiers
|
||||
=t('dynamics.users.mes_dossiers')
|
||||
- elsif user_signed_in?
|
||||
%a{href: users_dossiers_path, class: 'btn btn-md'}
|
||||
Mes Dossiers
|
||||
=t('dynamics.users.mes_dossiers')
|
||||
- elsif administrateur_signed_in?
|
||||
%a{href: admin_procedures_path, class: 'btn btn-md'}
|
||||
Mes Procédures
|
||||
=t('dynamics.admin.menu.title')
|
||||
|
||||
#sign_out
|
||||
-if user_signed_in?
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
\-
|
||||
|
||||
=link_to 'Contact', "mailto:contact@tps.apientreprise.fr"
|
||||
=link_to 'Contact', "mailto:"+t('dynamics.contact_email')
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
%h2.text-info
|
||||
= @dossier.procedure.libelle
|
||||
|
||||
- unless Features.opensimplif
|
||||
%h3 Votre dossier
|
||||
|
||||
-#TODO use form_for
|
||||
|
@ -37,6 +38,7 @@
|
|||
//TODO a refactorer
|
||||
= render partial: 'users/description/pieces_justificatives'
|
||||
|
||||
- unless Features.opensimplif
|
||||
#state_description.row{style:'width: 50%; margin-left:20px'}
|
||||
.panel.panel-info
|
||||
.panel-body.center
|
||||
|
@ -49,7 +51,6 @@
|
|||
|
||||
|
||||
- if user_signed_in?
|
||||
|
||||
%div{style: 'text-align:right'}
|
||||
%h6 Tous les champs portant un * sont obligatoires.
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#users_index
|
||||
%h1 Mes dossiers
|
||||
%h1
|
||||
=t('dynamics.users.mes_dossiers')
|
||||
|
||||
-unless Features.opensimplif
|
||||
= render partial: 'onglets'
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
.col-md-3.col-lg-3
|
||||
%h2#dossier_id{:class => 'text-info', :style => 'text-align:right; margin-bottom:15px'}
|
||||
= "Dossier n°#{@facade.dossier.id}"
|
||||
= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
||||
|
||||
- if user_signed_in? && current_user.email == @facade.dossier.user.email
|
||||
-if @facade.dossier.validated?
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
= image_tag('logo-tps.png', {id: 'logo_tps'})
|
||||
%br
|
||||
|
||||
%h2#login_user Connexion
|
||||
%h2#login_user
|
||||
=t('dynamics.users.connexion_title')
|
||||
|
||||
%a.btn_fc#btn_fcp{href: '/france_connect/particulier'}
|
||||
= image_tag 'franceconnect_logo.png'
|
||||
|
@ -39,7 +40,7 @@
|
|||
= f.email_field :email, class: 'form-control'
|
||||
%br
|
||||
%h4
|
||||
= f.label :password
|
||||
= f.label 'Mot de passe'
|
||||
.input-group
|
||||
.input-group-addon
|
||||
%span.fa.fa-asterisk
|
||||
|
|
|
@ -94,6 +94,7 @@ set :shared_paths, [
|
|||
"config/initializers/super_admin.rb",
|
||||
"config/unicorn.rb",
|
||||
"config/initializers/raven.rb",
|
||||
"config/locales/dynamics/fr.yml",
|
||||
'config/france_connect.yml',
|
||||
'config/initializers/mailjet.rb',
|
||||
'config/initializers/storage_url.rb',
|
||||
|
@ -138,6 +139,9 @@ task :setup => :environment do
|
|||
queue! %[mkdir -p "#{deploy_to}/shared/app"]
|
||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/app"]
|
||||
|
||||
queue! %[mkdir -p "#{deploy_to}/shared/config/locales/dynamics"]
|
||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/locales/dynamics"]
|
||||
|
||||
queue! %[touch "#{deploy_to}/shared/config/database.yml"]
|
||||
queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."]
|
||||
|
||||
|
|
44
config/locales/dynamics/fr.yml
Normal file
44
config/locales/dynamics/fr.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
fr:
|
||||
dynamics:
|
||||
contact_email: contact@tps.apientreprise.fr
|
||||
users:
|
||||
connexion_title: Connexion
|
||||
mes_dossiers: 'Mes dossiers'
|
||||
|
||||
backoffice:
|
||||
title: Gestion des dossiers
|
||||
dossiers: Dossiers
|
||||
pref_list:
|
||||
title: 'Gestion de colonnes affichées'
|
||||
description: 'Ce menu vous permet de choisir les différentes colonnes que vous souhaitez voir apparaître dans votre interface de suivi des dossiers.'
|
||||
download_all_dossiers: 'Tous mes dossiers en CSV'
|
||||
research:
|
||||
placeholder: 'Rechercher un dossier ...'
|
||||
filter_procedure:
|
||||
title: "Voir qu'une procédure :"
|
||||
first: ''
|
||||
|
||||
dossiers:
|
||||
depositaite: "Dépositaire"
|
||||
numéro: 'Dossier n°'
|
||||
followers:
|
||||
title: "Personnes suivant l'activité de ce dossier"
|
||||
|
||||
admin:
|
||||
connexion_title: Administration
|
||||
dossiers:
|
||||
tableau_de_bord:
|
||||
title: 'Gestion des procédures'
|
||||
nouvelle_procedure: 'Nouvelle procédure'
|
||||
menu:
|
||||
title: Mes procédures
|
||||
accompagnateurs: Accompagnateurs
|
||||
procedures: Procédures
|
||||
procedure:
|
||||
onglets:
|
||||
accompagnateurs: Accompagnateurs
|
||||
stats:
|
||||
title: Dossiers
|
||||
onglet_accompagnateurs:
|
||||
add:
|
||||
title: 'Ajouter un accompagnateur'
|
44
config/locales/dynamics/fr_opensimplif.yml
Normal file
44
config/locales/dynamics/fr_opensimplif.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
fr_opensimplif:
|
||||
dynamics:
|
||||
contact_email: simplification.sgmap@modernisation.gouv.fr
|
||||
users:
|
||||
connexion_title: "Connectez-vous en tant qu'utilisateur"
|
||||
mes_dossiers: 'Mon tableau de bord'
|
||||
|
||||
backoffice:
|
||||
title: Tableau de bord
|
||||
dossiers: Tableau de bord
|
||||
pref_list:
|
||||
title: 'Affichage du tableau de bord'
|
||||
description: 'Ce menu vous permet de choisir les différentes colonnes que vous souhaitez voir apparaître dans le tableau de bord.'
|
||||
download_all_dossiers: 'Exporter'
|
||||
research:
|
||||
placeholder: 'Rechercher une simplification ...'
|
||||
filter_procedure:
|
||||
title: "Statut des simplifications :"
|
||||
first: 'Tous'
|
||||
|
||||
dossiers:
|
||||
depositaite: "Emetteur de la simplification"
|
||||
numéro: 'Simplification n°'
|
||||
followers:
|
||||
title: "Personnes suivant l'activité de cette simplification"
|
||||
|
||||
admin:
|
||||
connexion_title: Connectez-vous en tant qu'administrateur
|
||||
dossiers:
|
||||
tableau_de_bord:
|
||||
title: 'Tableau de bord'
|
||||
nouvelle_procedure: 'Nouveau format de fiche'
|
||||
menu:
|
||||
title: Tableau de bord
|
||||
accompagnateurs: Utilisateurs
|
||||
procedures: Tableau de bord
|
||||
procedure:
|
||||
onglets:
|
||||
accompagnateurs: Utilisateurs
|
||||
stats:
|
||||
title: Simplification
|
||||
onglet_accompagnateurs:
|
||||
add:
|
||||
title: 'Ajouter un utilisateur'
|
|
@ -26,7 +26,7 @@ describe PreferenceListDossier do
|
|||
describe 'dossier_id' do
|
||||
subject { super()[:dossier_id] }
|
||||
|
||||
it { expect(subject[:libelle]).to eq 'ID' }
|
||||
it { expect(subject[:libelle]).to eq 'N°' }
|
||||
it { expect(subject[:table]).to be_nil }
|
||||
it { expect(subject[:attr]).to eq 'id' }
|
||||
it { expect(subject[:attr_decorate]).to eq 'id' }
|
||||
|
@ -62,7 +62,7 @@ describe PreferenceListDossier do
|
|||
describe 'state' do
|
||||
subject { super()[:state] }
|
||||
|
||||
it { expect(subject[:libelle]).to eq 'Statut' }
|
||||
it { expect(subject[:libelle]).to eq 'État' }
|
||||
it { expect(subject[:table]).to be_nil }
|
||||
it { expect(subject[:attr]).to eq 'state' }
|
||||
it { expect(subject[:attr_decorate]).to eq 'display_state' }
|
||||
|
|
|
@ -33,8 +33,8 @@ describe 'layouts/_navbar.html.haml', type: :view do
|
|||
it { is_expected.not_to match(/href="\/users\/sign_in">Utilisateur/) }
|
||||
it { is_expected.not_to match(/href="\/gestionnaires\/sign_in">Accompagnateur/) }
|
||||
it { is_expected.not_to match(/href="\/administrateurs\/sign_in">Administrateur/) }
|
||||
it { is_expected.not_to match(/Mes Dossiers/) }
|
||||
it { is_expected.to match(/Mes Procédures/) }
|
||||
it { is_expected.not_to match(/Mes dossiers/) }
|
||||
it { is_expected.to match(/Mes procédures/) }
|
||||
it { is_expected.to match(/Se déconnecter/) }
|
||||
end
|
||||
|
||||
|
@ -50,8 +50,8 @@ describe 'layouts/_navbar.html.haml', type: :view do
|
|||
it { is_expected.not_to match(/href="\/users\/sign_in">Utilisateur/) }
|
||||
it { is_expected.not_to match(/href="\/gestionnaires\/sign_in">Accompagnateur/) }
|
||||
it { is_expected.not_to match(/href="\/administrateurs\/sign_in">Administrateur/) }
|
||||
it { is_expected.not_to match(/Mes Procédures/) }
|
||||
it { is_expected.to match(/Mes Dossiers/) }
|
||||
it { is_expected.not_to match(/Mes procédures/) }
|
||||
it { is_expected.to match(/Mes dossiers/) }
|
||||
it { is_expected.to match(/Déconnexion/) }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue