2018-10-04 15:50:21 +02:00
|
|
|
%section.list-avis
|
|
|
|
%h1.tab-title
|
|
|
|
Avis des invités
|
2022-10-06 12:58:02 +02:00
|
|
|
%span.fr-badge= avis.count
|
2017-09-20 10:41:09 +02:00
|
|
|
|
2018-10-04 15:50:21 +02:00
|
|
|
%ul
|
|
|
|
- avis.each do |avis|
|
|
|
|
%li.one-avis.flex.align-start
|
|
|
|
.width-100
|
2022-10-12 12:26:18 +02:00
|
|
|
%h2.claimant.fr-font--md.font-weight-normal
|
2020-07-21 10:46:55 +02:00
|
|
|
= "#{t('claimant', scope: 'activerecord.attributes.avis')} :"
|
2022-10-12 12:26:18 +02:00
|
|
|
%span.font-weight-bold= (avis.claimant.email == current_instructeur.email) ? 'Vous' : avis.claimant.email
|
2018-10-04 15:50:21 +02:00
|
|
|
- if avis.confidentiel?
|
|
|
|
%span.confidentiel
|
2020-07-21 10:46:55 +02:00
|
|
|
= t('confidentiel', scope: 'activerecord.attributes.avis')
|
|
|
|
%span.icon.lock{ title: t('confidentiel', scope: 'helpers.hint') }
|
2022-10-12 12:26:18 +02:00
|
|
|
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
|
2020-07-21 10:46:55 +02:00
|
|
|
= t('demande_envoyee_le', scope: 'views.shared.avis', date: l(avis.created_at, format: '%d/%m/%y à %H:%M'))
|
2018-10-04 15:50:21 +02:00
|
|
|
%p= avis.introduction
|
2023-03-06 11:05:14 +01:00
|
|
|
- if avis.question_label
|
|
|
|
%p= avis.question_label
|
2017-09-20 10:41:09 +02:00
|
|
|
|
2018-10-04 15:50:21 +02:00
|
|
|
.answer.flex.align-start
|
|
|
|
%span.icon.bubble.avis-icon
|
|
|
|
.width-100
|
2022-10-12 12:26:18 +02:00
|
|
|
%h2.instructeur.fr-font--md.font-weight-normal
|
2021-02-25 09:44:42 +01:00
|
|
|
= (avis.expert.email == current_instructeur.email) ? 'Vous' : avis.expert.email
|
2018-10-04 15:50:21 +02:00
|
|
|
- if avis.answer.present?
|
2020-07-16 11:14:37 +02:00
|
|
|
- if avis.revoked?
|
2022-10-12 12:26:18 +02:00
|
|
|
%span.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.revoked_at) }
|
2020-07-21 10:46:55 +02:00
|
|
|
= t('demande_revoquee_le', scope: 'views.shared.avis', date: l(avis.revoked_at, format: '%d/%m/%y à %H:%M'))
|
2020-07-16 11:14:37 +02:00
|
|
|
- else
|
2020-07-16 20:42:50 +02:00
|
|
|
- if avis.revokable_by?(current_instructeur)
|
2022-10-12 12:26:18 +02:00
|
|
|
%span.fr-text--xs.fr-text-mention--grey= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
|
|
|
|
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
|
2020-07-21 10:46:55 +02:00
|
|
|
= t('reponse_donnee_le', scope: 'views.shared.avis', date: l(avis.updated_at, format: '%d/%m/%y à %H:%M'))
|
2018-10-04 15:50:21 +02:00
|
|
|
- else
|
2022-10-12 12:26:18 +02:00
|
|
|
%span.fr-text--xs.fr-text-mention--grey
|
2020-07-21 10:46:55 +02:00
|
|
|
= t('en_attente', scope: 'views.shared.avis')
|
2020-07-20 16:26:16 +02:00
|
|
|
|
|
2023-01-26 16:19:06 +01:00
|
|
|
%span= link_to(t('remind', scope: 'helpers.label'), remind_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('remind', scope: 'helpers.confirmation', email: avis.expert.email) })
|
2020-07-16 20:42:50 +02:00
|
|
|
- if avis.revokable_by?(current_instructeur)
|
2020-07-20 16:26:16 +02:00
|
|
|
|
|
2021-02-25 09:44:42 +01:00
|
|
|
= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
|
2023-01-23 22:10:54 +01:00
|
|
|
- if avis.reminded_at
|
|
|
|
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.reminded_at) }
|
|
|
|
= t('relance_effectuee_le', scope: 'views.shared.avis', date: l(avis.reminded_at, format: '%d/%m/%y à %H:%M'))
|
2021-11-29 15:00:50 +01:00
|
|
|
- if avis.introduction_file.attached?
|
2022-05-06 12:24:01 +02:00
|
|
|
= render Attachment::ShowComponent.new(attachment: avis.introduction_file.attachment)
|
2021-11-29 15:00:50 +01:00
|
|
|
.answer-body.mb-3
|
|
|
|
%p #{t('views.instructeurs.avis.introduction_file_explaination')} #{avis.claimant.email}
|
|
|
|
|
2019-05-21 14:21:13 +02:00
|
|
|
- if avis.piece_justificative_file.attached?
|
2022-05-06 12:24:01 +02:00
|
|
|
= render Attachment::ShowComponent.new(attachment: avis.piece_justificative_file.attachment)
|
2019-04-04 10:13:24 +02:00
|
|
|
.answer-body
|
2023-03-22 11:56:52 +01:00
|
|
|
- if [true, false].include? avis.question_answer
|
2023-03-06 11:05:14 +01:00
|
|
|
%p= t("question_answer.#{avis.question_answer}", scope: 'helpers.label')
|
|
|
|
|
2023-02-22 11:47:58 +01:00
|
|
|
= render SimpleFormatComponent.new(avis.answer, allow_a: false)
|