= render partial: "header", locals: { dossier: @dossier } #dossier-instruction.container %section %h1 Inviter une personne à donner son avis %p.avis-notice Elle pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais elle ne pourra le modifier. = form_for Avis.new, url: avis_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f| = f.email_field :email, placeholder: 'Adresse email', required: true = f.text_area :introduction, rows: 3, value: 'Bonjour, merci de me donner votre avis sur ce dossier.', required: true .send-wrapper = f.submit 'Demander un avis', class: 'button send' - if @dossier.avis.present? %section.avis %h1.title Avis des invités %span.count= @dossier.avis.count %ul - @dossier.avis.each do |avis| %li.one-avis %h2.claimant = (avis.claimant.email == current_gestionnaire.email) ? 'Vous' : avis.claimant.email %span.date Demande d'avis envoyée le #{I18n.l(avis.created_at.localtime, format: '%d/%m/%y')} %p= avis.introduction .answer.flex.align-start = image_tag 'icons/bubble.svg', class: 'avis-icon' .width-100 %h2.gestionnaire = avis.gestionnaire.email - if avis.answer.present? %span.date Réponse donnée le #{I18n.l(avis.updated_at.localtime, format: '%d/%m/%y')} - else %span.waiting En attente de réponse %p= avis.answer - if @dossier.ordered_champs_private.present? %section %h1.private-annotations Annotations privées .card.featured = form_for @dossier, url: annotations_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f| = f.fields_for :champs_private, f.object.ordered_champs_private do |champ_form| - champ = champ_form.object = render partial: "new_gestionnaire/dossiers/champs/#{champ.type_champ}", locals: { champ: champ, form: champ_form } .send-wrapper = f.submit 'Sauvegarder', class: 'button send'