refactor instructeur_avis_url
This commit is contained in:
parent
b0cfb2c02a
commit
4839506374
9 changed files with 14 additions and 14 deletions
|
@ -5,6 +5,6 @@
|
|||
%li= "#{dossier.procedure.libelle}, dossier nº #{dossier.id}"
|
||||
|
||||
%ul.tabs
|
||||
= dynamic_tab_item('Demande', instructeur_avis_path(avis))
|
||||
= dynamic_tab_item('Demande', instructeur_avis_path(avis.procedure, avis))
|
||||
= dynamic_tab_item('Avis', instruction_instructeur_avis_path(avis.procedure, avis), notification: avis.answer.blank?)
|
||||
= dynamic_tab_item('Messagerie', messagerie_instructeur_avis_path(avis.procedure, avis))
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
- @avis.each do |avis|
|
||||
%tr
|
||||
%td.number-col
|
||||
= link_to(instructeur_avis_path(avis), class: 'cell-link') do
|
||||
= link_to(instructeur_avis_path(avis.procedure, avis), class: 'cell-link') do
|
||||
%span.icon.folder
|
||||
#{avis.dossier.id}
|
||||
%td= link_to(avis.dossier.user.email, instructeur_avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.procedure.libelle, instructeur_avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.user.email, instructeur_avis_path(avis.procedure, avis), class: 'cell-link')
|
||||
%td= link_to(avis.procedure.libelle, instructeur_avis_path(avis.procedure, avis), class: 'cell-link')
|
||||
= paginate(@avis)
|
||||
- else
|
||||
%h2.empty-text Aucun avis
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
= render partial: 'shared/attachment/show', locals: { attachment: @avis.introduction_file.attachment }
|
||||
%br/
|
||||
|
||||
= form_for @avis, url: instructeur_avis_path(@avis), html: { class: 'form' } do |f|
|
||||
= form_for @avis, url: instructeur_avis_path(@avis.procedure, @avis), html: { class: 'form' } do |f|
|
||||
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
||||
= render 'shared/attachment/edit',
|
||||
{ form: f,
|
||||
|
@ -35,7 +35,7 @@
|
|||
= f.submit 'Envoyer votre avis', class: 'button send'
|
||||
|
||||
- if !@dossier.termine?
|
||||
= render partial: "instructeurs/shared/avis/form", locals: { url: avis_instructeur_avis_path(@avis), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
||||
= render partial: "instructeurs/shared/avis/form", locals: { url: avis_instructeur_avis_path(@avis.procedure, @avis), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
||||
|
||||
- if @dossier.avis_for(current_instructeur).present?
|
||||
= render partial: 'instructeurs/shared/avis/list', locals: { avis: @dossier.avis_for(current_instructeur), avis_seen_at: nil }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue