2021-02-09 10:24:13 +01:00
|
|
|
|
- content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
|
|
|
|
|
|
|
|
|
= render partial: 'header', locals: { avis: @avis, dossier: @dossier }
|
|
|
|
|
|
|
|
|
|
.container
|
2023-03-14 16:50:25 +01:00
|
|
|
|
.fr-grid-row
|
|
|
|
|
.fr-col.fr-col-12.fr-col-md-3
|
|
|
|
|
= render partial: 'sidemenu'
|
|
|
|
|
.fr-col
|
2023-03-20 17:50:05 +01:00
|
|
|
|
- if !@dossier.termine?
|
|
|
|
|
%section.give-avis
|
|
|
|
|
%h1.tab-title Donner votre avis
|
2023-03-24 11:33:08 +01:00
|
|
|
|
%h2.fr-text--sm.fr-mb-2w
|
2023-03-20 17:50:05 +01:00
|
|
|
|
Demandeur :
|
|
|
|
|
%span.email.font-weight-normal= safe_claimant_email(@avis.claimant)
|
2023-03-24 11:33:08 +01:00
|
|
|
|
%span.fr-text--xs.fr-text-mention--grey.pull-right Demande d’avis envoyée le #{l(@avis.created_at, format: '%d/%m/%y')}
|
2023-03-20 17:50:05 +01:00
|
|
|
|
%p.introduction= @avis.introduction
|
|
|
|
|
|
|
|
|
|
- if @avis.introduction_file.attached?
|
|
|
|
|
= render Attachment::ShowComponent.new(attachment: @avis.introduction_file.attachment)
|
2023-03-24 11:33:08 +01:00
|
|
|
|
|
2023-03-31 16:10:47 +02:00
|
|
|
|
= render NestedForms::FormOwnerComponent.new
|
2023-03-20 17:50:05 +01:00
|
|
|
|
= form_for @avis, url: expert_avis_path(@avis.procedure, @avis), html: { data: { controller: 'persisted-form', persisted_form_key_value: dom_id(@avis) }, multipart: true } do |f|
|
|
|
|
|
|
2023-03-28 15:38:13 +02:00
|
|
|
|
- if @avis.question_label.present?
|
2023-03-20 17:50:05 +01:00
|
|
|
|
.fr-form-group
|
|
|
|
|
%fieldset.fr-fieldset.fr-fieldset--inline
|
|
|
|
|
%legend#radio-inline-legend.fr-fieldset__legend.fr-text--regular
|
|
|
|
|
= @avis.question_label
|
|
|
|
|
.fr-fieldset__content
|
|
|
|
|
.fr-radio-group
|
|
|
|
|
= f.radio_button :question_answer, true
|
|
|
|
|
= f.label :question_answer, 'oui', value: true, class: 'fr-label'
|
|
|
|
|
|
|
|
|
|
.fr-radio-group
|
|
|
|
|
= f.radio_button :question_answer, false
|
|
|
|
|
= f.label :question_answer, 'non', value: false, class: 'fr-label'
|
|
|
|
|
|
|
|
|
|
.fr-select-group
|
|
|
|
|
= f.text_area :answer, rows: 3, class: 'fr-input', placeholder: 'Votre avis', required: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= render Attachment::EditComponent.new(attached_file: @avis.piece_justificative_file, view_as: :download)
|
|
|
|
|
|
2023-03-24 16:14:00 +01:00
|
|
|
|
%p.confidentiel
|
|
|
|
|
- if @avis.confidentiel?
|
|
|
|
|
%span
|
|
|
|
|
Cet avis est confidentiel et n’est pas affiché aux autres experts consultés
|
|
|
|
|
- else
|
|
|
|
|
%span
|
|
|
|
|
Cet avis est partagé avec les autres experts
|
|
|
|
|
.send-wrapper
|
|
|
|
|
= f.submit 'Envoyer votre avis', class: 'fr-btn'
|
2023-03-20 17:50:05 +01:00
|
|
|
|
- else
|
|
|
|
|
%h2.empty-text
|
|
|
|
|
= t('helpers.information_text.no_new_avis_text')
|
|
|
|
|
%p.empty-text-details
|
|
|
|
|
= t('helpers.information_text.no_new_avis_text_detail')
|