demarches-normaliennes/app/views/experts/avis/index.html.haml

47 lines
1.8 KiB
Text
Raw Normal View History

2021-02-09 10:24:13 +01:00
- content_for(:title, "Avis")
2024-05-02 16:12:55 +02:00
.sub-header
.fr-container
%h1.fr-h3 Avis
2021-02-09 10:24:13 +01:00
2024-05-02 16:12:55 +02:00
.fr-container
%ul.procedure-list.fr-pl-0
2021-02-09 10:24:13 +01:00
- @avis_by_procedure.each do |p, procedure_avis|
%li.flex.align-start.fr-my-3w.fr-p-2w{ id: dom_id(p) }
.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})" }
.procedure-details
%p.fr-mb-2w
= procedure_badge(p)
= link_to(p.libelle, procedure_expert_avis_index_path(p), class: "fr-link fr-ml-1w")
%ul.procedure-stats.flex
%li.avis-a-donner
%object
= link_to(procedure_expert_avis_index_path(p, statut: Instructeurs::AvisController::A_DONNER_STATUS)) do
- without_answer_count = procedure_avis.select { _1.answer.nil? }.reject{ _1.dossier.termine?}.size
- if without_answer_count > 0
%span.notifications{ 'aria-label': "notifications" }
.stats-number
= without_answer_count
.stats-legend
avis à donner
%li.avis-donne
%object
= link_to(procedure_expert_avis_index_path(p, statut: Instructeurs::AvisController::DONNES_STATUS)) do
- 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
- if p.close?
.ml-auto
%span.label
= t('helpers.procedure.close')
- elsif p.depubliee?
.ml-auto
%span.label
= t('helpers.procedure.unpublished')