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
|
- content_for :footer do
|
||||||
/ TODO: display the procedure footer even if there is no dossier yet
|
/ TODO: display the procedure footer even if there is no dossier yet
|
||||||
- if @dossier
|
- 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'
|
= render template: 'layouts/application'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%footer.procedure-footer
|
%footer.procedure-footer
|
||||||
.container
|
.container
|
||||||
- service = dossier.procedure.service
|
- service = procedure.service
|
||||||
- if service.present?
|
- if service.present?
|
||||||
%ul.footer-row.footer-columns
|
%ul.footer-row.footer-columns
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
%h3.footer-header Poser une question sur votre dossier :
|
%h3.footer-header Poser une question sur votre dossier :
|
||||||
%p
|
%p
|
||||||
- if dossier.brouillon?
|
- if dossier.id && !dossier.brouillon?
|
||||||
Par email :
|
|
||||||
= link_to service.email, "mailto:#{service.email}"
|
|
||||||
- else
|
|
||||||
Directement
|
Directement
|
||||||
= link_to "par la messagerie", messagerie_dossier_path(dossier)
|
= link_to "par la messagerie", messagerie_dossier_path(dossier)
|
||||||
|
- else
|
||||||
|
Par email :
|
||||||
|
= link_to service.email, "mailto:#{service.email}"
|
||||||
|
|
||||||
%p
|
%p
|
||||||
Par téléphone :
|
Par téléphone :
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
%p
|
%p
|
||||||
Horaires : #{ service.horaires.sub(/\S/, &:downcase) }
|
Horaires : #{ service.horaires.sub(/\S/, &:downcase) }
|
||||||
|
|
||||||
- politiques = politiques_conservation_de_donnees(dossier.procedure)
|
- politiques = politiques_conservation_de_donnees(procedure)
|
||||||
- if politiques.present?
|
- if politiques.present?
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
%h3.footer-header Conservation des données :
|
%h3.footer-header Conservation des données :
|
||||||
|
@ -37,4 +37,4 @@
|
||||||
%p= politique
|
%p= politique
|
||||||
|
|
||||||
.footer-row.footer-bottom-line
|
.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(:title, "Modification du brouillon nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
.dossier-header.sub-header
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
#dossier-show
|
||||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- content_for(:title, "Informations sur l’établissement")
|
- content_for(:title, "Informations sur l’établissement")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
.etablissement
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- content_for(:title, "Dossier bien envoyé (#{@dossier.procedure.libelle})")
|
- content_for(:title, "Dossier bien envoyé (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
.merci
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
#dossier-show
|
||||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
= 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(:title, "Modifier · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
#dossier-show
|
||||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
= 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(:title, "Résumé · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")
|
||||||
|
|
||||||
- content_for :footer do
|
- 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
|
#dossier-show
|
||||||
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }
|
= 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
|
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
|
it "affiche les informations de contact" do
|
||||||
expect(subject).to have_text(service.nom)
|
expect(subject).to have_text(service.nom)
|
||||||
|
|
Loading…
Reference in a new issue