.container
  %h1.backoffice-title Procédures

  %ul.procedure-list
    - @procedures.each do |p|
      %li.procedure-item.flex.align-start
        - if p.logo.present?
          = image_tag p.logo, class: "procedure-logo"

        .procedure-details
          %p.procedure-title
            = link_to(p.libelle, procedure_path(p))

          %ul.procedure-stats.flex
            %li
              - a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
              .stats-number
                = a_suivre_count
              .stats-legend
                à suivre
            %li
              - followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
              .stats-number
                = followed_count
              .stats-legend
                = t('pluralize.followed', count: followed_count)
            %li
              - termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
              .stats-number
                = termines_count
              .stats-legend
                = t('pluralize.processed', count: termines_count)
            %li
              - dossier_count = @dossiers_count_per_procedure[p.id] || 0
              .stats-number
                = dossier_count
              .stats-legend
                = t('pluralize.case', count: dossier_count)
            %li
              - archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
              .stats-number
                = archived_count
              .stats-legend
                = t('pluralize.archived', count: archived_count)

        - if p.archivee?
          .procedure-status
            %span.label Archivée