<commit_before><section class="resource_list">
  <nav class="actions">
    <%= link_to "Create Policy", new_admin_policy_path, class: "button new_resource", title: "Draft a Policy" %>
    <%= link_to "Create Publication", new_admin_publication_path, class: "button new_resource", title: "Draft a Publication" %>
    <%= link_to "Create News Article", new_admin_news_article_path, class: "button new_resource", title: "Draft a News article" %>
    <%= link_to "Create Consultation", new_admin_consultation_path, class: "button new_resource", title: "Draft a Consultation" %>
    <%= link_to "Create Speech", new_admin_speech_path, class: "button new_resource", title: "Draft a Speech" %>
  </nav>

  <div class="collection">

    <nav class="filter group">
      <div class="type group">
        <%= link_to_filter 'all', filter: nil %>
        <%= link_to_filter 'policies', filter: 'policy' %>
        <%= link_to_filter 'publications', filter: 'publication' %>
        <%= link_to_filter 'news articles', filter: 'news_article' %>
        <%= link_to_filter 'consultations', filter: 'consultation' %>
        <%= link_to_filter 'speeches', filter: 'speech' %>
      </div>

      <div class="state group">
        <%=navigation_link 'drafts', admin_documents_path %>
        <%=navigation_link 'submitted', submitted_admin_documents_path %>
        <%=navigation_link 'published', published_admin_documents_path %>
      </div>
      
      <div class="type group">
        <%= link_to_filter('by everyone', author: nil, organisation: nil) %>
        <%= link_to_filter('by my department', author: nil, organisation: current_user.organisation) %>
        <%= link_to_filter('by me', author: current_user, organisation: nil) %>
      </div>
    </nav>

    <table class="documents">
      <thead>
        <tr>
          <th class="type">Type</th>
          <th>Title</th><commit_msg>Links to document lists should remember other set filters<commit_after><section class="resource_list">
  <nav class="actions">
    <%= link_to "Create Policy", new_admin_policy_path, class: "button new_resource", title: "Draft a Policy" %>
    <%= link_to "Create Publication", new_admin_publication_path, class: "button new_resource", title: "Draft a Publication" %>
    <%= link_to "Create News Article", new_admin_news_article_path, class: "button new_resource", title: "Draft a News article" %>
    <%= link_to "Create Consultation", new_admin_consultation_path, class: "button new_resource", title: "Draft a Consultation" %>
    <%= link_to "Create Speech", new_admin_speech_path, class: "button new_resource", title: "Draft a Speech" %>
  </nav>

  <div class="collection">

    <nav class="filter group">
      <div class="type group">
        <%= link_to_filter 'all', filter: nil %>
        <%= link_to_filter 'policies', filter: 'policy' %>
        <%= link_to_filter 'publications', filter: 'publication' %>
        <%= link_to_filter 'news articles', filter: 'news_article' %>
        <%= link_to_filter 'consultations', filter: 'consultation' %>
        <%= link_to_filter 'speeches', filter: 'speech' %>
      </div>

      <div class="state group">
        <%= link_to_filter 'drafts', action: :index %>
        <%= link_to_filter 'submitted', action: :submitted %>
        <%= link_to_filter 'published', action: :published  %>
      </div>
      
      <div class="type group">
        <%= link_to_filter('by everyone', author: nil, organisation: nil) %>
        <%= link_to_filter('by my department', author: nil, organisation: current_user.organisation) %>
        <%= link_to_filter('by me', author: current_user, organisation: nil) %>
      </div>
    </nav>

    <table class="documents">
      <thead>
        <tr>
          <th class="type">Type</th>
          <th>Title</th>
{'fraction_non_alphanumeric': 0.15120274914089346, 'fraction_numerical': 0.0, 'mean_word_length': 3.718204488778055, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '408353', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1145, 'n_words': 290}