diff --git a/Gemfile.lock b/Gemfile.lock
index c9f39191f..83db7583d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -273,7 +273,7 @@ GEM
domain_name (~> 0.5)
http_parser.rb (0.6.0)
httpclient (2.8.3)
- i18n (1.4.0)
+ i18n (1.5.3)
concurrent-ruby (~> 1.0)
ipaddress (0.8.3)
jaro_winkler (1.5.2)
@@ -555,8 +555,8 @@ GEM
faraday (>= 0.7.6, < 1.0)
sexp_processor (4.11.0)
shellany (0.0.1)
- shoulda-matchers (3.1.2)
- activesupport (>= 4.0.0)
+ shoulda-matchers (4.0.1)
+ activesupport (>= 4.2.0)
simple_form (4.1.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
diff --git a/app/views/fields/procedure_link_field/_show.html.haml b/app/views/fields/procedure_link_field/_show.html.haml
index 7d0ee3413..2fbf4006a 100644
--- a/app/views/fields/procedure_link_field/_show.html.haml
+++ b/app/views/fields/procedure_link_field/_show.html.haml
@@ -1,4 +1,4 @@
- if field.data.present?
- = link_to "/commencer/#{field.data}", commencer_url(path: field.data), target: '_blank'
+ = link_to Addressable::URI.parse(procedure_lien(field.resource)).path, procedure_lien(field.resource), target: '_blank'
- else
Plus en ligne
diff --git a/app/views/gestionnaire_mailer/send_login_token.html.haml b/app/views/gestionnaire_mailer/send_login_token.html.haml
index df3b5f553..03210cc4a 100644
--- a/app/views/gestionnaire_mailer/send_login_token.html.haml
+++ b/app/views/gestionnaire_mailer/send_login_token.html.haml
@@ -5,4 +5,6 @@
Veuillez cliquer sur le lien suivant pour vous connecter sur le site demarches-simplifiees.fr :
= link_to(sign_in_by_link_url(@gestionnaire_id, jeton: @login_token), sign_in_by_link_url(@gestionnaire_id, jeton: @login_token))
+%p Ce lien est valide une semaine.
+
= render partial: "layouts/mailers/signature"
diff --git a/app/views/users/sessions/link_sent.html.haml b/app/views/users/sessions/link_sent.html.haml
index 264b09955..ea479eda5 100644
--- a/app/views/users/sessions/link_sent.html.haml
+++ b/app/views/users/sessions/link_sent.html.haml
@@ -14,4 +14,7 @@
Attention, ce message peut mettre jusqu'à 15 minutes pour arriver.
%p.help
+ Si vous voyez cette page trop souvent, consultez notre aide : #{link_to 'https://faq.demarches-simplifiees.fr/article/34-je-dois-confirmer-mon-compte-a-chaque-connexion', 'https://faq.demarches-simplifiees.fr/article/34-je-dois-confirmer-mon-compte-a-chaque-connexion', target: '_blank' }
+ %br
+ %br
En cas de difficultés, nous restons joignables sur #{link_to 'contact@demarches-simplifiees.fr', 'mailto:contact@demarches-simplifiees.fr'}.
diff --git a/config/application.rb b/config/application.rb
index bb00d8c27..663bcda18 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -36,5 +36,10 @@ module TPS
config.active_job.queue_adapter = :delayed_job
config.action_view.sanitized_allowed_tags = ActionView::Base.sanitized_allowed_tags + ['u']
+
+ config.to_prepare do
+ # Make main application helpers available in administrate
+ Administrate::ApplicationController.helper(TPS::Application.helpers)
+ end
end
end
diff --git a/spec/features/new_user/dossier_details_spec.rb b/spec/features/new_user/dossier_details_spec.rb
index b24744713..a3cc373bb 100644
--- a/spec/features/new_user/dossier_details_spec.rb
+++ b/spec/features/new_user/dossier_details_spec.rb
@@ -30,10 +30,14 @@ describe 'Dossier details:' do
let(:dossier) { create(:dossier, :en_instruction, :for_individual, :with_commentaires, user: user, procedure: procedure) }
before do
- other_dossier = create(:dossier, :accepte, :for_individual, procedure: procedure, en_instruction_at: 2.months.ago, processed_at: Time.zone.now)
+ Timecop.freeze(Time.zone.local(2012, 12, 20))
+
+ other_dossier = create(:dossier, :accepte, :for_individual, procedure: procedure, en_instruction_at: 60.days.ago, processed_at: Time.zone.now)
visit dossier_path(dossier)
end
+ after { Timecop.return }
+
it { expect(page).to have_text("Habituellement, les dossiers de cette démarche sont traités dans un délai de 2 mois.") }
end
end