<commit_before>#procedure-show
  .backoffice-header
    .container.flex

      .procedure-logo
        - if @procedure.logo.present?
          = image_tag @procedure.logo, alt: "Logo de la procédure"

      .procedure-header
        %h1= @procedure.libelle
        %ul.tabs
          %li{ class: (@statut == 'a-suivre') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'a-suivre')) do
              à suivre
              %span.badge= @a_suivre_dossiers.count

          %li{ class: (@statut == 'suivis') ? 'active' : nil }>
            - if @followed_dossiers.with_unread_notifications.present?
              %span.notifications{ 'aria-label': 'notifications' }
            = link_to(procedure_path(@procedure, statut: 'suivis')) do
              = t('pluralize.followed', count: @followed_dossiers.count)
              %span.badge= @followed_dossiers.count

          %li{ class: (@statut == 'traites') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'traites')) do
              = t('pluralize.processed', count: @termines_dossiers.count)
              %span.badge= @termines_dossiers.count

          %li{ class: (@statut == 'tous') ? 'active' : nil }>
            - if @followed_dossiers.with_unread_notifications.present?
              %span.notifications{ 'aria-label': 'notifications' }
            = link_to(procedure_path(@procedure, statut: 'tous')) do
              tous les dossiers
              %span.badge= @all_state_dossiers.count

          %li{ class: (@statut == 'archives') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'archives')) do
              = t('pluralize.archived', count: @archived_dossiers.count)
              %span.badge= @archived_dossiers.count

      .procedure-actions
        %span.button.dropdown
          Télécharger tous les dossiers
          .dropdown-content.fade-in-down
            %ul.dropdown-items
              %li
                = link_to "Au format .csv", backoffice_download_dossiers_tps_path(format: :csv, procedure_id: @procedure.id), target: "_blank"
              %li
                = link_to "Au format .xls", backoffice_download_dossiers_tps_path(format: :xls, procedure_id: @procedure.id), target: "_blank"
              %li
                = link_to "Au format .ods", backoffice_download_dossiers_tps_path(format: :ods, procedure_id: @procedure.id), target: "_blank"

  .container
    - if @dossiers.present? || @current_filters.count > 0
      %span.button.dropdown
        Filtrer
        .dropdown-content.left-aligned.fade-in-down
          = form_tag add_filter_procedure_path(@procedure), method: :post, class: 'dropdown-form large' do
            = label_tag :field,  "Colonne"
            = select_tag :field, options_for_select(@available_fields_to_filters)
            %br
            = label_tag :value, "Valeur"
            = text_field_tag :value
            = hidden_field_tag :statut, @statut
            %br
            = submit_tag "Ajouter le filtre", class: 'button'

      - @current_filters.each do |filter|
        %span.filter
          = "#{filter['label']} : #{filter['value']}"
          = link_to remove_filter_procedure_path(@procedure, statut: @statut, table: filter['table'], column: filter['column']) do
            %img.close-icon{ src: image_url("close.svg") }

      %table.table.dossiers-table.hoverable
        %thead
          %tr
            = render partial: "header_field", locals: { field: { "label" => "Nº dossier", "table" => "self", "column" => "id" }, classname: "number-col" }

            - @displayed_fields.each do |field|<commit_msg>[Fix #791] Fix a typo preventing to download the Excel file<commit_after>#procedure-show
  .backoffice-header
    .container.flex

      .procedure-logo
        - if @procedure.logo.present?
          = image_tag @procedure.logo, alt: "Logo de la procédure"

      .procedure-header
        %h1= @procedure.libelle
        %ul.tabs
          %li{ class: (@statut == 'a-suivre') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'a-suivre')) do
              à suivre
              %span.badge= @a_suivre_dossiers.count

          %li{ class: (@statut == 'suivis') ? 'active' : nil }>
            - if @followed_dossiers.with_unread_notifications.present?
              %span.notifications{ 'aria-label': 'notifications' }
            = link_to(procedure_path(@procedure, statut: 'suivis')) do
              = t('pluralize.followed', count: @followed_dossiers.count)
              %span.badge= @followed_dossiers.count

          %li{ class: (@statut == 'traites') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'traites')) do
              = t('pluralize.processed', count: @termines_dossiers.count)
              %span.badge= @termines_dossiers.count

          %li{ class: (@statut == 'tous') ? 'active' : nil }>
            - if @followed_dossiers.with_unread_notifications.present?
              %span.notifications{ 'aria-label': 'notifications' }
            = link_to(procedure_path(@procedure, statut: 'tous')) do
              tous les dossiers
              %span.badge= @all_state_dossiers.count

          %li{ class: (@statut == 'archives') ? 'active' : nil }>
            = link_to(procedure_path(@procedure, statut: 'archives')) do
              = t('pluralize.archived', count: @archived_dossiers.count)
              %span.badge= @archived_dossiers.count

      .procedure-actions
        %span.button.dropdown
          Télécharger tous les dossiers
          .dropdown-content.fade-in-down
            %ul.dropdown-items
              %li
                = link_to "Au format .csv", backoffice_download_dossiers_tps_path(format: :csv, procedure_id: @procedure.id), target: "_blank"
              %li
                = link_to "Au format .xlsx", backoffice_download_dossiers_tps_path(format: :xlsx, procedure_id: @procedure.id), target: "_blank"
              %li
                = link_to "Au format .ods", backoffice_download_dossiers_tps_path(format: :ods, procedure_id: @procedure.id), target: "_blank"

  .container
    - if @dossiers.present? || @current_filters.count > 0
      %span.button.dropdown
        Filtrer
        .dropdown-content.left-aligned.fade-in-down
          = form_tag add_filter_procedure_path(@procedure), method: :post, class: 'dropdown-form large' do
            = label_tag :field,  "Colonne"
            = select_tag :field, options_for_select(@available_fields_to_filters)
            %br
            = label_tag :value, "Valeur"
            = text_field_tag :value
            = hidden_field_tag :statut, @statut
            %br
            = submit_tag "Ajouter le filtre", class: 'button'

      - @current_filters.each do |filter|
        %span.filter
          = "#{filter['label']} : #{filter['value']}"
          = link_to remove_filter_procedure_path(@procedure, statut: @statut, table: filter['table'], column: filter['column']) do
            %img.close-icon{ src: image_url("close.svg") }

      %table.table.dossiers-table.hoverable
        %thead
          %tr
            = render partial: "header_field", locals: { field: { "label" => "Nº dossier", "table" => "self", "column" => "id" }, classname: "number-col" }

            - @displayed_fields.each do |field|
{'fraction_non_alphanumeric': 0.1317586018569088, 'fraction_numerical': 0.0009557618787547789, 'mean_word_length': 2.328032712403453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2136419', 'n_tokens_mistral': 2382, 'n_tokens_neox': 2276, 'n_words': 445}