From 548e8ce079aac83c9d9067fe95b11ff1b9e0c5e5 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Apr 2017 12:18:54 +0200 Subject: [PATCH 01/72] [Fix #68] Remove reference to application_split2.scss It has been removed in 6a261d1 --- config/application.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 8edea6693..b3c5dc10c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,6 @@ module TPS config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/validators #{config.root}/app/facades) config.assets.paths << Rails.root.join('app', 'assets', 'javascript') - config.assets.precompile += %w( application_split2.css ) if Rails.env.production? URL = "https://tps.apientreprise.fr/" From a93aba5967c14cb965390938d871eb83f556929e Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Thu, 6 Apr 2017 16:15:45 +0200 Subject: [PATCH 02/72] Update poltergeist --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 40665e46f..c627a8b96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,7 +69,7 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.0) + addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) apipie-rails (0.3.7) json @@ -97,7 +97,7 @@ GEM browser (2.3.0) builder (3.2.3) byebug (9.0.6) - capybara (2.11.0) + capybara (2.13.0) addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -413,7 +413,7 @@ GEM json orm_adapter (0.5.0) pg (0.19.0) - poltergeist (1.12.0) + poltergeist (1.14.0) capybara (~> 2.1) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) @@ -424,7 +424,7 @@ GEM pry-byebug (3.4.2) byebug (~> 9.0) pry (~> 0.10) - public_suffix (2.0.4) + public_suffix (2.0.5) rack (2.0.1) rack-handlers (0.7.3) rack @@ -626,7 +626,7 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff - websocket-driver (0.6.4) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) will_paginate (3.1.5) From 86ab596a87ac77ddb550a414f5ac620f2ab4073c Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Thu, 6 Apr 2017 16:58:00 +0200 Subject: [PATCH 03/72] Change test structure --- .../drawing_a_zone_with_freedraw_spec.rb | 23 ++++++++++++++----- spec/features/users/list_dossiers_spec.rb | 1 - 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/spec/features/users/drawing_a_zone_with_freedraw_spec.rb b/spec/features/users/drawing_a_zone_with_freedraw_spec.rb index b7a4f8495..3cbd1c26e 100644 --- a/spec/features/users/drawing_a_zone_with_freedraw_spec.rb +++ b/spec/features/users/drawing_a_zone_with_freedraw_spec.rb @@ -15,13 +15,24 @@ feature 'drawing a zone with freedraw' do expect(page).to have_css('#login_user') end - context 'when he enter login information' do + scenario 'he logs in and he is redirected to carte page', vcr: { cassette_name: 'drawing_a_zone_with_freedraw_redirected_to_carte_page' } do + within('#new_user') do + page.find_by_id('user_email').set user.email + page.find_by_id('user_password').set user.password + page.click_on 'Se connecter' + end + expect(page).to have_css('.content #map') + end + end + + context 'when user is logged in' do + before do + login_as user, scope: :user + end + + context 'when he is visiting the map page' do before do - within('#new_user') do - page.find_by_id('user_email').set user.email - page.find_by_id('user_password').set user.password - page.click_on 'Se connecter' - end + visit users_dossier_carte_path dossier_id: dossier.id end context 'when procedure have api carto activated' do diff --git a/spec/features/users/list_dossiers_spec.rb b/spec/features/users/list_dossiers_spec.rb index d970de7b4..1ae783994 100644 --- a/spec/features/users/list_dossiers_spec.rb +++ b/spec/features/users/list_dossiers_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'user access to the list of his dossier' do - let(:user) { create(:user) } let!(:last_updated_dossier) { create(:dossier, :with_entreprise, user: user, state: 'replied')} let!(:dossier1) { create(:dossier, :with_entreprise, user: user, state: 'replied') } From e6269335696ef750d39a537b50d2cbe24d724b0e Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Mon, 10 Apr 2017 16:05:18 +0200 Subject: [PATCH 04/72] Remove annoying test with external dependency --- .../drawing_a_zone_with_freedraw_spec.rb | 27 ---- ..._with_freedraw_when_draw_a_zone_on_map.yml | 143 ------------------ 2 files changed, 170 deletions(-) delete mode 100644 spec/fixtures/cassettes/drawing_a_zone_with_freedraw_when_draw_a_zone_on_map.yml diff --git a/spec/features/users/drawing_a_zone_with_freedraw_spec.rb b/spec/features/users/drawing_a_zone_with_freedraw_spec.rb index 3cbd1c26e..57633a08b 100644 --- a/spec/features/users/drawing_a_zone_with_freedraw_spec.rb +++ b/spec/features/users/drawing_a_zone_with_freedraw_spec.rb @@ -52,33 +52,6 @@ feature 'drawing a zone with freedraw' do expect(page).to have_content('Le status de votre dossier n\'autorise pas cette URL') end end - - context 'when draw a zone on #map', js: true, vcr: { cassette_name: 'drawing_a_zone_with_freedraw_when_draw_a_zone_on_map' } do - context 'when module quartiers prioritaires is activated' do - let(:module_api_carto) { create(:module_api_carto, :with_quartiers_prioritaires) } - - before do - allow(ModuleApiCartoService). - to receive(:generate_qp). - and_return({"QPCODE1234" => {:code => "QPCODE1234", :nom => "Quartier de test", :commune => "Paris", :geometry => {:type => "MultiPolygon", :coordinates => [[[[2.38715792094576, 48.8723062632126], [2.38724851642619, 48.8721392348061]]]]}}}) - - page.execute_script('freeDraw.fire("markers", {latLngs: []});') - wait_for_ajax - end - - scenario 'div #map .qp is present' do - expect(page).to have_css('.content #map.qp') - end - - scenario 'QP name is present on page' do - expect(page).to have_content('Quartier de test') - end - - scenario 'Commune is present on page' do - expect(page).to have_content('Paris') - end - end - end end end end diff --git a/spec/fixtures/cassettes/drawing_a_zone_with_freedraw_when_draw_a_zone_on_map.yml b/spec/fixtures/cassettes/drawing_a_zone_with_freedraw_when_draw_a_zone_on_map.yml deleted file mode 100644 index 290ed6d79..000000000 --- a/spec/fixtures/cassettes/drawing_a_zone_with_freedraw_when_draw_a_zone_on_map.yml +++ /dev/null @@ -1,143 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://auth.cloud.ovh.net/v2.0/tokens - body: - encoding: UTF-8 - string: '{"auth":{"passwordCredentials":{"username":"ovh_fake_username","password":"ovh_fake_password"},"tenantName":"ovh_fake_tenant_name"}}' - headers: - User-Agent: - - fog/1.38.0 fog-core/1.38.0 - Content-Type: - - application/json - response: - status: - code: 200 - message: '' - headers: - Vary: - - X-Auth-Token - Content-Type: - - application/json - Content-Length: - - '7079' - Date: - - Thu, 12 May 2016 14:05:17 GMT - Connection: - - close - body: - encoding: UTF-8 - string: '{"access": {"token": {"issued_at": "2016-05-12T14:05:17.214079", "expires": - "2016-05-13T14:05:17Z", "id": "ff665d4700654b6d9c94964dfc1a262f", "tenant": - {"id": "a24c37ed11a84896914514384898c34b", "enabled": true, "name": "2627898119540674", - "description": "apientreprise"}, "audit_ids": ["Y2ixVCRJQe-D6IN-cPQQsw"]}, - "serviceCatalog": [{"endpoints": [{"adminURL": "https://compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "GRA1", "internalURL": "https://compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "17f6ef1cc63e492ab8d3f2bda8428cb0", "publicURL": "https://compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "BHS1", "internalURL": "https://compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "21fdd202afd04470bbaf84f9396d0dcc", "publicURL": "https://compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "SBG1", "internalURL": "https://compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "a707bffedf1c4b80a124c585c67c1639", "publicURL": "https://compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}], - "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": - "https://network.compute.gra1.cloud.ovh.net/", "region": "GRA1", "internalURL": - "https://network.compute.gra1.cloud.ovh.net/", "id": "26a339a8c7d5463f89ca937068ebbcd4", - "publicURL": "https://network.compute.gra1.cloud.ovh.net/"}, {"adminURL": - "https://network.compute.bhs1.cloud.ovh.net/", "region": "BHS1", "internalURL": - "https://network.compute.bhs1.cloud.ovh.net/", "id": "3fe2326789ec4e37af2e6b2c80a90876", - "publicURL": "https://network.compute.bhs1.cloud.ovh.net/"}, {"adminURL": - "https://network.compute.sbg1.cloud.ovh.net/", "region": "SBG1", "internalURL": - "https://network.compute.sbg1.cloud.ovh.net/", "id": "075839111e7a41f1bb458926e5f04cec", - "publicURL": "https://network.compute.sbg1.cloud.ovh.net/"}], "endpoints_links": - [], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "https://volume.compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "GRA1", "internalURL": "https://volume.compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "7231957fdf0346e5adebe860ac5e5e57", "publicURL": "https://volume.compute.gra1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://volume.compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "BHS1", "internalURL": "https://volume.compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "2f5b68f95d7b4b1fad1a683dac8e8ca3", "publicURL": "https://volume.compute.bhs1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://volume.compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "region": "SBG1", "internalURL": "https://volume.compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b", - "id": "021b61bd7313479e8f8d77d21c7b434a", "publicURL": "https://volume.compute.sbg1.cloud.ovh.net/v2/a24c37ed11a84896914514384898c34b"}], - "endpoints_links": [], "type": "volumev2", "name": "cinderv2"}, {"endpoints": - [{"adminURL": "https://image.compute.gra1.cloud.ovh.net/", "region": "GRA1", - "internalURL": "https://image.compute.gra1.cloud.ovh.net/", "id": "56795c82f1744e47b7782f1fc2407212", - "publicURL": "https://image.compute.gra1.cloud.ovh.net/"}, {"adminURL": "https://image.compute.bhs1.cloud.ovh.net/", - "region": "BHS1", "internalURL": "https://image.compute.bhs1.cloud.ovh.net/", - "id": "5eaa4cbe80354ea482f2b0477c9c16f0", "publicURL": "https://image.compute.bhs1.cloud.ovh.net/"}, - {"adminURL": "https://image.compute.sbg1.cloud.ovh.net/", "region": "SBG1", - "internalURL": "https://image.compute.sbg1.cloud.ovh.net/", "id": "15758b246d1340e887a2170bd3399071", - "publicURL": "https://image.compute.sbg1.cloud.ovh.net/"}], "endpoints_links": - [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "https://volume.compute.gra1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "region": "GRA1", "internalURL": "https://volume.compute.gra1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "id": "a6936c8876c1490cbf91d0707e78d350", "publicURL": "https://volume.compute.gra1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://volume.compute.bhs1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "region": "BHS1", "internalURL": "https://volume.compute.bhs1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "id": "43bc107cf78448faa9e5a6b3a5ca48dd", "publicURL": "https://volume.compute.bhs1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://volume.compute.sbg1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "region": "SBG1", "internalURL": "https://volume.compute.sbg1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b", - "id": "2be04ee1ddb148c19e91d3da5934fa55", "publicURL": "https://volume.compute.sbg1.cloud.ovh.net/v1/a24c37ed11a84896914514384898c34b"}], - "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": - [{"adminURL": "https://storage.gra1.cloud.ovh.net", "region": "GRA1", "internalURL": - "http://127.0.0.1:8888/v1/AUTH_a24c37ed11a84896914514384898c34b", "id": "c96f61d071a74e36bd3c07e53d241ce3", - "publicURL": "https://storage.gra1.cloud.ovh.net/v1/AUTH_a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://storage.bhs1.cloud.ovh.net:8888/", "region": "BHS1", - "internalURL": "http://127.0.0.1:8888/v1/AUTH_a24c37ed11a84896914514384898c34b", - "id": "3327534a1a824389aae5d663b9821d67", "publicURL": "https://storage.bhs1.cloud.ovh.net/v1/AUTH_a24c37ed11a84896914514384898c34b"}, - {"adminURL": "https://storage.sbg1.cloud.ovh.net", "region": "SBG1", "internalURL": - "http://127.0.0.1:8888/v1/AUTH_a24c37ed11a84896914514384898c34b", "id": "2af96b87ad484cb7879a9ea554d5418c", - "publicURL": "https://storage.sbg1.cloud.ovh.net/v1/AUTH_a24c37ed11a84896914514384898c34b"}], - "endpoints_links": [], "type": "object-store", "name": "swift"}, {"endpoints": - [{"adminURL": "https://auth.cloud.ovh.net:35357/v2.0", "region": "GRA1", "internalURL": - "http://127.0.0.1:5000/v2.0", "id": "62101e498fc3404dbc18ec80888992cb", "publicURL": - "https://auth.cloud.ovh.net/v2.0"}, {"adminURL": "https://auth.cloud.ovh.net:35357/v2.0", - "region": "BHS1", "internalURL": "http://127.0.0.1:5000/v2.0", "id": "00e403276b3246c4a5c54dc7133f9f0a", - "publicURL": "https://auth.cloud.ovh.net/v2.0"}, {"adminURL": "https://auth.cloud.ovh.net:35357/v2.0", - "region": "SBG1", "internalURL": "http://127.0.0.1:5000/v2.0", "id": "6094ef2ed9f240ed9b648dfcc0d9f923", - "publicURL": "https://auth.cloud.ovh.net/v2.0"}], "endpoints_links": [], "type": - "identity", "name": "keystone"}], "user": {"username": "MhsuDbK4DsPr", "roles_links": - [], "id": "43914cf4645747ba90d075c62ebb5018", "roles": [{"name": "_member_"}], - "name": "MhsuDbK4DsPr"}, "metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab"]}}}' - http_version: - recorded_at: Thu, 12 May 2016 14:05:17 GMT -- request: - method: get - uri: http://api-adresse.data.gouv.fr/search?limit=1&q=6%20RUE%20RAOUL%20NORDLING%20IMMEUBLE%20BORA%2092270%20BOIS%20COLOMBES - body: - encoding: US-ASCII - string: '' - headers: - Accept: - - "*/*; q=0.5, application/xml" - Accept-Encoding: - - gzip, deflate - User-Agent: - - Ruby - response: - status: - code: 200 - message: OK - headers: - Server: - - nginx/1.6.2 - Date: - - Thu, 12 May 2016 14:13:15 GMT - Content-Type: - - application/json; charset=utf-8 - Content-Length: - - '189' - Connection: - - keep-alive - Access-Control-Allow-Origin: - - "*" - Access-Control-Allow-Headers: - - X-Requested-With - body: - encoding: UTF-8 - string: '{"limit": 1, "attribution": "BAN", "version": "draft", "licence": "ODbL - 1.0", "query": "6 RUE RAOUL NORDLING IMMEUBLE BORA 92270 BOIS COLOMBES", "type": - "FeatureCollection", "features": []}' - http_version: - recorded_at: Thu, 12 May 2016 14:13:16 GMT -recorded_with: VCR 3.0.1 From 074c6fe72bf6c12db4ccbd2b478b1bcec46b63c7 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:42:00 +0200 Subject: [PATCH 05/72] Use scenic in all environments --- Gemfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index e6d77a9ab..60952ee60 100644 --- a/Gemfile +++ b/Gemfile @@ -93,6 +93,8 @@ gem 'simple_form' gem 'newrelic_rpm' +gem 'scenic' + # Sidekiq gem 'sidekiq' gem 'sidekiq-cron', '~> 0.4.4' @@ -145,6 +147,3 @@ group :production, :staging do gem 'sentry-raven' end -group :production, :staging, :development do - gem 'scenic' -end From 3ca914aba80741c7d4418da7529f352bb74c7a61 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:42:42 +0200 Subject: [PATCH 06/72] Delete some environment-based conditions We should always try to be the closest to the production environment --- app/models/notification.rb | 1 - ...0160127170437_change_date_creation_type_to_entreprise.rb | 6 +----- db/migrate/20161025150900_create_searches.rb | 4 ++-- db/migrate/20161102154835_update_searches_to_version_2.rb | 4 ++-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/models/notification.rb b/app/models/notification.rb index e538f0a25..4ff810f37 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -1,6 +1,5 @@ class Notification < ActiveRecord::Base belongs_to :dossier - serialize :liste if Rails.env.test? # after_save :broadcast_notification diff --git a/db/migrate/20160127170437_change_date_creation_type_to_entreprise.rb b/db/migrate/20160127170437_change_date_creation_type_to_entreprise.rb index 5168938c7..6451dc0d1 100644 --- a/db/migrate/20160127170437_change_date_creation_type_to_entreprise.rb +++ b/db/migrate/20160127170437_change_date_creation_type_to_entreprise.rb @@ -1,10 +1,6 @@ class ChangeDateCreationTypeToEntreprise < ActiveRecord::Migration def up - if Rails.env.test? - change_column :entreprises, :date_creation, "timestamp" - else - change_column :entreprises, :date_creation, "timestamp USING to_timestamp(date_creation) at time zone 'UTC-2'" - end + change_column :entreprises, :date_creation, "timestamp USING to_timestamp(date_creation) at time zone 'UTC-2'" end def down diff --git a/db/migrate/20161025150900_create_searches.rb b/db/migrate/20161025150900_create_searches.rb index 5252c6006..3b2ee975f 100644 --- a/db/migrate/20161025150900_create_searches.rb +++ b/db/migrate/20161025150900_create_searches.rb @@ -9,7 +9,7 @@ class CreateSearches < ActiveRecord::Migration add_index :individuals, :dossier_id add_index :pieces_justificatives, :dossier_id add_index :rna_informations, :entreprise_id - create_view :searches unless Rails.env.test? #, materialized: true + create_view :searches end def down @@ -22,6 +22,6 @@ class CreateSearches < ActiveRecord::Migration remove_index :individuals, :dossier_id remove_index :pieces_justificatives, :dossier_id remove_index :rna_informations, :entreprise_id - drop_view :searches unless Rails.env.test? #, materialized: true + drop_view :searches end end diff --git a/db/migrate/20161102154835_update_searches_to_version_2.rb b/db/migrate/20161102154835_update_searches_to_version_2.rb index b749a08ea..55223b4cf 100644 --- a/db/migrate/20161102154835_update_searches_to_version_2.rb +++ b/db/migrate/20161102154835_update_searches_to_version_2.rb @@ -1,9 +1,9 @@ class UpdateSearchesToVersion2 < ActiveRecord::Migration def up - replace_view :searches, version: 2 unless Rails.env.test? + replace_view :searches, version: 2 end def down - replace_view :searches, version: 1 unless Rails.env.test? + replace_view :searches, version: 1 end end From aef804a988ee892c89498b2a776bf0a34c6ffa6d Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:43:07 +0200 Subject: [PATCH 07/72] Use a postgresql database for tests Try to be the closest to the production environment --- README.md | 1 + config/database.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5c17747dc..e33184bf1 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Les informations nécessaire à l'initialisation de la base doivent être pré-c su - postgres psql > create user tps with password 'lol' superuser; + > create user tps_test with password 'tps_test' superuser; > \q diff --git a/config/database.yml b/config/database.yml index 76a34a338..9f8cb0b14 100644 --- a/config/database.yml +++ b/config/database.yml @@ -9,7 +9,10 @@ development: test: - adapter: sqlite3 + adapter: postgresql + encoding: unicode + database: tps_test + host: localhost pool: 5 - timeout: 5000 - database: db/test.sqlite3 + username: tps_test + password: tps_test From 30d1d872776e496c507b122e1d5e2fe190fd2c16 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 12:09:25 +0200 Subject: [PATCH 08/72] Fix a test due to the move to Postgresql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit double precision’s length is 15 digits --- spec/controllers/users/carte_controller_shared_example.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/users/carte_controller_shared_example.rb b/spec/controllers/users/carte_controller_shared_example.rb index 6e5fe11a1..55d63d266 100644 --- a/spec/controllers/users/carte_controller_shared_example.rb +++ b/spec/controllers/users/carte_controller_shared_example.rb @@ -164,7 +164,7 @@ shared_examples 'carte_controller_spec' do subject { Cadastre.last } it { expect(subject.surface_intersection).to eq('0.0006') } - it { expect(subject.surface_parcelle).to eq(11252.692583090324) } + it { expect(subject.surface_parcelle).to eq(11252.6925830903) } it { expect(subject.numero).to eq('0013') } it { expect(subject.feuille).to eq(1) } it { expect(subject.section).to eq('CD') } From 0e13e4bdfd817585ada22abaae398bf6346413a8 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:43:49 +0200 Subject: [PATCH 09/72] Use transaction instead of truncation DatabaseCleaner strategy It is the recommended strategy for ActiveRecod --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f3b8d6030..d28fae75d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -55,7 +55,7 @@ VCR.configure do |c| c.configure_rspec_metadata! end -DatabaseCleaner.strategy = :truncation +DatabaseCleaner.strategy = :transaction SIADETOKEN = :valid_token unless defined? SIADETOKEN BROWSER.value = Browser.new('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)') From fa9bf2d398603b4071dc384e7e0553a17491ea1d Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 12:09:51 +0200 Subject: [PATCH 10/72] Fix a test now that we use transaction instead of truncation --- spec/models/concern/mail_template_concern_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/concern/mail_template_concern_spec.rb b/spec/models/concern/mail_template_concern_spec.rb index f177a360a..b82d78117 100644 --- a/spec/models/concern/mail_template_concern_spec.rb +++ b/spec/models/concern/mail_template_concern_spec.rb @@ -8,8 +8,8 @@ describe MailTemplateConcern do it 'works' do initiated_mail.object = '[TPS] --numero_dossier-- --libelle_procedure-- --lien_dossier--' expected = - "[TPS] 1 Demande de subvention " + - "http://localhost:3000/users/dossiers/1/recapitulatif" + "[TPS] #{dossier.id} Demande de subvention " + + "http://localhost:3000/users/dossiers/#{dossier.id}/recapitulatif" expect(initiated_mail.object_for_dossier(dossier)).to eq(expected) end From 8015710db27fda83ff26a90dd309ddedbc019bd2 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:52:52 +0200 Subject: [PATCH 11/72] Add config/database.yml.ci --- config/database.yml.ci | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config/database.yml.ci diff --git a/config/database.yml.ci b/config/database.yml.ci new file mode 100644 index 000000000..3d17efadf --- /dev/null +++ b/config/database.yml.ci @@ -0,0 +1,6 @@ +test: + adapter: postgresql + database: app_test + pool: 5 + username: + password: From 8a424059f9889a1bffbc049f5455c6352329afa2 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 11:53:16 +0200 Subject: [PATCH 12/72] Update circle.yml so that it works properly with postgresql --- circle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index d16255161..8fbdcce89 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,7 @@ database: override: - - bundle exec rake db:drop db:create db:migrate RAILS_ENV=test + - cp config/database.yml.ci config/database.yml + - bundle exec rake db:create db:schema:load db:migrate RAILS_ENV=test deployment: staging: From 82b07be45535329fa36ae88e8ed486aab65bcaa4 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 10 Apr 2017 17:33:05 +0200 Subject: [PATCH 13/72] Fix a failing test, incompatible with the new DatabaseCleaner strategy --- spec/features/admin/procedure_creation_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/procedure_creation_spec.rb b/spec/features/admin/procedure_creation_spec.rb index 8081ca485..fbf76005a 100644 --- a/spec/features/admin/procedure_creation_spec.rb +++ b/spec/features/admin/procedure_creation_spec.rb @@ -67,7 +67,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do page.find_by_id('onglet-preview').trigger('click') expect(page).to have_current_path(admin_procedure_previsualisation_path(Procedure.first.id.to_s)) - expect(page.find_by_id('champs_1')['placeholder']).to eq('libelle de champ') + expect(page.find("input[type='text']")['placeholder']).to eq('libelle de champ') expect(page.first('.piece-libelle').text).to eq('libelle de piece') end From beea66ad301c30c45dcc3e0f2333f53f32e855a3 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 10 Apr 2017 17:54:29 +0200 Subject: [PATCH 14/72] Remove the sqlite3 gem We now run tests with PostgreSQL --- Gemfile | 1 - Gemfile.lock | 2 -- 2 files changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index 60952ee60..aaa5c392f 100644 --- a/Gemfile +++ b/Gemfile @@ -116,7 +116,6 @@ group :test do gem 'guard-livereload', '~> 2.4', require: false gem 'vcr' gem 'rails-controller-testing' - gem 'sqlite3' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index c627a8b96..7cd099c9f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -574,7 +574,6 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.13) swd (1.0.1) activesupport (>= 3) attr_required (>= 0.0.5) @@ -705,7 +704,6 @@ DEPENDENCIES spreadsheet_architect spring spring-commands-rspec - sqlite3 therubyracer timecop turbolinks (~> 5.0) From e120e58b07b9e59bfd5770c28a5e15ad8f1336d2 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 13:33:43 +0200 Subject: [PATCH 15/72] Change the username and password for the development DB --- README.md | 2 +- config/database.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e33184bf1..b4b35074e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Les informations nécessaire à l'initialisation de la base doivent être pré-c su - postgres psql - > create user tps with password 'lol' superuser; + > create user tps_development with password 'tps_development' superuser; > create user tps_test with password 'tps_test' superuser; > \q diff --git a/config/database.yml b/config/database.yml index 9f8cb0b14..f3163b7a2 100644 --- a/config/database.yml +++ b/config/database.yml @@ -4,8 +4,8 @@ development: database: tps_development host: localhost pool: 5 - username: tps - password: lol + username: tps_development + password: tps_development test: From d5fdd12da826e1c976b234e376ffb46026ed09eb Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 13:34:01 +0200 Subject: [PATCH 16/72] Clean database.yml --- config/database.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index f3163b7a2..75dedfa2d 100644 --- a/config/database.yml +++ b/config/database.yml @@ -7,7 +7,6 @@ development: username: tps_development password: tps_development - test: adapter: postgresql encoding: unicode From e7e4e41e12b7b7d9f4938bb78893509448d7fd61 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Apr 2017 11:38:44 +0200 Subject: [PATCH 17/72] Haml Ruby evaluation tags must be followed by a space --- app/views/admin/accompagnateurs/show.html.haml | 2 +- .../admin/change_dossier_state/check.html.haml | 2 +- .../admin/gestionnaires/_informations.html.haml | 2 +- app/views/admin/gestionnaires/_list.html.haml | 2 +- app/views/admin/mail_templates/edit.html.haml | 2 +- .../pieces_justificatives/_fields.html.haml | 6 +++--- .../admin/procedures/_informations.html.haml | 8 ++++---- .../admin/procedures/_modal_publish.html.haml | 6 +++--- app/views/admin/procedures/_onglets.html.haml | 4 ++-- app/views/admin/procedures/new.html.haml | 2 +- app/views/admin/procedures/show.html.haml | 10 +++++----- app/views/administrateurs/sessions/new.html.haml | 2 +- app/views/administrations/index.html.haml | 4 ++-- .../backoffice/dossiers/_filter_framed.html.haml | 2 +- .../backoffice/dossiers/_followers.html.haml | 2 +- app/views/backoffice/dossiers/_list.html.haml | 4 ++-- .../backoffice/dossiers/_pref_list.html.haml | 4 ++-- .../dossiers/_state_description.html.haml | 12 ++++++------ app/views/backoffice/dossiers/index.html.haml | 8 ++++---- app/views/backoffice/dossiers/search.html.haml | 2 +- app/views/dossiers/_infos_dossier.html.haml | 12 ++++++------ .../dossiers/_pieces_justificatives.html.haml | 4 ++-- app/views/dossiers/etapes/_etape1.html.haml | 4 ++-- .../etapes/etape_2/_individual.html.haml | 2 +- app/views/layouts/_ie_lt_10.html.haml | 4 ++-- app/views/layouts/_navbar.html.haml | 4 ++-- app/views/layouts/application.html.haml | 4 ++-- ...admin_procedurescontroller_archived.html.haml | 2 +- ...el_admin_procedurescontroller_draft.html.haml | 2 +- ...el_admin_procedurescontroller_index.html.haml | 2 +- ...l_admin_procedurescontroller_navbar.html.haml | 6 +++--- ...backoffice_dossierscontroller_index.html.haml | 2 +- ...anel_users_dossierscontroller_index.html.haml | 2 +- ...ar_admin_procedurescontroller_index.html.haml | 4 ++-- ..._backoffice_dossierscontroller_show.html.haml | 2 +- .../navbars/_navbar_log_options.html.haml | 8 ++++---- app/views/root/landing.html.haml | 6 +++--- app/views/users/carte/_init_carto.html.haml | 2 +- app/views/users/carte/show.html.haml | 12 ++++++------ app/views/users/description/_champs.html.haml | 6 +++--- .../description/_pieces_justificatives.html.haml | 14 +++++++------- app/views/users/description/_show.html.haml | 10 +++++----- .../champs/_header_private_section.html.haml | 2 +- .../description/champs/_header_section.html.haml | 2 +- .../users/dossiers/_state_description.html.haml | 16 ++++++++-------- .../users/sessions/_resume_procedure.html.haml | 4 ++-- app/views/users/sessions/new.html.haml | 2 +- 47 files changed, 113 insertions(+), 113 deletions(-) diff --git a/app/views/admin/accompagnateurs/show.html.haml b/app/views/admin/accompagnateurs/show.html.haml index d62a10c54..eba44b222 100644 --- a/app/views/admin/accompagnateurs/show.html.haml +++ b/app/views/admin/accompagnateurs/show.html.haml @@ -13,7 +13,7 @@ .row .col-xs-5 = hidden_field_tag :procedure_id, params[:procedure_id] - =render partial: 'admin/gestionnaires/informations', locals: {f: f} + = render partial: 'admin/gestionnaires/informations', locals: {f: f} .col-xs-2 %br %br diff --git a/app/views/admin/change_dossier_state/check.html.haml b/app/views/admin/change_dossier_state/check.html.haml index 796518ae7..957c4f3c7 100644 --- a/app/views/admin/change_dossier_state/check.html.haml +++ b/app/views/admin/change_dossier_state/check.html.haml @@ -13,5 +13,5 @@ %select{id: :next_state, name: :next_state} - Dossier.states.each do |state| %option{value: state[0]} - =DossierDecorator.case_state_fr state[1] + = DossierDecorator.case_state_fr state[1] = f.submit 'Valider' diff --git a/app/views/admin/gestionnaires/_informations.html.haml b/app/views/admin/gestionnaires/_informations.html.haml index b7c9a268c..f7246847c 100644 --- a/app/views/admin/gestionnaires/_informations.html.haml +++ b/app/views/admin/gestionnaires/_informations.html.haml @@ -1,4 +1,4 @@ --{email: 'Email*'}.each do |key, value| +- {email: 'Email*'}.each do |key, value| .form-group %h4 = value diff --git a/app/views/admin/gestionnaires/_list.html.haml b/app/views/admin/gestionnaires/_list.html.haml index 48cdd8f68..82f8ff862 100644 --- a/app/views/admin/gestionnaires/_list.html.haml +++ b/app/views/admin/gestionnaires/_list.html.haml @@ -11,7 +11,7 @@ .delete.btn.btn-sm.fa.fa-trash .confirm - =link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), {method: :delete, class: 'btn btn-sm btn-success'} + = link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), {method: :delete, class: 'btn btn-sm btn-success'} .cancel.btn.btn-sm.btn-danger.fa.fa-minus{style: 'top: 0'} = smart_listing.paginate diff --git a/app/views/admin/mail_templates/edit.html.haml b/app/views/admin/mail_templates/edit.html.haml index 31ff8fd7f..8d72c9cc6 100644 --- a/app/views/admin/mail_templates/edit.html.haml +++ b/app/views/admin/mail_templates/edit.html.haml @@ -27,4 +27,4 @@ %td.center = "--#{balise.first}--" %td - =balise.second[:description] + = balise.second[:description] diff --git a/app/views/admin/pieces_justificatives/_fields.html.haml b/app/views/admin/pieces_justificatives/_fields.html.haml index 7c7871a32..7cbdf5a99 100644 --- a/app/views/admin/pieces_justificatives/_fields.html.haml +++ b/app/views/admin/pieces_justificatives/_fields.html.haml @@ -2,16 +2,16 @@ .form-inline .form-group %h4 Libellé - =ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé' + = ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé' .form-group %h4 Description - =ff.text_area :description, class: 'form-control description', placeholder: 'Description' + = ff.text_area :description, class: 'form-control description', placeholder: 'Description' .form-group %h4 Lien du formulaire vierge %small (optionel) - =ff.url_field :lien_demarche, class: 'form-control', placeholder: 'Lien du document vierge' + = ff.url_field :lien_demarche, class: 'form-control', placeholder: 'Lien du document vierge' .form-group = ff.hidden_field :order_place, value: ff.index diff --git a/app/views/admin/procedures/_informations.html.haml b/app/views/admin/procedures/_informations.html.haml index b1aef83f2..5b62353d9 100644 --- a/app/views/admin/procedures/_informations.html.haml +++ b/app/views/admin/procedures/_informations.html.haml @@ -2,7 +2,7 @@ .alert.alert-info Cette procédure est publiée, certains éléments de la description ne sont plus modifiables --{libelle: 'Libellé*', description: 'Description*', organisation: 'Organisation', direction: 'Direction', lien_site_web: 'Lien site internet', lien_notice: 'Lien notice'}.each do |key, value| +- {libelle: 'Libellé*', description: 'Description*', organisation: 'Organisation', direction: 'Direction', lien_site_web: 'Lien site internet', lien_notice: 'Lien notice'}.each do |key, value| .form-group %h4 = value @@ -26,7 +26,7 @@ %h4 Drapeau européen .checkbox %label - =f.check_box :euro_flag + = f.check_box :euro_flag Afficher le drapeau européen - unless @procedure.locked? @@ -37,7 +37,7 @@ = f.fields_for :module_api_carto, @procedure.module_api_carto do |ff| .checkbox %label - =ff.check_box :use_api_carto, id: :procedure_module_api_carto_use_api_carto + = ff.check_box :use_api_carto, id: :procedure_module_api_carto_use_api_carto Utilisation de la cartographie %ul#modules_api_carto @@ -67,7 +67,7 @@ %h4 Particuliers .checkbox %label - =f.check_box :for_individual + = f.check_box :for_individual Cette procédure s'adresse à un public qui %b ne possède pas (ou pas encore) de numéro SIRET, diff --git a/app/views/admin/procedures/_modal_publish.html.haml b/app/views/admin/procedures/_modal_publish.html.haml index a241ae444..1749f2e77 100644 --- a/app/views/admin/procedures/_modal_publish.html.haml +++ b/app/views/admin/procedures/_modal_publish.html.haml @@ -6,12 +6,12 @@ %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"} %span{"aria-hidden" => "true"} × %h4#myModalLabel.modal-title - =@procedure.archived?? 'Réactiver' : 'Publier' + = @procedure.archived?? 'Réactiver' : 'Publier' la procédure %span#publishModal_title .modal-body Vous vous apprêtez à - =@procedure.archived?? 'republier' : 'publier' + = @procedure.archived?? 'republier' : 'publier' votre procédure au public. - unless @procedure.archived? %b @@ -23,7 +23,7 @@ %br %h4 Lien de la procédure %p.center - ="#{root_url}commencer/" + = "#{root_url}commencer/" = text_field_tag('procedure_path', @procedure.default_path, id: 'procedure_path', placeholder: 'Chemin vers la procédure', diff --git a/app/views/admin/procedures/_onglets.html.haml b/app/views/admin/procedures/_onglets.html.haml index ca258a54d..2caac8f1c 100644 --- a/app/views/admin/procedures/_onglets.html.haml +++ b/app/views/admin/procedures/_onglets.html.haml @@ -3,7 +3,7 @@ %li{class: @draft_class} %a{:href => "#{url_for :admin_procedures_draft}"} %h5.text-primary - ="Brouillons" + = "Brouillons" %li{class: @active_class} %a{:href => "#{url_for :admin_procedures}"} @@ -13,5 +13,5 @@ %li{class: @archived_class} %a{:href => "#{url_for :admin_procedures_archived}"} %h5{style: 'color: black'} - ="Archivées" + = "Archivées" %br diff --git a/app/views/admin/procedures/new.html.haml b/app/views/admin/procedures/new.html.haml index b6c555d99..703f98e12 100644 --- a/app/views/admin/procedures/new.html.haml +++ b/app/views/admin/procedures/new.html.haml @@ -1,6 +1,6 @@ .row.white-back %h2 - =t('dynamics.admin.dossiers.tableau_de_bord.nouvelle_procedure') + = 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| diff --git a/app/views/admin/procedures/show.html.haml b/app/views/admin/procedures/show.html.haml index 7249a0ed6..e08f0a40e 100644 --- a/app/views/admin/procedures/show.html.haml +++ b/app/views/admin/procedures/show.html.haml @@ -1,6 +1,6 @@ .row.white-back #procedure_show - -unless @facade.procedure.published? + - unless @facade.procedure.published? - if @facade.procedure.gestionnaires.size == 0 %a.action_button.btn.btn-success{style:'float: right; margin-top: 10px', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.', id: 'publish-procedure'} %i.fa.fa-eraser @@ -10,13 +10,13 @@ %i.fa.fa-eraser Publier - =render partial: '/admin/procedures/modal_publish' + = render partial: '/admin/procedures/modal_publish' %a#transfer.btn.btn-small.btn-default{"data-target" => "#transferModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px; margin-right: 10px'} %i.fa.fa-exchange Transférer - =render partial: '/admin/procedures/modal_transfer' + = render partial: '/admin/procedures/modal_transfer' - if @facade.procedure.archived? %a#reenable.btn.btn-small.btn-default.text-info{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px'} @@ -90,7 +90,7 @@ %br %br %h3 - =t('dynamics.admin.procedure.stats.title') + = t('dynamics.admin.procedure.stats.title') .row .col-xs-6{style:'margin-left:3%'} @@ -129,4 +129,4 @@ - if @facade.dossiers_for_pie_highchart.blank? Aucune statistique pour le moment - else - =pie_chart @facade.dossiers_for_pie_highchart + = pie_chart @facade.dossiers_for_pie_highchart diff --git a/app/views/administrateurs/sessions/new.html.haml b/app/views/administrateurs/sessions/new.html.haml index a2b8d0435..1d2a616cb 100644 --- a/app/views/administrateurs/sessions/new.html.haml +++ b/app/views/administrateurs/sessions/new.html.haml @@ -3,7 +3,7 @@ = image_tag(image_url(LOGO_NAME)) %br %h2#login_admin - =t('dynamics.admin.connexion_title') + = t('dynamics.admin.connexion_title') %br %br diff --git a/app/views/administrations/index.html.haml b/app/views/administrations/index.html.haml index 4e83c9cfc..0262424be 100644 --- a/app/views/administrations/index.html.haml +++ b/app/views/administrations/index.html.haml @@ -8,7 +8,7 @@ = f.submit 'Créer un administrateur', class: 'btn btn-success', id: 'submit_new_administrateur' .text-center - =link_to 'Stats', administrations_stats_path, style: 'margin-bottom: 50px; display: block', 'data-no-turbolink': true + = link_to 'Stats', administrations_stats_path, style: 'margin-bottom: 50px; display: block', 'data-no-turbolink': true = smart_listing_render :admins @@ -16,4 +16,4 @@ %br .text-center - =link_to 'Deconnexion', '/administrations/sign_out', method: :delete + = link_to 'Deconnexion', '/administrations/sign_out', method: :delete diff --git a/app/views/backoffice/dossiers/_filter_framed.html.haml b/app/views/backoffice/dossiers/_filter_framed.html.haml index 5e8337870..393edbdeb 100644 --- a/app/views/backoffice/dossiers/_filter_framed.html.haml +++ b/app/views/backoffice/dossiers/_filter_framed.html.haml @@ -2,7 +2,7 @@ .panel-heading = preference.libelle - =form_tag @facade_data_view.filter_url, {class: 'panel-body form-inline', method: :post} do + = form_tag @facade_data_view.filter_url, {class: 'panel-body form-inline', method: :post} do %input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 69%', value: "#{preference.filter}"} %button.btn.btn-sm.btn-success %i.fa.fa-check diff --git a/app/views/backoffice/dossiers/_followers.html.haml b/app/views/backoffice/dossiers/_followers.html.haml index c9cd2b528..633e2dcc1 100644 --- a/app/views/backoffice/dossiers/_followers.html.haml +++ b/app/views/backoffice/dossiers/_followers.html.haml @@ -1,5 +1,5 @@ %h3 - =t('dynamics.dossiers.followers.title') + = t('dynamics.dossiers.followers.title') %br .row diff --git a/app/views/backoffice/dossiers/_list.html.haml b/app/views/backoffice/dossiers/_list.html.haml index bf18a4ad2..c4c7a796d 100644 --- a/app/views/backoffice/dossiers/_list.html.haml +++ b/app/views/backoffice/dossiers/_list.html.haml @@ -11,7 +11,7 @@ %th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"} - if preference.table.to_s.include? 'champs' = preference.libelle - -else + - else = smart_listing.sortable preference.libelle, preference.table_attr - if @facade_data_view.active_filter? preference %i.filter.fa.fa-filter{style: "color:#{(preference.filter.blank? ? 'grey' : 'orange')}", id: "filter_#{smart_listing.name.to_s}_#{preference.table_attr.sub('.', '_')}"} @@ -54,7 +54,7 @@ %td.center - if current_gestionnaire.follow?(dossier.id) = link_to('Quitter'.html_safe, backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-danger', id: "suivre_dossier_#{dossier.id}") - -else + - else = link_to('Suivre', backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-primary', id: "suivre_dossier_#{dossier.id}") %td.center{style:"color: #{dossier.total_follow == 0 ? 'red' : ''}"} = dossier.total_follow diff --git a/app/views/backoffice/dossiers/_pref_list.html.haml b/app/views/backoffice/dossiers/_pref_list.html.haml index 00fe0f247..1e171f124 100644 --- a/app/views/backoffice/dossiers/_pref_list.html.haml +++ b/app/views/backoffice/dossiers/_pref_list.html.haml @@ -1,10 +1,10 @@ %button#pref_list_dossier_close_action.btn.btn-danger.btn-xs.fixed-right %i.fa.fa-close %h3 - =t('dynamics.backoffice.pref_list.title') + = t('dynamics.backoffice.pref_list.title') %p{style:'margin-top: 15px; margin-bottom: 20px'} - =t('dynamics.backoffice.pref_list.description') + = t('dynamics.backoffice.pref_list.description') %h4.text-primary Actuelles diff --git a/app/views/backoffice/dossiers/_state_description.html.haml b/app/views/backoffice/dossiers/_state_description.html.haml index 60ac57068..1b726ba0d 100644 --- a/app/views/backoffice/dossiers/_state_description.html.haml +++ b/app/views/backoffice/dossiers/_state_description.html.haml @@ -5,17 +5,17 @@ .col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1 .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .col-xs-11 - -if dossiers_list_facade.liste == 'nouveaux' + - if dossiers_list_facade.liste == 'nouveaux' Tous les dossiers présents dans cette liste sont ceux qui %b n'ont jamais été ouvert par votre service. Il attende une première lecture et intervention de votre part. - -elsif dossiers_list_facade.liste == 'a_traiter' + - elsif dossiers_list_facade.liste == 'a_traiter' Tous les dossiers présents dans cette liste sont ceux qui sont %b en cours de construction avec l'usager. Ils ne sont pas figés et ne sont donc pas complets. - -elsif dossiers_list_facade.liste == 'fige' + - elsif dossiers_list_facade.liste == 'fige' Tous les dossiers présents dans cette liste ont été déclarés %b complets @@ -23,14 +23,14 @@ %b plus modifiables par l'usager. Ils attendent donc leurs dépots officiels qui doit être effectué par l'usager. - -elsif dossiers_list_facade.liste == 'deposes' + - elsif dossiers_list_facade.liste == 'deposes' Tous les dossiers présents dans cette liste ont été %b officiellement déposé par l'usager pour examen. Il faut donc que vous confirmiez par "accusé de réception" la bonne réception de toutes les informations et documents demandés avant examen final. - -elsif dossiers_list_facade.liste == 'a_instruire' + - elsif dossiers_list_facade.liste == 'a_instruire' Tous les dossiers présents dans cette liste sont à instruire. Ceux sont tous les dossiers %b qui ont reçu bonne réception. - -elsif dossiers_list_facade.liste == 'termine' + - elsif dossiers_list_facade.liste == 'termine' Tous les dossiers présents dans cette liste sont considérés comme cloturé car ils ont tous reçu un verdict final qui peut être "Validé", "Refusé" ou "Sans suite". diff --git a/app/views/backoffice/dossiers/index.html.haml b/app/views/backoffice/dossiers/index.html.haml index 561c8df4b..e1ce91192 100644 --- a/app/views/backoffice/dossiers/index.html.haml +++ b/app/views/backoffice/dossiers/index.html.haml @@ -16,13 +16,13 @@ .row.center .col-xs-3 - =link_to 'Tous les états', '?liste=all_state', class: 'text-info', style:"text-decoration: #{@facade_data_view.liste == 'all_state'? 'underline' : ''}" + = link_to 'Tous les états', '?liste=all_state', class: 'text-info', style:"text-decoration: #{@facade_data_view.liste == 'all_state'? 'underline' : ''}" .col-xs-3 - =link_to 'En construction', '?liste=a_traiter', class: 'text-danger', style:"text-decoration: #{@facade_data_view.liste == 'a_traiter'? 'underline' : ''}" + = link_to 'En construction', '?liste=a_traiter', class: 'text-danger', style:"text-decoration: #{@facade_data_view.liste == 'a_traiter'? 'underline' : ''}" .col-xs-3 - =link_to 'En instruction', '?liste=a_instruire', class: 'text-warning', style:"text-decoration: #{@facade_data_view.liste == 'a_instruire'? 'underline' : ''}" + = link_to 'En instruction', '?liste=a_instruire', class: 'text-warning', style:"text-decoration: #{@facade_data_view.liste == 'a_instruire'? 'underline' : ''}" .col-xs-3 - =link_to 'Terminés', '?liste=termine', class: 'text-success', style:"text-decoration: #{@facade_data_view.liste == 'termine'? 'underline' : ''}" + = link_to 'Terminés', '?liste=termine', class: 'text-success', style:"text-decoration: #{@facade_data_view.liste == 'termine'? 'underline' : ''}" .default_data_block.default_visible .row.show-block#follow_dossiers diff --git a/app/views/backoffice/dossiers/search.html.haml b/app/views/backoffice/dossiers/search.html.haml index 8700346d4..32713d212 100644 --- a/app/views/backoffice/dossiers/search.html.haml +++ b/app/views/backoffice/dossiers/search.html.haml @@ -10,7 +10,7 @@ %div.carret-down Résultat de la recherche %div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count - =@dossiers.count + = @dossiers.count dossiers %div.body = smart_listing_render :search diff --git a/app/views/dossiers/_infos_dossier.html.haml b/app/views/dossiers/_infos_dossier.html.haml index 39772f897..063e4f671 100644 --- a/app/views/dossiers/_infos_dossier.html.haml +++ b/app/views/dossiers/_infos_dossier.html.haml @@ -43,10 +43,10 @@ - if @facade.dossier.mandataire_social && gestionnaire_signed_in? .mandataire_social.text-success.center %br - ="Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise (" + = "Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise (" %b - ="#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}" - =")" + = "#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}" + = ")" %div.row - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0 .col-xs-12 @@ -124,7 +124,7 @@ %th Lien %thead.tr_content#cerfa - -if @facade.procedure.cerfa_flag? + - if @facade.procedure.cerfa_flag? - if @facade.dossier.cerfa_available? - @facade.cerfas_ordered.each do |cerfa| %tr @@ -133,7 +133,7 @@ %td.col-md-6.col-sm-6.col-xs-6.col-lg-4 = cerfa.created_at %td.col-md-6.col-sm-6.col-xs-6.col-lg-4 - =link_to 'Récupérer', cerfa.content_url, {target: :blank} + = link_to 'Récupérer', cerfa.content_url, {target: :blank} - @facade.dossier.types_de_piece_justificative.each do |type_de_piece_justificative| %tbody.tr_content{id: "type_de_pj_#{type_de_piece_justificative.id}"} - @facade.dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).each do |piece_justificative| @@ -143,7 +143,7 @@ %td.col-md-6.col-sm-6.col-xs-6.col-lg-4 = piece_justificative.created_at %td.col-md-6.col-sm-6.col-xs-6.col-lg-4 - =link_to 'Récupérer', piece_justificative.content_url, {target: :blank} + = link_to 'Récupérer', piece_justificative.content_url, {target: :blank} .modal-footer #modalCommentairesDossierParChamp.modal.fade{"tabindex" => -1, "role" => "dialog"} diff --git a/app/views/dossiers/_pieces_justificatives.html.haml b/app/views/dossiers/_pieces_justificatives.html.haml index 888c65b1a..4cdda96bd 100644 --- a/app/views/dossiers/_pieces_justificatives.html.haml +++ b/app/views/dossiers/_pieces_justificatives.html.haml @@ -3,7 +3,7 @@ - if @facade.procedure.cerfa_flag? %tr{id: "piece_justificative_0"} %th{class:'col-lg-6'} - ='Formulaire' + = 'Formulaire' %td.col-lg-6.col-md-6.col-sm-6.col-xs-6 - if @facade.dossier.cerfa_available? %a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter @@ -42,4 +42,4 @@ = 'Pièce non fournie' -#- if gestionnaire_signed_in? - =render partial: '/dossiers/modal_historique' + = render partial: '/dossiers/modal_historique' diff --git a/app/views/dossiers/etapes/_etape1.html.haml b/app/views/dossiers/etapes/_etape1.html.haml index 784796e4b..98efbc2ae 100644 --- a/app/views/dossiers/etapes/_etape1.html.haml +++ b/app/views/dossiers/etapes/_etape1.html.haml @@ -4,10 +4,10 @@ #logos.center{class: (@facade.entreprise.nil? ? '' : 'mask')} - if @facade.procedure.euro_flag #euro_flag.flag - =image_tag('drapeau_europe.png') + = image_tag('drapeau_europe.png') #logo_procedure.flag - =image_tag( @facade.procedure.decorate.logo_img ) + = image_tag( @facade.procedure.decorate.logo_img ) .etape.etapes_informations.col-xs-9 .row diff --git a/app/views/dossiers/etapes/etape_2/_individual.html.haml b/app/views/dossiers/etapes/etape_2/_individual.html.haml index 48bc13797..d6b78e478 100644 --- a/app/views/dossiers/etapes/etape_2/_individual.html.haml +++ b/app/views/dossiers/etapes/etape_2/_individual.html.haml @@ -38,7 +38,7 @@ = f.check_box :autorisation_donnees = " ".html_safe Vos informations personnelles ne seront jamais utilisées dans un but lucratif ou commercial. Elles ne pourront être communiquées à de tiers personnes sans votre accord préalable. Elles pourront en revanche être communiquées aux administrations compétentes afin d'instruire votre dossier, conformément à la déclaration CNIL effectué par le service TPS. - =link_to 'en savoir plus', cgu_path, target: '_blank' + = link_to 'en savoir plus', cgu_path, target: '_blank' .row .col-xs-5.col-xs-5 .col-xs-2.col-xs-2 diff --git a/app/views/layouts/_ie_lt_10.html.haml b/app/views/layouts/_ie_lt_10.html.haml index 1c2ebbad5..81ae102b6 100644 --- a/app/views/layouts/_ie_lt_10.html.haml +++ b/app/views/layouts/_ie_lt_10.html.haml @@ -1,8 +1,8 @@ -="".html_safe += "".html_safe diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index e06e7ac45..b4ab94f15 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -9,9 +9,9 @@ .col-xs-10.no-padding #navbar-body .row - -begin + - begin = render partial: @navbar_url - -rescue + - rescue = render partial: 'layouts/navbars/navbar_default' = render partial: 'layouts/navbars/navbar_log_options' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ab1caee1b..96010a34f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,7 +3,7 @@ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ %meta{ name: "turbolinks-cache-control", content: "no-cache" } %title - =t('dynamics.page_title') + = t('dynamics.page_title') %meta{'http-equiv' => "X-UA-Compatible", :content => "IE=edge"} = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true @@ -44,7 +44,7 @@ - else - main_container_size = 12 - =render partial: 'layouts/main_container', locals: {main_container_size: main_container_size} + = render partial: 'layouts/main_container', locals: {main_container_size: main_container_size} #mask_search %h1 %i.fa.fa-times{style:'position: fixed; top: 10; right: 30; color: white;'} diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_archived.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_archived.html.haml index 36682366a..fb215e59f 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_archived.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_archived.html.haml @@ -1 +1 @@ -=render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index' += render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index' diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_draft.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_draft.html.haml index 36682366a..fb215e59f 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_draft.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_draft.html.haml @@ -1 +1 @@ -=render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index' += render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index' diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml index c246b2d97..be385802c 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml @@ -23,7 +23,7 @@ %a{:href => "#{url_for :admin_procedures_archived}", id: "archived-procedures"} %div.procedure_list_element{class: @archived_class} - ="Archivées" + = "Archivées" .badge.progress-bar-purple = current_administrateur.procedures.where(archived: true).count diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml index fe18dc18d..f59bb061e 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml @@ -1,9 +1,9 @@ %div#first-block %div.en-cours - -unless @procedure.logo.blank? + - unless @procedure.logo.blank? = image_tag @procedure.decorate.logo_img, style: 'width: 30px' %b - =@procedure.libelle + = @procedure.libelle %div#action-block @@ -16,7 +16,7 @@ %a{:href => "#{url_for admin_procedure_accompagnateurs_path(@procedure)}", id: 'onglet-accompagnateurs'} %div.procedure_list_element{class: ('active' if active == 'Accompagnateurs')} - =t('dynamics.admin.procedure.onglets.accompagnateurs') + = t('dynamics.admin.procedure.onglets.accompagnateurs') %a{:href => "#{url_for edit_admin_procedure_path(@procedure)}", id: 'onglet-description'} %div.procedure_list_element{class: ('active' if active == 'Description')} diff --git a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml index 6f8b17d10..32f2d44b3 100644 --- a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml +++ b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml @@ -29,7 +29,7 @@ - if total_new > 0 .badge.progress-bar-success{title:'Nouveaux dossiers'} = total_new - -if procedure[:unread_notifications] > 0 + - if procedure[:unread_notifications] > 0 .badge.progress-bar-warning{title: 'Notifications'} = procedure[:unread_notifications] #notifications_list.hidden diff --git a/app/views/layouts/left_panels/_left_panel_users_dossierscontroller_index.html.haml b/app/views/layouts/left_panels/_left_panel_users_dossierscontroller_index.html.haml index a6f39fe6d..04a7b90ec 100644 --- a/app/views/layouts/left_panels/_left_panel_users_dossierscontroller_index.html.haml +++ b/app/views/layouts/left_panels/_left_panel_users_dossierscontroller_index.html.haml @@ -25,7 +25,7 @@ %a{:href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.'} %div.procedure_list_element{ class: @dossiers_list_facade.en_instruction_class, id: 'en_instruction' } - ="En instruction" + = "En instruction" .badge.progress-bar-default = @dossiers_list_facade.en_instruction_total diff --git a/app/views/layouts/navbars/_navbar_admin_procedurescontroller_index.html.haml b/app/views/layouts/navbars/_navbar_admin_procedurescontroller_index.html.haml index 13fdaf3c7..becba7d6a 100644 --- a/app/views/layouts/navbars/_navbar_admin_procedurescontroller_index.html.haml +++ b/app/views/layouts/navbars/_navbar_admin_procedurescontroller_index.html.haml @@ -13,12 +13,12 @@ = link_to(admin_procedures_path, id: :menu_item_procedure) do %i.fa.fa-list{ style: "background-size: 10px;"}   - =t('dynamics.admin.menu.procedures') + = t('dynamics.admin.menu.procedures') %li = link_to(admin_gestionnaires_path) do %i.fa.fa-user   - =t('dynamics.admin.menu.accompagnateurs') + = t('dynamics.admin.menu.accompagnateurs') %li.divider{ role: :separator} %li = link_to(admin_profile_path, id: :profile) do diff --git a/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml b/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml index d6c9f218f..55500a0be 100644 --- a/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml +++ b/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml @@ -8,7 +8,7 @@ = link_to backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), "data-method" => :put, class: "button-navbar-action",id: "suivre_dossier_#{@facade.dossier.id}" do %i.fa.fa-user-times Ne plus suivre - -else + - else = link_to backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'button-navbar-action', id: "suivre_dossier_#{@facade.dossier.id}" do %i.fa.fa-user-plus Suivre le dossier diff --git a/app/views/layouts/navbars/_navbar_log_options.html.haml b/app/views/layouts/navbars/_navbar_log_options.html.haml index 56d847d1c..6d04a698a 100644 --- a/app/views/layouts/navbars/_navbar_log_options.html.haml +++ b/app/views/layouts/navbars/_navbar_log_options.html.haml @@ -1,15 +1,15 @@ --if user_signed_in? +- if user_signed_in? #sign_out.col-xs-2.no-padding = render partial: 'users/login_banner' = render partial: 'layouts/credentials' --elsif gestionnaire_signed_in? +- elsif gestionnaire_signed_in? #sign_out.col-xs-2.no-padding = render partial: 'gestionnaires/login_banner' = render partial: 'layouts/credentials' --elsif administrateur_signed_in? +- elsif administrateur_signed_in? #sign_out.col-xs-2.no-padding = render partial: 'administrateurs/login_banner' = render partial: 'layouts/credentials' --else +- else #sign_in.col-xs-2 = link_to "Connexion", new_user_session_path, :class => 'btn btn-lg btn-primary' diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 2326d629d..4ca3c7355 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -46,17 +46,17 @@ .col-md-4.col-lg-4 %h3.text-primary Acteurs publics %h4 Créez des démarches en ligne simplifiées et sécurisées. - =link_to 'Démonstration', "#{@demo_environment_host}/administrateurs/sign_in/demo", {class: 'btn btn-lg btn-primary'} + = link_to 'Démonstration', "#{@demo_environment_host}/administrateurs/sign_in/demo", {class: 'btn btn-lg btn-primary'} .col-md-4.col-lg-4 %h3.text-warning Agents et services %h4 Accompagnez et co-traitez les projets avec les usagers. - =link_to 'Démonstration', "#{@demo_environment_host}/gestionnaires/sign_in/demo", {class: 'btn btn-lg btn-warning'} + = link_to 'Démonstration', "#{@demo_environment_host}/gestionnaires/sign_in/demo", {class: 'btn btn-lg btn-warning'} .col-md-4.col-lg-4 %h3.text-success Usagers %h4 Profitez de démarches simplifiées et d’échanges continus avec les services traitants. - =link_to 'Démonstration', "#{@demo_environment_host}/users/sign_in/demo", {class: 'btn btn-lg btn-success'} + = link_to 'Démonstration', "#{@demo_environment_host}/users/sign_in/demo", {class: 'btn btn-lg btn-success'} .split-hr-left diff --git a/app/views/users/carte/_init_carto.html.haml b/app/views/users/carte/_init_carto.html.haml index 8516fe270..533f121ec 100644 --- a/app/views/users/carte/_init_carto.html.haml +++ b/app/views/users/carte/_init_carto.html.haml @@ -1,3 +1,3 @@ %script{type: 'text/javascript'} - ="var dossier_id =#{dossier.id}" + = "var dossier_id =#{dossier.id}" $(document).on('turbolinks:load', initCarto); diff --git a/app/views/users/carte/show.html.haml b/app/views/users/carte/show.html.haml index ca76d5f34..860a44b03 100644 --- a/app/views/users/carte/show.html.haml +++ b/app/views/users/carte/show.html.haml @@ -1,7 +1,7 @@ .row#carto_page .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h2 - ='Localisation' + = 'Localisation' %h4.text-primary Positionnez-vous et dessinez sur la carte la zone d'action de votre demande. %br @@ -16,7 +16,7 @@ %br %br - =render partial: 'users/carte/map', locals: {dossier: @dossier} + = render partial: 'users/carte/map', locals: {dossier: @dossier} = form_tag(url_for({controller: :carte, action: :save, dossier_id: @dossier.id}), class: 'form-inline', method: 'POST') do %br @@ -24,9 +24,9 @@ %input{id: 'quartier_prioritaires', type:'hidden', value: "#{@dossier.quartier_prioritaires.to_json}"} %input{id: 'cadastres', type:'hidden', value: "#{@dossier.cadastres.to_json}"} - -if @dossier.draft? - =render partial: '/layouts/etape_suivante' - -else - =render partial: '/layouts/modifications_terminees' + - if @dossier.draft? + = render partial: '/layouts/etape_suivante' + - else + = render partial: '/layouts/modifications_terminees' = render partial: 'users/carte/init_carto', locals: {dossier: @dossier} diff --git a/app/views/users/description/_champs.html.haml b/app/views/users/description/_champs.html.haml index 7ee565d10..2d7f6faf6 100644 --- a/app/views/users/description/_champs.html.haml +++ b/app/views/users/description/_champs.html.haml @@ -4,11 +4,11 @@ - unless @headers.blank? - if @champs.first.type_champ != 'header_section' - =render partial: render_partial_url, locals: {libelle: 'Dossier', order_place: -1, champs: @champs} + = render partial: render_partial_url, locals: {libelle: 'Dossier', order_place: -1, champs: @champs} - @headers.each do |header| .row %div{class: "type_champ-#{header.type_champ}"} - =render partial: render_partial_url, locals: {libelle: header.libelle, order_place: header.order_place, champs: @champs} + = render partial: render_partial_url, locals: {libelle: header.libelle, order_place: header.order_place, champs: @champs} - else .row - =render partial: render_partial_url, locals: {libelle: 'Dossier', order_place: -1, champs: @champs} + = render partial: render_partial_url, locals: {libelle: 'Dossier', order_place: -1, champs: @champs} diff --git a/app/views/users/description/_pieces_justificatives.html.haml b/app/views/users/description/_pieces_justificatives.html.haml index c7905af28..4e9877ba3 100644 --- a/app/views/users/description/_pieces_justificatives.html.haml +++ b/app/views/users/description/_pieces_justificatives.html.haml @@ -4,18 +4,18 @@ %th Formulaire de demande ou CERFA (complété et numérisé) %td - -unless dossier.procedure.lien_demarche.blank? + - unless dossier.procedure.lien_demarche.blank? %em Récupérer le formulaire de demande ou CERFA vierge pour mon dossier : = link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa -# %a{ id: 'lien_cerfa', href: "#{dossier.procedure.lien_demarche}", target: '_blank'} Télécharger %td - -if dossier.cerfa_available? + - if dossier.cerfa_available? %span.btn.btn-sm.btn-file.btn-success Modifier %input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes } - -else + - else %input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes } - dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative| @@ -30,12 +30,12 @@ = link_to "Télécharger", type_de_piece_justificative.lien_demarche, target: :blank %td - -if type_de_piece_justificative.api_entreprise + - if type_de_piece_justificative.api_entreprise %span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous. - -else - -if dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil? + - else + - if dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil? = file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes - -else + - else %span.btn.btn-sm.btn-file.btn-success Modifier = file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes diff --git a/app/views/users/description/_show.html.haml b/app/views/users/description/_show.html.haml index ac21a126e..5a5309090 100644 --- a/app/views/users/description/_show.html.haml +++ b/app/views/users/description/_show.html.haml @@ -8,7 +8,7 @@ .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .col-xs-10{style:'padding-right: 0px'} %b - =link_to 'Accéder au guide', @dossier.procedure.lien_notice, {target: '_blank'} + = link_to 'Accéder au guide', @dossier.procedure.lien_notice, {target: '_blank'} pour remplir pour votre dossier %h2.text-info @@ -16,11 +16,11 @@ -#TODO use form_for = form_tag(url_for({controller: 'users/description', action: :update, dossier_id: @dossier.id}), class: 'form', method: 'POST', multipart: true) do - -unless @champs.nil? + - unless @champs.nil? #liste_champs - =render partial: 'users/description/champs', locals:{private: false} + = render partial: 'users/description/champs', locals:{private: false} - -if !@procedure.lien_demarche.blank? || @procedure.cerfa_flag || @dossier.types_de_piece_justificative.size > 0 + - if !@procedure.lien_demarche.blank? || @procedure.cerfa_flag || @dossier.types_de_piece_justificative.size > 0 %br %h3 Pièces jointes @@ -30,7 +30,7 @@ .col-lg-8 = render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier } - -route = Rails.application.routes.recognize_path(request.referrer) # WTF ? + - route = Rails.application.routes.recognize_path(request.referrer) # WTF ? - unless route[:controller].match('admin') %div{style: 'text-align:right'} %h6 Tous les champs portant un * sont obligatoires. diff --git a/app/views/users/description/champs/_header_private_section.html.haml b/app/views/users/description/champs/_header_private_section.html.haml index f1ec1ce8f..b5be240c6 100644 --- a/app/views/users/description/champs/_header_private_section.html.haml +++ b/app/views/users/description/champs/_header_private_section.html.haml @@ -2,5 +2,5 @@ .col-lg-12.col-md-12.col-sm-12.col-xs-12 %br %h3.text-info - =libelle + = libelle = render partial: 'users/description/champs/render_list_champs', locals: {champs: champs, order_place: order_place} diff --git a/app/views/users/description/champs/_header_section.html.haml b/app/views/users/description/champs/_header_section.html.haml index cc2c1099f..8415bfdee 100644 --- a/app/views/users/description/champs/_header_section.html.haml +++ b/app/views/users/description/champs/_header_section.html.haml @@ -4,6 +4,6 @@ .col-xs-12.title .carret-right .carret-down - =libelle + = libelle .body = render partial: 'users/description/champs/render_list_champs', locals: {champs: champs, order_place: order_place} diff --git a/app/views/users/dossiers/_state_description.html.haml b/app/views/users/dossiers/_state_description.html.haml index 6d66eb71b..8ef35af08 100644 --- a/app/views/users/dossiers/_state_description.html.haml +++ b/app/views/users/dossiers/_state_description.html.haml @@ -5,33 +5,33 @@ .col-md-1.col-lg-1.col-sm-1.col-xs-1 .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .col-xs-11 - -if dossiers_list_facade.liste == 'brouillon' + - if dossiers_list_facade.liste == 'brouillon' Les dossiers présents dans cette liste %b n'ont pas encore été soumis aux services instructeurs. Ils ne sont visibles que par vous. - -elsif dossiers_list_facade.liste == 'nouveaux' + - elsif dossiers_list_facade.liste == 'nouveaux' Les dossiers présents dans cette liste %b n'ont pas encore été ouverts par les services instructeurs. Une notification vous sera envoyée quand votre demande aura été étudiée. - -elsif dossiers_list_facade.liste == 'a_traiter' + - elsif dossiers_list_facade.liste == 'a_traiter' Les dossiers présents dans cette liste sont %b visibles par les services instructeurs. %br Ces dossiers ne sont pas encore figés et peuvent être modifiés à souhait. - -elsif dossiers_list_facade.liste == 'en_attente' + - elsif dossiers_list_facade.liste == 'en_attente' Les dossiers présents dans cette liste sont %b en cours de relecture par les services instructeurs. Il reviendra vers vous si des informations ou documents sont manquants pour le futur examen de votre dossier. - -elsif dossiers_list_facade.liste == 'valides' + - elsif dossiers_list_facade.liste == 'valides' Les dossiers présents dans cette liste ont été %b relus et considérés comme complets pour examen par les services instructeurs. Ceux-ci ne peuvent maintenant plus être modifiés. Il faut que vous procédiez à leur dépôt afin qu'une décision finale soit rendue. - -elsif dossiers_list_facade.liste == 'en_instruction' + - elsif dossiers_list_facade.liste == 'en_instruction' Les dossiers présents dans cette liste sont %b en cours de réception @@ -39,12 +39,12 @@ %b en cours d'examen par les services instructeurs. Une notification vous sera envoyée une fois qu'une décision aura été rendue. - -elsif dossiers_list_facade.liste == 'termine' + - elsif dossiers_list_facade.liste == 'termine' Les dossiers présents dans cette liste sont ceux qui ont été instruits et pour lesquels %b une décision finale a été rendue. Ils peuvent posséder trois états différents : Accepté, Refusé ou Sans Suite. - -elsif dossiers_list_facade.liste == 'invite' + - elsif dossiers_list_facade.liste == 'invite' Les dossiers présents dans cette liste sont ceux %b auxquels vous avez été invités diff --git a/app/views/users/sessions/_resume_procedure.html.haml b/app/views/users/sessions/_resume_procedure.html.haml index 590169cad..d05af8c9c 100644 --- a/app/views/users/sessions/_resume_procedure.html.haml +++ b/app/views/users/sessions/_resume_procedure.html.haml @@ -5,10 +5,10 @@ - if @dossier.procedure.euro_flag #euro_flag.flag - =image_tag('drapeau_europe.png') + = image_tag('drapeau_europe.png') #logo_procedure.flag - =image_tag( @dossier.procedure.decorate.logo_img ) + = image_tag( @dossier.procedure.decorate.logo_img ) %h2#titre_procedure.text-info = @dossier.procedure.libelle diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index 30847c93e..fd7e38efb 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -3,7 +3,7 @@ = render partial: 'users/sessions/resume_procedure' %h2#login_user - =t('dynamics.users.connexion_title') + = t('dynamics.users.connexion_title') %a.btn_fc#btn_fcp{href: '/france_connect/particulier'} = image_tag 'franceconnect_logo.png' From a3d04fe7a90fad73569513bce9ae1642da2441ad Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Apr 2017 11:40:34 +0200 Subject: [PATCH 18/72] Html Ruby evaluation tags must be followed by a single space --- app/views/dossiers/etapes/_etape2.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/dossiers/etapes/_etape2.html.haml b/app/views/dossiers/etapes/_etape2.html.haml index fde33f55f..0c18f10e7 100644 --- a/app/views/dossiers/etapes/_etape2.html.haml +++ b/app/views/dossiers/etapes/_etape2.html.haml @@ -1,4 +1,4 @@ - if @facade.procedure.for_individual? - = render partial: 'dossiers/etapes/etape_2/individual' + = render partial: 'dossiers/etapes/etape_2/individual' - else = render partial: 'dossiers/etapes/etape_2/entreprise' From 7e067c26241bef732f7bcc2ac8376f9df83d34b4 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Apr 2017 11:39:35 +0200 Subject: [PATCH 19/72] Static classes attribute must use the inline tag syntax --- app/views/dossiers/_pieces_justificatives.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/dossiers/_pieces_justificatives.html.haml b/app/views/dossiers/_pieces_justificatives.html.haml index 4cdda96bd..7b703c2b1 100644 --- a/app/views/dossiers/_pieces_justificatives.html.haml +++ b/app/views/dossiers/_pieces_justificatives.html.haml @@ -2,7 +2,7 @@ %table.table - if @facade.procedure.cerfa_flag? %tr{id: "piece_justificative_0"} - %th{class:'col-lg-6'} + %th.col-lg-6 = 'Formulaire' %td.col-lg-6.col-md-6.col-sm-6.col-xs-6 - if @facade.dossier.cerfa_available? From 2d5df47c4ee82fdb8c3574cf3cec2d309f8ec630 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Apr 2017 15:32:05 +0200 Subject: [PATCH 20/72] Use implicit div tags in HAML files --- app/views/admin/procedures/index.html.haml | 12 ++-- .../dossiers/_filter_framed.html.haml | 4 +- .../backoffice/dossiers/search.html.haml | 14 ++--- app/views/dossiers/_dossier_show.html.haml | 60 +++++++++---------- app/views/dossiers/_edit_carto.html.haml | 2 +- .../dossiers/_edit_pieces_jointes.html.haml | 2 +- app/views/dossiers/_infos_dossier.html.haml | 58 +++++++++--------- .../dossiers/_infos_entreprise.html.haml | 54 ++++++++--------- .../commentaires/_commentaire.html.haml | 2 +- app/views/layouts/_credentials.html.haml | 4 +- app/views/layouts/_ie_lt_10.html.haml | 2 +- app/views/layouts/application.html.haml | 6 +- ...admin_procedurescontroller_index.html.haml | 12 ++-- ...dmin_procedurescontroller_navbar.html.haml | 22 +++---- ...koffice_dossierscontroller_index.html.haml | 12 ++-- .../_left_panel_cgucontroller_index.html.haml | 28 ++++----- ...l_users_dossierscontroller_index.html.haml | 16 ++--- ...ers_recapitulatifcontroller_show.html.haml | 10 ++-- ...ssiers_procedurecontroller_index.html.haml | 10 ++-- ...ers_recapitulatifcontroller_show.html.haml | 8 +-- app/views/users/dossiers/index.html.haml | 14 ++--- app/views/users/recapitulatif/show.html.haml | 2 +- 22 files changed, 177 insertions(+), 177 deletions(-) diff --git a/app/views/admin/procedures/index.html.haml b/app/views/admin/procedures/index.html.haml index 8ebb524ef..cd41c6513 100644 --- a/app/views/admin/procedures/index.html.haml +++ b/app/views/admin/procedures/index.html.haml @@ -1,14 +1,14 @@ #admins_index .default_data_block.default_visible - %div.row.show-block#new_dossiers - %div.header - %div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title - %div.carret-right - %div.carret-down + .row.show-block#new_dossiers + .header + .col-lg-10.col-md-10.col-sm-10.col-xs-10.title + .carret-right + .carret-down Procédures %a{href:'/admin/procedures/new'} %div#new-procedure.col-lg-2.col-md-2.col-sm-2.col-xs-2.action Nouvelle - %div.body + .body = smart_listing_render :procedures diff --git a/app/views/backoffice/dossiers/_filter_framed.html.haml b/app/views/backoffice/dossiers/_filter_framed.html.haml index 393edbdeb..f8c7b1e55 100644 --- a/app/views/backoffice/dossiers/_filter_framed.html.haml +++ b/app/views/backoffice/dossiers/_filter_framed.html.haml @@ -1,4 +1,4 @@ -%div.filter_framed.panel.panel-primary{id: "#{filter_framed_id}", style:'width: 300px; height: 100px; position: absolute; top: 0; left: 0; display: none'} +.filter_framed.panel.panel-primary{id: "#{filter_framed_id}", style:'width: 300px; height: 100px; position: absolute; top: 0; left: 0; display: none'} .panel-heading = preference.libelle @@ -6,5 +6,5 @@ %input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 69%', value: "#{preference.filter}"} %button.btn.btn-sm.btn-success %i.fa.fa-check - %div.btn.btn-sm.btn-danger.erase-filter + .btn.btn-sm.btn-danger.erase-filter %i.fa.fa-remove diff --git a/app/views/backoffice/dossiers/search.html.haml b/app/views/backoffice/dossiers/search.html.haml index 32713d212..34ffd639d 100644 --- a/app/views/backoffice/dossiers/search.html.haml +++ b/app/views/backoffice/dossiers/search.html.haml @@ -3,14 +3,14 @@ = render partial: 'backoffice/dossiers/pref_list' .default_data_block.default_visible - %div.row.show-block#new_dossiers - %div.header - %div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title - %div.carret-right - %div.carret-down + .row.show-block#new_dossiers + .header + .col-lg-10.col-md-10.col-sm-10.col-xs-10.title + .carret-right + .carret-down Résultat de la recherche - %div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count + .col-lg-2.col-md-2.col-sm-2.col-xs-2.count = @dossiers.count dossiers - %div.body + .body = smart_listing_render :search diff --git a/app/views/dossiers/_dossier_show.html.haml b/app/views/dossiers/_dossier_show.html.haml index 842c9740c..a450fe7d0 100644 --- a/app/views/dossiers/_dossier_show.html.haml +++ b/app/views/dossiers/_dossier_show.html.haml @@ -2,48 +2,48 @@ - if @facade.procedure.individual_with_siret .default_data_block - %div.row.show-block.infos - %div.header - %div.col-xs-8.title-no-expanse - %div.carret-right + .row.show-block.infos + .header + .col-xs-8.title-no-expanse + .carret-right INFORMATIONS DU DEMANDEUR - if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state) %a#add_siret.action{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)} - %div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action + .col-lg-4.col-md-4.col-sm-4.col-xs-4.action = "Renseigner un SIRET" - unless @facade.entreprise.nil? .default_data_block - %div.row.show-block.infos#infos_entreprise - %div.header - %div.col-xs-12.title - %div.carret-right - %div.carret-down + .row.show-block.infos#infos_entreprise + .header + .col-xs-12.title + .carret-right + .carret-down INFORMATIONS DU DEMANDEUR - %div.body.display-block-on-print + .body.display-block-on-print = render partial: '/dossiers/infos_entreprise' .default_data_block.default_visible - %div.row.show-block.infos#infos_dossier - %div.header - %div.col-xs-10.title - %div.carret-right - %div.carret-down + .row.show-block.infos#infos_dossier + .header + .col-xs-10.title + .carret-right + .carret-down CONSTRUCTION DU DOSSIER = render partial: '/dossiers/edit_dossier' - %div.body.display-block-on-print + .body.display-block-on-print = render partial: '/dossiers/infos_dossier' - if @facade.dossier.procedure.module_api_carto.use_api_carto .default_data_block.default_visible.no-page-break-inside - %div.row.show-block#carto - %div.header - %div.col-xs-10.title - %div.carret-right - %div.carret-down + .row.show-block#carto + .header + .col-xs-10.title + .carret-right + .carret-down CARTOGRAPHIE = render partial: '/dossiers/edit_carto' - %div.body.display-block-on-print + .body.display-block-on-print %input{id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs'} %input{id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"} %input{id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}"} @@ -54,14 +54,14 @@ - if @current_gestionnaire && gestionnaire_signed_in? && @champs_private.count > 0 .default_data_block.default_visible - %div.row.show-block#private-fields - %div.header - %div.col-xs-10.title - %div.carret-right - %div.carret-down + .row.show-block#private-fields + .header + .col-xs-10.title + .carret-right + .carret-down = "formulaire privé".upcase - %div.col-xs-2.count + .col-xs-2.count - private_fields_count = @champs_private.count = (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs" - %div.body + .body = render partial: '/dossiers/infos_private_fields' diff --git a/app/views/dossiers/_edit_carto.html.haml b/app/views/dossiers/_edit_carto.html.haml index 08380a1a6..fedcf055d 100644 --- a/app/views/dossiers/_edit_carto.html.haml +++ b/app/views/dossiers/_edit_carto.html.haml @@ -1,5 +1,5 @@ - unless @facade.dossier.read_only? - if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email)) %a#maj_carte.action{href: "/users/dossiers/#{@facade.dossier.id}/carte"} - %div.col-lg-2.col-md-2.col-sm-2.col-xs-2.action + .col-lg-2.col-md-2.col-sm-2.col-xs-2.action = 'éditer'.upcase diff --git a/app/views/dossiers/_edit_pieces_jointes.html.haml b/app/views/dossiers/_edit_pieces_jointes.html.haml index c65d90d10..88f4bff34 100644 --- a/app/views/dossiers/_edit_pieces_jointes.html.haml +++ b/app/views/dossiers/_edit_pieces_jointes.html.haml @@ -1,7 +1,7 @@ - unless @facade.dossier.read_only? - if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email)) - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0 - %div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action + .col-lg-4.col-md-4.col-sm-4.col-xs-4.action %a#maj_pj.action{"data-target" => "#UploadPJmodal", "data-toggle" => "modal", :type => "button", diff --git a/app/views/dossiers/_infos_dossier.html.haml b/app/views/dossiers/_infos_dossier.html.haml index 063e4f671..96524e556 100644 --- a/app/views/dossiers/_infos_dossier.html.haml +++ b/app/views/dossiers/_infos_dossier.html.haml @@ -1,26 +1,26 @@ -%div.row +.row .col-xs-12 - if @facade.procedure.for_individual? .row.title-row - %div.col-xs-4.split-hr - %div.col-xs-4.dossier-title= t('utils.depositaire').upcase - %div.col-xs-4.split-hr + .col-xs-4.split-hr + .col-xs-4.dossier-title= t('utils.depositaire').upcase + .col-xs-4.split-hr .row - %div.col-xs-6.depositaire-label Civilité - %div.col-xs-1.comments-off= "-" - %div.col-xs-5.depositaire-info= @facade.individual.gender + .col-xs-6.depositaire-label Civilité + .col-xs-1.comments-off= "-" + .col-xs-5.depositaire-info= @facade.individual.gender .row - %div.col-xs-6.depositaire-label Nom - %div.col-xs-1.comments-off= "-" - %div.col-xs-5.depositaire-info= @facade.individual.nom + .col-xs-6.depositaire-label Nom + .col-xs-1.comments-off= "-" + .col-xs-5.depositaire-info= @facade.individual.nom .row - %div.col-xs-6.depositaire-label Prénom - %div.col-xs-1.comments-off= "-" - %div.col-xs-5.despositaire-info= @facade.individual.prenom + .col-xs-6.depositaire-label Prénom + .col-xs-1.comments-off= "-" + .col-xs-5.despositaire-info= @facade.individual.prenom .row - %div.col-xs-6.depositaire-label Date de naissance - %div.col-xs-1.comments-off= "-" - %div.col-xs-5.depositaire-info= @facade.individual.birthdate + .col-xs-6.depositaire-label Date de naissance + .col-xs-1.comments-off= "-" + .col-xs-5.depositaire-info= @facade.individual.birthdate .row.margin-top-20 - unless @facade.champs.nil? @@ -28,15 +28,15 @@ - next if champ.type_champ == 'explication' - if champ.type_champ == 'header_section' .row.title-row.margin-top-40 - %div.col-xs-3.split-hr - %div.col-xs-6.dossier-title= champ.libelle.upcase - %div.col-xs-3.split-hr + .col-xs-3.split-hr + .col-xs-6.dossier-title= champ.libelle.upcase + .col-xs-3.split-hr - else .row - %div.col-xs-6.depositaire-label= champ.libelle - %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off + .col-xs-6.depositaire-label= champ.libelle + .col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off = "-" - %div.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" } + .col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" } - unless champ.decorate.value.blank? = champ.decorate.value.html_safe @@ -47,13 +47,13 @@ %b = "#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}" = ")" -%div.row +.row - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0 .col-xs-12 .row.title-row - %div.col-xs-4.split-hr - %div.col-xs-4.dossier-title= t('utils.pieces').upcase - %div.col-xs-4.split-hr + .col-xs-4.split-hr + .col-xs-4.dossier-title= t('utils.pieces').upcase + .col-xs-4.split-hr .col-xs-12#pieces_justificatives.margin-bot-40 .row @@ -77,9 +77,9 @@ .row.piece-row .col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" } .row - %div.col-xs-6.depositaire-label= type_de_piece_justificative.libelle - %div.col-xs-1.comments-off= "-" - %div.col-xs-5.despositaire-info + .col-xs-6.depositaire-label= type_de_piece_justificative.libelle + .col-xs-1.comments-off= "-" + .col-xs-5.despositaire-info - if type_de_piece_justificative.api_entreprise %span.text-success Nous l'avons récupéré pour vous. - elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil? diff --git a/app/views/dossiers/_infos_entreprise.html.haml b/app/views/dossiers/_infos_entreprise.html.haml index 599c9b7bb..661634697 100644 --- a/app/views/dossiers/_infos_entreprise.html.haml +++ b/app/views/dossiers/_infos_entreprise.html.haml @@ -2,51 +2,51 @@ %h4 = @facade.entreprise.raison_sociale_or_name .row.split-row - %div.col-xs-12.split-hr -%div.row + .col-xs-12.split-hr +.row .col-xs-12 .row - %div.col-xs-4.entreprise-label Siret : - %div.col-xs-8.entreprise-info= @facade.etablissement.siret + .col-xs-4.entreprise-label Siret : + .col-xs-8.entreprise-info= @facade.etablissement.siret - if @facade.etablissement.siret != @facade.entreprise.siret_siege_social .row - %div.col-xs-4.entreprise-label SIRET siège social : - %div.col-xs-8.entreprise-info= @facade.entreprise.siret_siege_social + .col-xs-4.entreprise-label SIRET siège social : + .col-xs-8.entreprise-info= @facade.entreprise.siret_siege_social .row - %div.col-xs-4.entreprise-label Forme juridique : - %div.col-xs-8.entreprise-info= @facade.entreprise.forme_juridique + .col-xs-4.entreprise-label Forme juridique : + .col-xs-8.entreprise-info= @facade.entreprise.forme_juridique .row - %div.col-xs-4.entreprise-label Libellé naf : - %div.col-xs-8.entreprise-info= @facade.etablissement.libelle_naf + .col-xs-4.entreprise-label Libellé naf : + .col-xs-8.entreprise-info= @facade.etablissement.libelle_naf .row - %div.col-xs-4.entreprise-label Code naf : - %div.col-xs-8.entreprise-info= @facade.etablissement.naf + .col-xs-4.entreprise-label Code naf : + .col-xs-8.entreprise-info= @facade.etablissement.naf .row - %div.col-xs-4.entreprise-label Date de création : - %div.col-xs-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y" + .col-xs-4.entreprise-label Date de création : + .col-xs-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y" .row - %div.col-xs-4.entreprise-label Effectif organisation : - %div.col-xs-8.entreprise-info= @facade.entreprise.effectif + .col-xs-4.entreprise-label Effectif organisation : + .col-xs-8.entreprise-info= @facade.entreprise.effectif .row - %div.col-xs-4.entreprise-label Code effectif : - %div.col-xs-8.entreprise-info= @facade.entreprise.code_effectif_entreprise + .col-xs-4.entreprise-label Code effectif : + .col-xs-8.entreprise-info= @facade.entreprise.code_effectif_entreprise .row - %div.col-xs-4.entreprise-label Numéro TVA intracommunautaire : - %div.col-xs-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire + .col-xs-4.entreprise-label Numéro TVA intracommunautaire : + .col-xs-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire .row - %div.col-xs-4.entreprise-label Adresse : - %div.col-xs-8.entreprise-info + .col-xs-4.entreprise-label Adresse : + .col-xs-8.entreprise-info - @facade.etablissement.adresse.split("\n").each do |line| = line .row - %div.col-xs-4.entreprise-label Capital social : - %div.col-xs-8.entreprise-info= @facade.entreprise.pretty_capital_social + .col-xs-4.entreprise-label Capital social : + .col-xs-8.entreprise-info= @facade.entreprise.pretty_capital_social .row - %div.col-xs-4.entreprise-label Exercices : - %div.col-xs-8.entreprise-info + .col-xs-4.entreprise-label Exercices : + .col-xs-8.entreprise-info - @facade.etablissement.exercices.each_with_index do |exercice, index| %strong = "#{exercice.dateFinExercice.year} : " @@ -54,6 +54,6 @@ %br .row.split-row - %div.col-xs-12.split-hr + .col-xs-12.split-hr - unless @facade.entreprise.rna_information.nil? = render partial: '/dossiers/infos_rna' diff --git a/app/views/dossiers/commentaires/_commentaire.html.haml b/app/views/dossiers/commentaires/_commentaire.html.haml index 576903f08..b5c928460 100644 --- a/app/views/dossiers/commentaires/_commentaire.html.haml +++ b/app/views/dossiers/commentaires/_commentaire.html.haml @@ -1,4 +1,4 @@ -%div.commentaire +.commentaire .comment-header = commentaire.header .content diff --git a/app/views/layouts/_credentials.html.haml b/app/views/layouts/_credentials.html.haml index 0622f4600..0f5457453 100644 --- a/app/views/layouts/_credentials.html.haml +++ b/app/views/layouts/_credentials.html.haml @@ -1,4 +1,4 @@ -%div.dropdown-menu#credentials - %div.description= t("utils.deconnexion") +.dropdown-menu#credentials + .description= t("utils.deconnexion") = @current_gestionnaire.email if @current_gestionnaire = @current_user.email if @current_user diff --git a/app/views/layouts/_ie_lt_10.html.haml b/app/views/layouts/_ie_lt_10.html.haml index 81ae102b6..d191ed313 100644 --- a/app/views/layouts/_ie_lt_10.html.haml +++ b/app/views/layouts/_ie_lt_10.html.haml @@ -1,6 +1,6 @@ = "