[Fix #2757] Do not show the avis form for dossiers that are terminés

This commit is contained in:
gregoirenovel 2018-10-04 15:51:27 +02:00
parent fffbbb5d73
commit 25cbd5e7af
2 changed files with 4 additions and 2 deletions

View file

@ -21,7 +21,8 @@
.send-wrapper
= f.submit 'Envoyer votre avis', class: 'button send'
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_avis_path(@avis), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
- if !@dossier.termine?
= 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 }

View file

@ -3,7 +3,8 @@
= render partial: "header", locals: { dossier: @dossier }
.container
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false, avis: @avis }
- if !@dossier.termine?
= 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 }