- content_for(:title, "Avis") .sub-header .fr-container %h1.fr-h3 Avis .fr-container %ul.procedure-list.fr-pl-0 - @avis_by_procedure.each do |p, procedure_avis| %li.list-style-type-none.fr-mb-3w{ id: dom_id(p) } .procedure-details .clipboard-container .fr-mb-2w.fr-mt-2w = badge = procedure_badge(p) %h3{ class: class_names('font-weight-normal fr-link' => true, 'fr-ml-1v' => badge.present?) } = link_to "#{p.libelle} - n°#{p.id}", instructeur_procedure_path(p) %ul.procedure-stats.flex.wrap.flex-gap-1 %li.fr-btn.fr-btn--tertiary.flex.justify-center.fr-enlarge-link.fr-mb-1w = 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" } .center.fr-text--bold.fr-text--sm = without_answer_count .center.fr-text--xs avis à donner %li.fr-btn.fr-btn--tertiary.flex.justify-center.fr-enlarge-link.fr-mb-1w = 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 .center.fr-text--bold.fr-text--sm= with_answer_count .center.fr-text--xs = pluralize(with_answer_count, "avis donné")