diff --git a/README.md b/README.md index 237c33a0b..ea6dd0dc3 100644 --- a/README.md +++ b/README.md @@ -158,3 +158,9 @@ L'application supporte les navigateurs récents Firefox, Chrome, Internet Explor La compatibilité est testée par Browserstack. [](https://www.browserstack.com/) + +## Performance + +[![View performance data on Skylight](https://badges.skylight.io/status/zAvWTaqO0mu1.svg)](https://oss.skylight.io/app/applications/zAvWTaqO0mu1) + +Nous utilisons Skylight pour suivre les performances de notre application. diff --git a/app/assets/images/footer/logo-dinsic.svg b/app/assets/images/footer/logo-dinsic.svg new file mode 100644 index 000000000..85fa7e780 --- /dev/null +++ b/app/assets/images/footer/logo-dinsic.svg @@ -0,0 +1 @@ +BM_DINSIC \ No newline at end of file diff --git a/app/assets/images/footer/logo-rf.svg b/app/assets/images/footer/logo-rf.svg deleted file mode 100644 index 283fe4c57..000000000 --- a/app/assets/images/footer/logo-rf.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/images/header/logo-tps.svg b/app/assets/images/header/logo-tps.svg index fe6557db5..5ee9d1eb8 100644 --- a/app/assets/images/header/logo-tps.svg +++ b/app/assets/images/header/logo-tps.svg @@ -1 +1 @@ -C03A1FFC-B3DD-48D2-8111-A47EEA63E68F \ No newline at end of file +C03A1FFC-B3DD-48D2-8111-A47EEA63E68F \ No newline at end of file diff --git a/app/assets/images/icons/accept.svg b/app/assets/images/icons/accept.svg index 71fde1f5e..20d2da4e9 100644 --- a/app/assets/images/icons/accept.svg +++ b/app/assets/images/icons/accept.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/account-circle.svg b/app/assets/images/icons/account-circle.svg index ec478f66c..a5b28414c 100644 --- a/app/assets/images/icons/account-circle.svg +++ b/app/assets/images/icons/account-circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/archive.svg b/app/assets/images/icons/archive.svg index 845cd1e70..747911053 100644 --- a/app/assets/images/icons/archive.svg +++ b/app/assets/images/icons/archive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/attachment.svg b/app/assets/images/icons/attachment.svg index 2ffd41273..eb8c18b2c 100644 --- a/app/assets/images/icons/attachment.svg +++ b/app/assets/images/icons/attachment.svg @@ -1 +1 @@ -ic_attach \ No newline at end of file +ic_attach \ No newline at end of file diff --git a/app/assets/images/icons/blue-person.svg b/app/assets/images/icons/blue-person.svg index a5693cac9..fd8046f9d 100644 --- a/app/assets/images/icons/blue-person.svg +++ b/app/assets/images/icons/blue-person.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/edit-folder-blue.svg b/app/assets/images/icons/edit-folder-blue.svg index 1c4e0d187..d4a5fa68e 100644 --- a/app/assets/images/icons/edit-folder-blue.svg +++ b/app/assets/images/icons/edit-folder-blue.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/folder.svg b/app/assets/images/icons/folder.svg index 55cccb64e..c5776633b 100644 --- a/app/assets/images/icons/folder.svg +++ b/app/assets/images/icons/folder.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/follow-folder.svg b/app/assets/images/icons/follow-folder.svg index bfb36faa1..b3ea05d70 100644 --- a/app/assets/images/icons/follow-folder.svg +++ b/app/assets/images/icons/follow-folder.svg @@ -1 +1 @@ -ic_follow_folder \ No newline at end of file +ic_follow_folder \ No newline at end of file diff --git a/app/assets/images/icons/in-progress-blue.svg b/app/assets/images/icons/in-progress-blue.svg index 29d7b574e..e7436ce83 100644 --- a/app/assets/images/icons/in-progress-blue.svg +++ b/app/assets/images/icons/in-progress-blue.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/mail.svg b/app/assets/images/icons/mail.svg index 7a84b97da..986e8da66 100644 --- a/app/assets/images/icons/mail.svg +++ b/app/assets/images/icons/mail.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/printer.svg b/app/assets/images/icons/printer.svg index cd459bf25..4f7ad96f3 100644 --- a/app/assets/images/icons/printer.svg +++ b/app/assets/images/icons/printer.svg @@ -1 +1 @@ -printer \ No newline at end of file +printer \ No newline at end of file diff --git a/app/assets/images/icons/refuse.svg b/app/assets/images/icons/refuse.svg index 9aff82679..f03174094 100644 --- a/app/assets/images/icons/refuse.svg +++ b/app/assets/images/icons/refuse.svg @@ -1 +1 @@ -close \ No newline at end of file +close \ No newline at end of file diff --git a/app/assets/images/icons/search-blue.svg b/app/assets/images/icons/search-blue.svg index e1b35abf2..7ffdf300e 100644 --- a/app/assets/images/icons/search-blue.svg +++ b/app/assets/images/icons/search-blue.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/sign-out.svg b/app/assets/images/icons/sign-out.svg index 30022a12b..184162794 100644 --- a/app/assets/images/icons/sign-out.svg +++ b/app/assets/images/icons/sign-out.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/super-admin.svg b/app/assets/images/icons/super-admin.svg index bb9584ed5..698a7b108 100644 --- a/app/assets/images/icons/super-admin.svg +++ b/app/assets/images/icons/super-admin.svg @@ -1 +1 @@ -Shape \ No newline at end of file +Shape \ No newline at end of file diff --git a/app/assets/images/icons/switch-profile.svg b/app/assets/images/icons/switch-profile.svg index e5d63c13c..9469b7e25 100644 --- a/app/assets/images/icons/switch-profile.svg +++ b/app/assets/images/icons/switch-profile.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/unarchive.svg b/app/assets/images/icons/unarchive.svg index b0098fd53..99673aeac 100644 --- a/app/assets/images/icons/unarchive.svg +++ b/app/assets/images/icons/unarchive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/icons/unfollow-folder.svg b/app/assets/images/icons/unfollow-folder.svg index 272efc828..2b2be62b2 100644 --- a/app/assets/images/icons/unfollow-folder.svg +++ b/app/assets/images/icons/unfollow-folder.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/images/landing/hero/dematerialiser.svg b/app/assets/images/landing/hero/dematerialiser.svg index 8398e066f..e7e51acb7 100755 --- a/app/assets/images/landing/hero/dematerialiser.svg +++ b/app/assets/images/landing/hero/dematerialiser.svg @@ -1 +1 @@ -0EA652BC-3A4A-4613-BA33-535DF72E7337 \ No newline at end of file +0EA652BC-3A4A-4613-BA33-535DF72E7337 \ No newline at end of file diff --git a/app/assets/images/landing/testimonials/quotation-mark.svg b/app/assets/images/landing/testimonials/quotation-mark.svg index 7c49b4e05..ed18e9e01 100644 --- a/app/assets/images/landing/testimonials/quotation-mark.svg +++ b/app/assets/images/landing/testimonials/quotation-mark.svg @@ -1 +1 @@ -Slice \ No newline at end of file +Slice \ No newline at end of file diff --git a/app/assets/images/landing/users/ministere-environnement.jpg b/app/assets/images/landing/users/ministere-environnement.jpg deleted file mode 100644 index 086c252b0..000000000 Binary files a/app/assets/images/landing/users/ministere-environnement.jpg and /dev/null differ diff --git a/app/assets/images/landing/users/mtes.jpg b/app/assets/images/landing/users/mtes.jpg new file mode 100644 index 000000000..b4b8f2996 Binary files /dev/null and b/app/assets/images/landing/users/mtes.jpg differ diff --git a/app/assets/stylesheets/navbar.scss b/app/assets/stylesheets/navbar.scss index 8022dedcb..4976c82e2 100644 --- a/app/assets/stylesheets/navbar.scss +++ b/app/assets/stylesheets/navbar.scss @@ -146,7 +146,7 @@ } .btn-nav.text-danger:hover { - color: #A94442; + color: #A10005; } .navbar { diff --git a/app/assets/stylesheets/new_design/_colors.scss b/app/assets/stylesheets/new_design/_colors.scss index 059b41ef1..14663ebb0 100644 --- a/app/assets/stylesheets/new_design/_colors.scss +++ b/app/assets/stylesheets/new_design/_colors.scss @@ -1,15 +1,15 @@ -$blue: #4393F3; -$light-blue: rgba(61, 149, 236, 0.8); +$blue: #0069CC; +$light-blue: #1C7EC9; $black: #333333; $grey: #999999; $light-grey: #F8F8F8; $border-grey: #CCCCCC; -$dark-red: #A94442; -$light-red: #EBCCD1; -$lighter-red: #F2DEDE; -$green: #35D49E; +$dark-red: #A10005; +$light-red: #ED1C24; +$lighter-red: #F52A2A; +$green: #15AD70; $lighter-green: lighten($green, 30%); $light-green: lighten($green, 25%); $dark-green: darken($green, 20%); -$orange: #F59415; +$orange: #F28900; $orange-bg: lighten($orange, 35%); diff --git a/app/assets/stylesheets/new_design/new_alert.scss b/app/assets/stylesheets/new_design/new_alert.scss index d88c9d6f0..eb554839e 100644 --- a/app/assets/stylesheets/new_design/new_alert.scss +++ b/app/assets/stylesheets/new_design/new_alert.scss @@ -8,7 +8,7 @@ .alert-danger { background-color: $lighter-red; border-color: $light-red; - color: $dark-red; + color: #FFFFFF; } .alert-success { diff --git a/app/assets/stylesheets/new_design/new_footer.scss b/app/assets/stylesheets/new_design/new_footer.scss index 21e7a9185..5f34bc894 100644 --- a/app/assets/stylesheets/new_design/new_footer.scss +++ b/app/assets/stylesheets/new_design/new_footer.scss @@ -54,19 +54,19 @@ footer { opacity: 0.8; } -.footer-logo-rf { - @include ie-compatible-background-image("footer/logo-rf.svg"); - - width: 75px; - height: 44px; - margin-bottom: 14px; -} - .footer-logo-beta-gouv-fr { @include ie-compatible-background-image("footer/logo-beta-gouv-fr.svg"); width: 190px; height: 32px; + margin-bottom: 14px; +} + +.footer-logo-dinsic { + @include ie-compatible-background-image("footer/logo-dinsic.svg"); + + height: 85px; + width: 74px; } .footer-link a { diff --git a/app/models/gestionnaire.rb b/app/models/gestionnaire.rb index 4b4a98aa2..32624b6bd 100644 --- a/app/models/gestionnaire.rb +++ b/app/models/gestionnaire.rb @@ -18,16 +18,6 @@ class Gestionnaire < ActiveRecord::Base procedures.publiees_ou_archivees end - def procedure_filter - procedure_id = self[:procedure_filter] - if procedures.find_by(id: procedure_id).present? - procedure_id - else - self.update_column(:procedure_filter, nil) - nil - end - end - def can_view_dossier?(dossier_id) avis.where(dossier_id: dossier_id).any? || dossiers.where(id: dossier_id).any? diff --git a/app/views/gestionnaire_mailer/last_week_overview.html.haml b/app/views/gestionnaire_mailer/last_week_overview.html.haml index 3e91be452..617da2128 100644 --- a/app/views/gestionnaire_mailer/last_week_overview.html.haml +++ b/app/views/gestionnaire_mailer/last_week_overview.html.haml @@ -4,7 +4,7 @@ %h2{ style: 'font-size: 20px; font-weight: 300; margin: 25px 0 5px;' } #{procedure_overview.procedure.libelle} - = link_to 'voir', gestionnaire_procedure_url(procedure_overview.procedure), style: 'color: #4393F3; font-size: 14px;' + = link_to 'voir', gestionnaire_procedure_url(procedure_overview.procedure), style: 'color: #0069CC; font-size: 14px;' %table{ cellpadding: '0', cellspacing: '0', style: 'width: 100%; padding-bottom: 20px;' } %tbody @@ -24,7 +24,7 @@ - if procedure_overview.old_dossiers_en_construction.count < 6 \: - old_dossiers_en_construction = procedure_overview.old_dossiers_en_construction.map do |old_dossier| - - link_to "nº #{old_dossier.id}", gestionnaire_dossier_url(procedure_overview.procedure, old_dossier), style: 'color: #4393F3;' + - link_to "nº #{old_dossier.id}", gestionnaire_dossier_url(procedure_overview.procedure, old_dossier), style: 'color: #0069CC;' - end.join(', ') = sanitize(old_dossiers_en_construction, attributes: %w(href style)) @@ -38,7 +38,7 @@ - if procedure_overview.old_dossiers_en_instruction.count < 6 \: - old_dossiers_en_instruction = procedure_overview.old_dossiers_en_instruction.map do |old_dossier| - - link_to "nº #{old_dossier.id}", gestionnaire_dossier_url(procedure_overview.procedure, old_dossier), style: 'color: #4393F3;' + - link_to "nº #{old_dossier.id}", gestionnaire_dossier_url(procedure_overview.procedure, old_dossier), style: 'color: #0069CC;' - end.join(', ') = sanitize(old_dossiers_en_instruction, attributes: %w(href style)) diff --git a/app/views/layouts/_new_footer.html.haml b/app/views/layouts/_new_footer.html.haml index 51d4b9945..d04de7f71 100644 --- a/app/views/layouts/_new_footer.html.haml +++ b/app/views/layouts/_new_footer.html.haml @@ -3,13 +3,12 @@ %ul.footer-columns %li.footer-column %ul.footer-logos - %li - = link_to "http://www.gouvernement.fr/" do - %span.footer-logo.footer-logo-rf{ role: 'img', 'aria-label': 'Logo du gouvernement' } - %li = link_to "https://beta.gouv.fr/" do %span.footer-logo.footer-logo-beta-gouv-fr{ role: 'img', 'aria-label': 'Logo de beta.gouv.fr' } + %li + = link_to "http://www.modernisation.gouv.fr/" do + %span.footer-logo.footer-logo-dinsic{ role: 'img', 'aria-label': 'Logo de la DINSIC' } %li.footer-column @@ -38,4 +37,4 @@ %li.footer-link = link_to "FAQ", "http://tps.helpscoutdocs.com/", :class => "footer-link", :target => "_blank" %li.footer-link - = link_to "Accessibilité", "", :class => "footer-link" + = link_to "Accessibilité", accessibilite_index_path, :class => "footer-link" diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index f74ba918f..a0712c972 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -108,8 +108,8 @@ %ul.users %li.user - %a{ :href => "http://www.developpement-durable.gouv.fr/", :target => "_blank " } - %img.user-image{ :src => image_url("landing/users/ministere-environnement.jpg") } + %a{ :href => "https://www.ecologique-solidaire.gouv.fr/", :target => "_blank " } + %img.user-image{ :src => image_url("landing/users/mtes.jpg") } %li.user %a{ :href => "https://www.iledefrance.fr/", :target => "_blank " } %img.user-image{ :src => image_url("landing/users/region-idf.jpg") } diff --git a/db/migrate/20180226162351_remove_procedure_filter_from_gestionnaires.rb b/db/migrate/20180226162351_remove_procedure_filter_from_gestionnaires.rb new file mode 100644 index 000000000..95020cb14 --- /dev/null +++ b/db/migrate/20180226162351_remove_procedure_filter_from_gestionnaires.rb @@ -0,0 +1,5 @@ +class RemoveProcedureFilterFromGestionnaires < ActiveRecord::Migration[5.2] + def change + remove_column :gestionnaires, :procedure_filter, :integer, default: nil + end +end diff --git a/db/schema.rb b/db/schema.rb index 41dfe638a..c85827d5a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_02_19_170553) do +ActiveRecord::Schema.define(version: 2018_02_26_162351) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -311,7 +311,6 @@ ActiveRecord::Schema.define(version: 2018_02_19_170553) do t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" - t.integer "procedure_filter" t.index ["email"], name: "index_gestionnaires_on_email", unique: true t.index ["reset_password_token"], name: "index_gestionnaires_on_reset_password_token", unique: true end diff --git a/spec/models/gestionnaire_spec.rb b/spec/models/gestionnaire_spec.rb index 0a92a7bad..25c5fc3c1 100644 --- a/spec/models/gestionnaire_spec.rb +++ b/spec/models/gestionnaire_spec.rb @@ -5,8 +5,7 @@ describe Gestionnaire, type: :model do let!(:procedure) { create :procedure, :published, administrateur: admin } let!(:procedure_2) { create :procedure, :published, administrateur: admin } let!(:procedure_3) { create :procedure, :published, administrateur: admin } - let(:gestionnaire) { create :gestionnaire, procedure_filter: procedure_filter, administrateurs: [admin] } - let(:procedure_filter) { nil } + let(:gestionnaire) { create :gestionnaire, administrateurs: [admin] } let!(:procedure_assign) { create :assign_to, gestionnaire: gestionnaire, procedure: procedure } before do @@ -136,43 +135,6 @@ describe Gestionnaire, type: :model do end end - describe '#procedure_filter' do - subject { gestionnaire.procedure_filter } - - context 'when procedure_filter_id is nil' do - it { is_expected.to eq nil } - end - - context 'when procedure_filter is not nil' do - context 'when gestionnaire is assign_to the procedure filter id' do - before do - gestionnaire.update_column :procedure_filter, procedure.id - end - - it { expect(AssignTo.where(gestionnaire: gestionnaire, procedure: procedure).count).to eq 1 } - it { is_expected.to eq procedure_assign.procedure.id } - end - - context 'when gestionnaire is not any more assign to the procedure filter id' do - before do - gestionnaire.update_column :procedure_filter, procedure_3.id - end - - it { expect(AssignTo.where(gestionnaire: gestionnaire, procedure: procedure_3).count).to eq 0 } - it { is_expected.to be_nil } - end - - context "when procedure is hidden clear procedure_filter" do - before do - gestionnaire.update_column :procedure_filter, procedure_3.id - procedure_3.hide! - end - - it { is_expected.to be_nil } - end - end - end - describe 'last_week_overview' do let!(:gestionnaire2) { create(:gestionnaire) } subject { gestionnaire2.last_week_overview }