From 805da59b99fc22b297738976c93a4b0818be5b3b Mon Sep 17 00:00:00 2001 From: kara Diaby Date: Thu, 6 Feb 2020 16:54:38 +0100 Subject: [PATCH 1/6] add thousand separators to numbers (instructors page and pdf file) --- app/views/dossiers/show.pdf.prawn | 3 +++ app/views/shared/dossiers/_champ_row.html.haml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/views/dossiers/show.pdf.prawn b/app/views/dossiers/show.pdf.prawn index 045c9b8bd..5bc0c9215 100644 --- a/app/views/dossiers/show.pdf.prawn +++ b/app/views/dossiers/show.pdf.prawn @@ -94,6 +94,9 @@ def render_single_champ(pdf, champ) pdf.text " - SIRET: #{champ.to_s}" render_identite_etablissement(pdf, champ.etablissement) if champ.etablissement.present? pdf.text "\n" + when 'Champs::NumberChamp' + value = number_with_delimiter(champ.to_s) + format_in_2_lines(pdf, champ.libelle, value) else value = champ.to_s.empty? ? 'Non communiqué' : champ.to_s format_in_2_lines(pdf, champ.libelle, value) diff --git a/app/views/shared/dossiers/_champ_row.html.haml b/app/views/shared/dossiers/_champ_row.html.haml index cfb9f6be9..25644bb62 100644 --- a/app/views/shared/dossiers/_champ_row.html.haml +++ b/app/views/shared/dossiers/_champ_row.html.haml @@ -34,6 +34,8 @@ = c.to_s - when TypeDeChamp.type_champs.fetch(:datetime) = c.to_s + - when TypeDeChamp.type_champs.fetch(:number) + = number_with_delimiter(c.to_s) - else = format_text_value(c.to_s) From 123819f5d2cdf2d1003594847fce9f12f98b9b6a Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 5 Feb 2020 17:01:21 +0100 Subject: [PATCH 2/6] sign_in: remove the hint about password length --- app/views/users/sessions/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index de0d29092..ecb783bfe 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -9,7 +9,7 @@ = f.text_field :email, autofocus: true = f.label :password, "Mot de passe" - = f.password_field :password, placeholder: "8 caractères minimum" + = f.password_field :password .auth-options %div From 6de55f44b4abdaa6dafcc8c8f9167ce4401c319e Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 10 Feb 2020 13:56:12 +0100 Subject: [PATCH 3/6] Remove Fog conf for carrierewave The conf now is config/storage.yaml --- config/secrets.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/config/secrets.yml b/config/secrets.yml index 3d7ffa9af..dad2a01c3 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -33,15 +33,6 @@ defaults: &defaults key: <%= ENV['API_ENTREPRISE_KEY'] %> pipedrive: key: <%= ENV['PIPEDRIVE_KEY'] %> - fog: - enabled: <%= ENV['FOG_ENABLED'] == 'enabled' %> - openstack_tenant: <%= ENV['FOG_OPENSTACK_TENANT'] %> - openstack_api_key: <%= ENV['FOG_OPENSTACK_API_KEY'] %> - openstack_username: <%= ENV['FOG_OPENSTACK_USERNAME'] %> - openstack_auth_url: <%= ENV['FOG_OPENSTACK_URL'] %> - openstack_identity_api_version: "<%= ENV['FOG_OPENSTACK_IDENTITY_API_VERSION'] %>" - openstack_region: <%= ENV['FOG_OPENSTACK_REGION'] %> - directory: <%= ENV['FOG_DIRECTORY'] %> mailtrap: username: <%= ENV['MAILTRAP_USERNAME'] %> password: <%= ENV['MAILTRAP_PASSWORD'] %> From 3d652ffaf8ea1d4f510257d3f6dc4174b11ca5a1 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 10 Feb 2020 13:57:10 +0100 Subject: [PATCH 4/6] Remove unused key --- config/env.example | 1 - config/secrets.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/config/env.example b/config/env.example index 608fd59ff..7b3515bd5 100644 --- a/config/env.example +++ b/config/env.example @@ -36,7 +36,6 @@ FOG_OPENSTACK_USERNAME="" FOG_OPENSTACK_URL="" FOG_OPENSTACK_IDENTITY_API_VERSION="" FOG_OPENSTACK_REGION="" -FOG_DIRECTORY="" FOG_ENABLED="" # valeur attendue: enabled DS_PROXY_URL="" diff --git a/config/secrets.yml b/config/secrets.yml index dad2a01c3..4b670eb6e 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -78,8 +78,6 @@ test: signing_key: aef3153a9829fa4ba10acb02927ac855df6b92795b1ad265d654443c4b14a017 api_entreprise: key: api_entreprise_test_key - fog: - directory: tps_dev pipedrive: key: pipedrive_test_key france_connect_particulier: From 967e5e910f757faf21518accd4f98e696b2a6883 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Mon, 10 Feb 2020 10:22:22 +0100 Subject: [PATCH 5/6] test pending demandes --- .../manager/demandes_controller_spec.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/controllers/manager/demandes_controller_spec.rb diff --git a/spec/controllers/manager/demandes_controller_spec.rb b/spec/controllers/manager/demandes_controller_spec.rb new file mode 100644 index 000000000..39ceb7806 --- /dev/null +++ b/spec/controllers/manager/demandes_controller_spec.rb @@ -0,0 +1,20 @@ +describe Manager::DemandesController, type: :controller do + let(:administration) { create(:administration) } + + describe 'GET #index' do + before do + sign_in administration + end + + it "display pending demandes" do + approved_administrateur = create(:administrateur, email: "approved@example.com") + pending_demande = { email: 'pending@example.com' } + demandes = [{ email: approved_administrateur.email }, pending_demande] + allow(PipedriveService).to receive(:get_demandes).and_return(demandes) + + get :index + + expect(assigns(:pending_demandes)).to eq([pending_demande]) + end + end +end From 52ea019ba96805fc3c70a60a6bec258ad0754365 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 10 Feb 2020 11:52:06 +0000 Subject: [PATCH 6/6] app: replace remaining references of DINSIC by DINUM Fix #4488 --- app/assets/images/footer/logo-dinsic.svg | 1 - app/assets/images/footer/logo-dinum.svg | 1 + app/assets/stylesheets/new_design/new_footer.scss | 4 ++-- app/views/layouts/_footer.html.haml | 2 +- app/views/layouts/mailers/notifications_layout.html.erb | 2 +- app/views/root/_footer.html.haml | 2 +- spec/factories/procedure.rb | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 app/assets/images/footer/logo-dinsic.svg create mode 100644 app/assets/images/footer/logo-dinum.svg diff --git a/app/assets/images/footer/logo-dinsic.svg b/app/assets/images/footer/logo-dinsic.svg deleted file mode 100644 index 85fa7e780..000000000 --- a/app/assets/images/footer/logo-dinsic.svg +++ /dev/null @@ -1 +0,0 @@ -BM_DINSIC \ No newline at end of file diff --git a/app/assets/images/footer/logo-dinum.svg b/app/assets/images/footer/logo-dinum.svg new file mode 100644 index 000000000..096f4714b --- /dev/null +++ b/app/assets/images/footer/logo-dinum.svg @@ -0,0 +1 @@ +BM_DINUM diff --git a/app/assets/stylesheets/new_design/new_footer.scss b/app/assets/stylesheets/new_design/new_footer.scss index 7694d8d34..1c39e723d 100644 --- a/app/assets/stylesheets/new_design/new_footer.scss +++ b/app/assets/stylesheets/new_design/new_footer.scss @@ -69,8 +69,8 @@ footer { opacity: 0.8; } -.footer-logo-dinsic { - @include ie-compatible-background-image("footer/logo-dinsic.svg"); +.footer-logo-dinum { + @include ie-compatible-background-image("footer/logo-dinum.svg"); height: 104px; width: 90px; diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 40a87c284..98d27f0ec 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -1,6 +1,6 @@ #footer %p{ class: "copyright col-md-push-#{12-main_container_size} col-md-#{main_container_size} col-lg-push-#{12-main_container_size} col-lg-#{main_container_size} text-muted small" } - = link_to 'DINSIC', "http://etatplateforme.modernisation.gouv.fr" + = link_to 'DINUM', 'https://www.numerique.gouv.fr/dinum/' = Time.zone.now.year \- = link_to 'Nouveautés', 'https://doc.demarches-simplifiees.fr/nouveautes', target: '_blank' diff --git a/app/views/layouts/mailers/notifications_layout.html.erb b/app/views/layouts/mailers/notifications_layout.html.erb index 7c9ea03f9..7d1ac755d 100644 --- a/app/views/layouts/mailers/notifications_layout.html.erb +++ b/app/views/layouts/mailers/notifications_layout.html.erb @@ -145,7 +145,7 @@
- demarches-simplifiees.fr est un service fourni par la DINSIC et incubé par beta.gouv.fr + demarches-simplifiees.fr est un service fourni par la DINUM et incubé par beta.gouv.fr
diff --git a/app/views/root/_footer.html.haml b/app/views/root/_footer.html.haml index da808b1d1..a53e41c66 100644 --- a/app/views/root/_footer.html.haml +++ b/app/views/root/_footer.html.haml @@ -12,7 +12,7 @@ = link_to "beta.gouv.fr", "https://beta.gouv.fr", title: "le site de Beta.gouv.fr" %li = link_to "http://www.modernisation.gouv.fr/", title: "DINUM" do - %span.footer-logo.footer-logo-dinsic{ role: 'img', 'aria-label': 'DINSIC' } + %span.footer-logo.footer-logo-dinum{ role: 'img', 'aria-label': 'DINUM' } = link_to "https://beta.gouv.fr", title: "le site de Beta.gouv.fr" do %span.footer-logo.footer-logo-beta-gouv-fr{ role: 'img', 'aria-label': 'beta.gouv.fr' } diff --git a/spec/factories/procedure.rb b/spec/factories/procedure.rb index 5dbfdaebc..c15af065d 100644 --- a/spec/factories/procedure.rb +++ b/spec/factories/procedure.rb @@ -3,8 +3,8 @@ FactoryBot.define do factory :procedure do sequence(:libelle) { |n| "Procedure #{n}" } description { "Demande de subvention à l'intention des associations" } - organisation { "Orga DINSIC" } - direction { "direction DINSIC" } + organisation { "Orga DINUM" } + direction { "direction DINUM" } cadre_juridique { "un cadre juridique important" } published_at { nil } duree_conservation_dossiers_dans_ds { 3 }