Extract the conditional in a partial to its caller
This commit is contained in:
parent
458e3e37f8
commit
fffbbb5d73
3 changed files with 33 additions and 32 deletions
|
@ -23,4 +23,5 @@
|
||||||
|
|
||||||
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_avis_path(@avis), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_avis_path(@avis), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
||||||
|
|
||||||
|
- if @dossier.avis_for(current_gestionnaire).present?
|
||||||
= render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis_for(current_gestionnaire), avis_seen_at: nil }
|
= render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis_for(current_gestionnaire), avis_seen_at: nil }
|
||||||
|
|
|
@ -5,4 +5,5 @@
|
||||||
.container
|
.container
|
||||||
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false, avis: @avis }
|
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false, avis: @avis }
|
||||||
|
|
||||||
|
- if @dossier.avis.present?
|
||||||
= render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis, avis_seen_at: @avis_seen_at }
|
= render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis, avis_seen_at: @avis_seen_at }
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
- if avis.present?
|
%section.list-avis
|
||||||
%section.list-avis
|
|
||||||
%h1.tab-title
|
%h1.tab-title
|
||||||
Avis des invités
|
Avis des invités
|
||||||
%span.count= avis.count
|
%span.count= avis.count
|
||||||
|
|
Loading…
Reference in a new issue