views: make dossier optional on procedure_footer
This allow displaying the procedure footer even when there is no dossier yet
This commit is contained in:
parent
d36696442b
commit
5d6005dbe9
10 changed files with 16 additions and 16 deletions
|
@ -14,6 +14,6 @@
|
|||
- content_for :footer do
|
||||
/ TODO: display the procedure footer even if there is no dossier yet
|
||||
- if @dossier
|
||||
= render partial: 'new_user/procedure_footer', locals: { dossier: @dossier }
|
||||
= render partial: 'new_user/procedure_footer', locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
= render template: 'layouts/application'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%footer.procedure-footer
|
||||
.container
|
||||
- service = dossier.procedure.service
|
||||
- service = procedure.service
|
||||
- if service.present?
|
||||
%ul.footer-row.footer-columns
|
||||
%li.footer-column
|
||||
|
@ -15,12 +15,12 @@
|
|||
%li.footer-column
|
||||
%h3.footer-header Poser une question sur votre dossier :
|
||||
%p
|
||||
- if dossier.brouillon?
|
||||
Par email :
|
||||
= link_to service.email, "mailto:#{service.email}"
|
||||
- else
|
||||
- if dossier.id && !dossier.brouillon?
|
||||
Directement
|
||||
= link_to "par la messagerie", messagerie_dossier_path(dossier)
|
||||
- else
|
||||
Par email :
|
||||
= link_to service.email, "mailto:#{service.email}"
|
||||
|
||||
%p
|
||||
Par téléphone :
|
||||
|
@ -29,7 +29,7 @@
|
|||
%p
|
||||
Horaires : #{ service.horaires.sub(/\S/, &:downcase) }
|
||||
|
||||
- politiques = politiques_conservation_de_donnees(dossier.procedure)
|
||||
- politiques = politiques_conservation_de_donnees(procedure)
|
||||
- if politiques.present?
|
||||
%li.footer-column
|
||||
%h3.footer-header Conservation des données :
|
||||
|
@ -37,4 +37,4 @@
|
|||
%p= politique
|
||||
|
||||
.footer-row.footer-bottom-line
|
||||
= render partial: "new_user/general_footer_row", locals: { dossier: @dossier }
|
||||
= render partial: 'new_user/general_footer_row', locals: { dossier: dossier }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Modification du brouillon nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
.dossier-header.sub-header
|
||||
.container
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
#dossier-show
|
||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Informations sur l’établissement")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
.etablissement
|
||||
.container
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Dossier bien envoyé (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
.merci
|
||||
.container
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
#dossier-show
|
||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Modifier · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
#dossier-show
|
||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for(:title, "Résumé · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "new_user/procedure_footer", locals: { dossier: @dossier }
|
||||
= render partial: "new_user/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
|
||||
|
||||
#dossier-show
|
||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'new_user/procedure_footer.html.haml', type: :view do
|
|||
return dossier
|
||||
}
|
||||
|
||||
subject { render 'new_user/procedure_footer.html.haml', dossier: dossier }
|
||||
subject { render 'new_user/procedure_footer.html.haml', procedure: dossier.procedure, dossier: dossier }
|
||||
|
||||
it "affiche les informations de contact" do
|
||||
expect(subject).to have_text(service.nom)
|
||||
|
|
Loading…
Reference in a new issue