From ac068861f52de9d3a1f550d1dac7d028bb24c9d8 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 14 Mar 2018 11:00:48 +0100 Subject: [PATCH 1/7] [Fix #1607] Add email to dossier details --- app/views/new_gestionnaire/dossiers/_user_infos.html.haml | 5 +++++ app/views/new_gestionnaire/dossiers/print.html.haml | 2 ++ app/views/new_gestionnaire/shared/_show.html.haml | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 app/views/new_gestionnaire/dossiers/_user_infos.html.haml diff --git a/app/views/new_gestionnaire/dossiers/_user_infos.html.haml b/app/views/new_gestionnaire/dossiers/_user_infos.html.haml new file mode 100644 index 000000000..bf003b719 --- /dev/null +++ b/app/views/new_gestionnaire/dossiers/_user_infos.html.haml @@ -0,0 +1,5 @@ +%table.table.vertical.dossier-champs + %tbody + %tr + %th.libelle Email : + %td= user.email diff --git a/app/views/new_gestionnaire/dossiers/print.html.haml b/app/views/new_gestionnaire/dossiers/print.html.haml index a09f803cf..5d9b1b477 100644 --- a/app/views/new_gestionnaire/dossiers/print.html.haml +++ b/app/views/new_gestionnaire/dossiers/print.html.haml @@ -3,6 +3,8 @@ %h2 Identité du demandeur += render partial: "new_gestionnaire/dossiers/user_infos", locals: { user: @dossier.user } + - if @dossier.entreprise.present? = render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise } diff --git a/app/views/new_gestionnaire/shared/_show.html.haml b/app/views/new_gestionnaire/shared/_show.html.haml index f391feb7d..846dd1796 100644 --- a/app/views/new_gestionnaire/shared/_show.html.haml +++ b/app/views/new_gestionnaire/shared/_show.html.haml @@ -1,6 +1,8 @@ .container .tab-title Identité du demandeur .card + = render partial: "new_gestionnaire/dossiers/user_infos", locals: { user: dossier.user } + - if dossier.entreprise.present? = render partial: "new_gestionnaire/dossiers/identite_entreprise", locals: { entreprise: dossier.entreprise } From 96b1c8353777c827c48b04a70417aecfaf2a5d8e Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 14 Mar 2018 11:00:48 +0100 Subject: [PATCH 2/7] Align identite headers to dossier champs headers --- .../dossiers/_identite_entreprise.html.haml | 40 ++++++++++--------- .../dossiers/_identite_individual.html.haml | 10 ++--- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/app/views/new_gestionnaire/dossiers/_identite_entreprise.html.haml b/app/views/new_gestionnaire/dossiers/_identite_entreprise.html.haml index b006acc4f..ec3c532eb 100644 --- a/app/views/new_gestionnaire/dossiers/_identite_entreprise.html.haml +++ b/app/views/new_gestionnaire/dossiers/_identite_entreprise.html.haml @@ -1,47 +1,49 @@ - entreprise = entreprise.decorate - etablissement = entreprise.etablissement -%h4= entreprise.raison_sociale_or_name -%table.table.vertical +%table.table.vertical.dossier-champs %tbody %tr - %th SIRET : + %th.libelle Dénomination : + %td= entreprise.raison_sociale_or_name + %tr + %th.libelle SIRET : %td= entreprise.siret_siege_social %tr - %th Forme juridique : + %th.libelle Forme juridique : %td= sanitize(entreprise.forme_juridique) - if etablissement.present? %tr - %th Libellé NAF : + %th.libelle Libellé NAF : %td= etablissement.libelle_naf %tr - %th Code NAF : + %th.libelle Code NAF : %td= etablissement.naf %tr - %th Date de création : + %th.libelle Date de création : %td= Time.at(entreprise.date_creation).localtime.strftime("%d/%m/%Y") %tr - %th Effectif de l'organisation : + %th.libelle Effectif de l'organisation : %td= entreprise.effectif %tr - %th Code effectif : + %th.libelle Code effectif : %td= entreprise.code_effectif_entreprise %tr - %th Numéro de TVA intracommunautaire : + %th.libelle Numéro de TVA intracommunautaire : %td= entreprise.numero_tva_intracommunautaire - if etablissement.present? %tr - %th Adresse : + %th.libelle Adresse : %td - etablissement.adresse.split("\n").each do |line| = line %br %tr - %th Capital social : + %th.libelle Capital social : %td= entreprise.pretty_capital_social - if etablissement.present? %tr - %th Exercices : + %th.libelle Exercices : %td - etablissement.exercices.each_with_index do |exercice, index| = "#{exercice.date_fin_exercice.year} : " @@ -49,20 +51,20 @@ %br - if entreprise.rna_information.present? %tr - %th Numéro RNA : + %th.libelle Numéro RNA : %td= entreprise.rna_information.association_id %tr - %th Titre : + %th.libelle Titre : %td= entreprise.rna_information.titre %tr - %th Objet : + %th.libelle Objet : %td= entreprise.rna_information.objet %tr - %th Date de création : + %th.libelle Date de création : %td= entreprise.rna_information.date_creation&.strftime("%d/%m/%Y") %tr - %th Date de publication : + %th.libelle Date de publication : %td= entreprise.rna_information.date_publication&.strftime("%d/%m/%Y") %tr - %th Date de déclaration : + %th.libelle Date de déclaration : %td= entreprise.rna_information.date_declaration&.strftime("%d/%m/%Y") diff --git a/app/views/new_gestionnaire/dossiers/_identite_individual.html.haml b/app/views/new_gestionnaire/dossiers/_identite_individual.html.haml index da3e60242..27d8e44a5 100644 --- a/app/views/new_gestionnaire/dossiers/_identite_individual.html.haml +++ b/app/views/new_gestionnaire/dossiers/_identite_individual.html.haml @@ -1,15 +1,15 @@ -%table.table.vertical +%table.table.vertical.dossier-champs %tbody %tr - %th Civilité : + %th.libelle Civilité : %td= individual.gender %tr - %th Prénom : + %th.libelle Prénom : %td= individual.prenom %tr - %th Nom : + %th.libelle Nom : %td= individual.nom - if individual.birthdate.present? %tr - %th Date de naissance : + %th.libelle Date de naissance : %td= Date.parse(individual.birthdate).strftime("%d/%m/%Y") From a90a719d9a098a183033ac05fb4c3e79bdc8e580 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 14 Mar 2018 11:02:28 +0100 Subject: [PATCH 3/7] Improve dossier readability with wider libelles --- app/assets/stylesheets/new_design/dossier_champs.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/new_design/dossier_champs.scss b/app/assets/stylesheets/new_design/dossier_champs.scss index 8260c9777..4310cbd2a 100644 --- a/app/assets/stylesheets/new_design/dossier_champs.scss +++ b/app/assets/stylesheets/new_design/dossier_champs.scss @@ -8,7 +8,7 @@ } .libelle { - width: 250px; + width: 300px; } td.updated-at { From 3f92fe9755945d0518143c28e9c5e972759a3e44 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Wed, 14 Mar 2018 16:16:06 +0100 Subject: [PATCH 4/7] =?UTF-8?q?[Fix=20#1589]=20Keep=20all=20the=20balises?= =?UTF-8?q?=E2=80=99=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/mail_templates/edit.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/mail_templates/edit.html.haml b/app/views/admin/mail_templates/edit.html.haml index 083139147..3f7aa10d7 100644 --- a/app/views/admin/mail_templates/edit.html.haml +++ b/app/views/admin/mail_templates/edit.html.haml @@ -25,6 +25,7 @@ - @mail_template.tags.each do |tag| %tr %td.center - = "--#{tag[:libelle]}--" + %code{ style: "white-space: pre-wrap;" } + = "--#{tag[:libelle]}--" %td = tag[:description] From 8bf09ac2d45d3887bbd9e2529553b735b4317b6d Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Wed, 14 Mar 2018 16:16:18 +0100 Subject: [PATCH 5/7] Do not center balises --- app/views/admin/mail_templates/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/mail_templates/edit.html.haml b/app/views/admin/mail_templates/edit.html.haml index 3f7aa10d7..cf4b67af5 100644 --- a/app/views/admin/mail_templates/edit.html.haml +++ b/app/views/admin/mail_templates/edit.html.haml @@ -24,7 +24,7 @@ Description - @mail_template.tags.each do |tag| %tr - %td.center + %td %code{ style: "white-space: pre-wrap;" } = "--#{tag[:libelle]}--" %td From 4ec782ab15a4de35bf370bf7f09288772cbfefb8 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 13 Mar 2018 11:24:12 +0100 Subject: [PATCH 6/7] [Fix #1599] Add rel attribute to target blank links --- app/views/root/landing.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 28420a47d..f4a83c69b 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -47,7 +47,7 @@ %p.role-panel-explanation Créez des formulaires en ligne en quelques minutes et instruisez les demandes des usagers sur une plateforme dédiée = link_to "Demander un compte", - "mailto:#{t("dynamics.contact_email")}?subject=Demande%20de%20compte%20administrateur%20demarches-simplifiees.fr", + "https://pipedrivewebforms.com/form/c4a5de08b0a1dcc92374e853aa11905a1871869", class: "role-panel-button-primary", target: "_blank", rel: "noopener noreferrer", @@ -198,7 +198,7 @@ %p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider %div = link_to "Contactez-nous", - "mailto:#{t("dynamics.contact_email")}?subject=Question%20à%20propos%20de%20demarches-simplifiees.fr", + "https://pipedrivewebforms.com/form/c4a5de08b0a1dcc92374e853aa11905a1871869", class: "cta-panel-button-white", target: "_blank", rel: "noopener noreferrer" From 25c5873a86ea81360eb06e025c828ffb78471a7e Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Mon, 12 Mar 2018 10:34:27 +0100 Subject: [PATCH 7/7] Go back to official smartlisting gem --- Gemfile | 5 +---- Gemfile.lock | 18 ++++++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index ecc62f822..8436ad730 100644 --- a/Gemfile +++ b/Gemfile @@ -75,10 +75,7 @@ gem 'hashie' gem 'mailjet' -# FIXME: this is a fork, go back to official version -# once https://github.com/Sology/smart_listing/pull/139 -# has been merged and released -gem 'smart_listing', git: 'https://github.com/mizinsky/smart_listing.git', branch: 'kaminari-update' +gem 'smart_listing' gem 'bootstrap-wysihtml5-rails', '~> 0.3.3.8' diff --git a/Gemfile.lock b/Gemfile.lock index 8771888db..8dd66b411 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,17 +25,6 @@ GIT open4 (~> 1.3.4) rake -GIT - remote: https://github.com/mizinsky/smart_listing.git - revision: bcdd4f25954fc6f4faa3d6ea6ea9a69c65da678b - branch: kaminari-update - specs: - smart_listing (1.2.1) - coffee-rails - jquery-rails - kaminari (>= 0.17) - rails (>= 3.2) - GEM remote: https://rubygems.org/ specs: @@ -703,6 +692,11 @@ GEM tilt (~> 2.0) skylight (1.5.1) activesupport (>= 3.0.0) + smart_listing (1.2.2) + coffee-rails + jquery-rails + kaminari (>= 0.17) + rails (>= 3.2) spreadsheet_architect (1.4.8) axlsx (>= 2.0) rodf (= 0.3.7) @@ -853,7 +847,7 @@ DEPENDENCIES shoulda-matchers simple_form skylight - smart_listing! + smart_listing spreadsheet_architect (~> 1.4.8) spring spring-commands-rspec