2021-02-09 10:24:13 +01:00
|
|
|
- content_for(:title, "Avis")
|
|
|
|
|
|
|
|
.container
|
|
|
|
%h1.page-title Avis
|
|
|
|
|
2023-07-10 18:08:33 +02:00
|
|
|
%ul.procedure-list.fr-pl-0
|
2021-02-09 10:24:13 +01:00
|
|
|
- @avis_by_procedure.each do |p, procedure_avis|
|
2023-07-10 18:08:33 +02:00
|
|
|
%li.flex.align-start.fr-my-3w.fr-p-2w{ id: dom_id(p) }
|
2022-10-06 18:08:00 +02:00
|
|
|
.flex
|
|
|
|
= link_to instructeur_procedure_path(p), class: 'procedure-logo-link' do
|
2021-02-09 10:24:13 +01:00
|
|
|
.procedure-logo{ style: "background-image: url(#{p.logo_url})" }
|
|
|
|
|
2022-10-06 18:08:00 +02:00
|
|
|
.procedure-details
|
|
|
|
%p.fr-mb-2w
|
|
|
|
= procedure_badge(p)
|
2023-03-17 10:50:44 +01:00
|
|
|
= link_to(p.libelle, procedure_expert_avis_index_path(p), class: "fr-link fr-ml-1w")
|
2022-10-06 18:08:00 +02:00
|
|
|
|
|
|
|
%ul.procedure-stats.flex
|
2023-05-22 10:49:25 +02:00
|
|
|
%li.avis-a-donner
|
2022-10-06 18:08:00 +02:00
|
|
|
%object
|
2023-03-17 10:50:44 +01:00
|
|
|
= link_to(procedure_expert_avis_index_path(p, statut: Instructeurs::AvisController::A_DONNER_STATUS)) do
|
2023-05-22 10:50:26 +02:00
|
|
|
- without_answer_count = procedure_avis.select { _1.answer.nil? }.reject{ _1.dossier.termine?}.size
|
2022-10-06 18:08:00 +02:00
|
|
|
- if without_answer_count > 0
|
|
|
|
%span.notifications{ 'aria-label': "notifications" }
|
|
|
|
.stats-number
|
|
|
|
= without_answer_count
|
|
|
|
.stats-legend
|
|
|
|
avis à donner
|
2023-05-22 10:49:25 +02:00
|
|
|
%li.avis-donne
|
2022-10-06 18:08:00 +02:00
|
|
|
%object
|
2023-03-17 10:50:44 +01:00
|
|
|
= link_to(procedure_expert_avis_index_path(p, statut: Instructeurs::AvisController::DONNES_STATUS)) do
|
2022-10-06 18:08:00 +02:00
|
|
|
- with_answer_count = procedure_avis.select { |a| a.answer.present? }.size
|
|
|
|
.stats-number= with_answer_count
|
|
|
|
.stats-legend
|
|
|
|
= pluralize(with_answer_count, "avis donné")
|
2021-02-09 10:24:13 +01:00
|
|
|
|
2022-10-06 18:08:00 +02:00
|
|
|
- if p.close?
|
2023-07-10 18:08:33 +02:00
|
|
|
.ml-auto
|
2022-10-06 18:08:00 +02:00
|
|
|
%span.label
|
|
|
|
= t('helpers.procedure.close')
|
|
|
|
- elsif p.depubliee?
|
2023-07-10 18:08:33 +02:00
|
|
|
.ml-auto
|
2022-10-06 18:08:00 +02:00
|
|
|
%span.label
|
|
|
|
= t('helpers.procedure.unpublished')
|