<commit_before><% page_title @page_title %>
<section class="documents">
  <div class="row-fluid">
    <div class="span2">
      <div class="btn-group">
        <a class="btn btn-large dropdown-toggle" data-toggle="dropdown" href="#">
          Create new document
          <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
          <li><%= link_to "Policy", new_admin_policy_path, title: "Create Policy" %></li>
          <li><%= link_to "Publication", new_admin_publication_path, title: "Create Publication" %></li>
          <li><%= link_to "News Article", new_admin_news_article_path, title: "Create News Article" %></li>
          <li><%= link_to "Consultation", new_admin_consultation_path, title: "Create Consultation" %></li>
          <li><%= link_to "Speech", new_admin_speech_path, title: "Create Speech" %></li>
          <li><%= link_to "International Priority", new_admin_international_priority_path, title: "Create International Priority" %></li>
        </ul>
      </div>

      <nav class="well" style="padding: 8px 0;">
        <ul class="nav nav-list">
          <li class="nav-header">Filter by Author</li>
          <%= link_to_filter('Me', {author: current_user, organisation: nil}, title: "Show documents by me") %>
          <%= link_to_filter('My department', {author: nil, organisation: current_user.organisation}, title: "Show documents by my department") %>
          <%= link_to_filter('Everyone', {author: nil, organisation: nil}, title: "Show documents by everyone") %>
          <li class="nav-header">Filter by Kind</li>
          <%= link_to_filter 'All', {type: nil}, title: "Show all kinds of document" %>
          <%= link_to_filter 'Policies', {type: 'policy'}, title: "Show only policies" %>
          <%= link_to_filter 'Publications', {type: 'publication'}, title: "Show only publications" %>
          <%= link_to_filter 'News articles', {type: 'news_article'}, title: "Show only news articles" %>
          <%= link_to_filter 'Consultations', {type: 'consultation'}, title: "Show only consultations" %>
          <%= link_to_filter 'Responses', {type: 'consultation_response'}, title: "Show only consultation responses" %>
          <%= link_to_filter 'Speeches', {type: 'speech'}, title: "Show only speeches" %>
          <%= link_to_filter 'International priorities', {type: 'international_priorities'}, title: "Show only international priorities" %>
          <li class="nav-header">Filter by state</li>
          <% document_type = (params[:type] || "document").pluralize %>
          <%= link_to_filter 'All', {state: :active}, title: "Show #{document_type} in any workflow state" %>
          <%= link_to_filter 'Drafts', {state: :draft}, title: "Show only draft #{document_type}" %>
          <%= link_to_filter 'Submitted', {state: :submitted}, title: "Show only submitted #{document_type}" %>
          <%= link_to_filter 'Rejected', {state: :rejected}, title: "Show only rejected #{document_type}" %>
          <%= link_to_filter 'Published', {state: :published}, title: "Show only published #{document_type}" %>
        </ul>
      </nav>
    </div>

    <div class="collection span10">
      <h1>Documents</h1>

      <table class="table table-striped">
        <thead>
          <tr>
            <th class="type">Type</th>
            <th>Title</th>
            <th>Creator</th>
            <th>Updated</th>
            <% if viewing_all_active_editions? %>
              <th>State</th>
            <% end %>
            <% if show_featuring_controls?(*@editions) %>
              <th>Featured</th>
            <% end %>
          </tr>
        </thead>
        <tbody>
          <% @editions.each do |edition| %>
            <%= content_tag_for(:tr, edition, class: ('force_published' if edition.force_published?)) do %>
              <td class="type"><%= edition.type.titleize %></td>
              <td class="title">
                <span class="title"><%= link_to edition.title, admin_edition_path(edition), title: "View document #{edition.title}" %></span>
                <% if edition.force_published? %>
                  <span class="force_published label label-important">force published</span>
                <% end %>
                <% if edition.has_supporting_pages? %>
                  <div class="supporting_pages additional_information well">
                    <h4>Supporting Pages</h4>
                    <ul>
                      <% edition.supporting_pages.each do |supporting_page| %>
                      <li><%= link_to supporting_page.title, admin_supporting_page_path(supporting_page) %></li>
                      <% end %>
                    </ul>
                  </div>
                <% end %>
              </td>
              <td class="author"><%= linked_author(edition.creator) %></td>
              <td class="updated"><%= time_ago_in_words edition.updated_at %> ago</td>
              <% if viewing_all_active_editions? %>
                <td class="state"><%= edition.state.humanize %></td>
              <% end %>
              <% if show_featuring_controls?(edition) %>
                <td class="featured">
                  <% if edition.featured? %>
                    <%= button_to "No longer feature", admin_edition_featuring_path(edition), method: :delete, form_class: "unfeature" %>
                  <% else %>
                    <%= form_for(edition, url: admin_edition_featuring_path(edition), as: :edition, method: :post, html: {class: "feature"}) do |form| %>
                      <%= form.submit "Feature" %>
                    <% end %>
                  <% end %>
                </td>
              <% end %>
            <% end %>
          <% end %>
          <% if @editions.blank? %>
            <tr>
              <td colspan="4">No <%= @edition_state %> <%= (params[:type].present? ? params[:type].humanize.pluralize.downcase : 'documents') %> have been found.</td>
            </tr>
          <% end %>
        </tbody>
      </table>
    </div>
  </div>
</section><commit_msg>Fix the number of columns.<commit_after><% page_title @page_title %>
<section class="documents">
  <div class="row-fluid">
    <div class="span2">
      <div class="btn-group">
        <a class="btn btn-large dropdown-toggle" data-toggle="dropdown" href="#">
          Create new document
          <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
          <li><%= link_to "Policy", new_admin_policy_path, title: "Create Policy" %></li>
          <li><%= link_to "Publication", new_admin_publication_path, title: "Create Publication" %></li>
          <li><%= link_to "News Article", new_admin_news_article_path, title: "Create News Article" %></li>
          <li><%= link_to "Consultation", new_admin_consultation_path, title: "Create Consultation" %></li>
          <li><%= link_to "Speech", new_admin_speech_path, title: "Create Speech" %></li>
          <li><%= link_to "International Priority", new_admin_international_priority_path, title: "Create International Priority" %></li>
        </ul>
      </div>

      <nav class="well" style="padding: 8px 0;">
        <ul class="nav nav-list">
          <li class="nav-header">Filter by Author</li>
          <%= link_to_filter('Me', {author: current_user, organisation: nil}, title: "Show documents by me") %>
          <%= link_to_filter('My department', {author: nil, organisation: current_user.organisation}, title: "Show documents by my department") %>
          <%= link_to_filter('Everyone', {author: nil, organisation: nil}, title: "Show documents by everyone") %>
          <li class="nav-header">Filter by Kind</li>
          <%= link_to_filter 'All', {type: nil}, title: "Show all kinds of document" %>
          <%= link_to_filter 'Policies', {type: 'policy'}, title: "Show only policies" %>
          <%= link_to_filter 'Publications', {type: 'publication'}, title: "Show only publications" %>
          <%= link_to_filter 'News articles', {type: 'news_article'}, title: "Show only news articles" %>
          <%= link_to_filter 'Consultations', {type: 'consultation'}, title: "Show only consultations" %>
          <%= link_to_filter 'Responses', {type: 'consultation_response'}, title: "Show only consultation responses" %>
          <%= link_to_filter 'Speeches', {type: 'speech'}, title: "Show only speeches" %>
          <%= link_to_filter 'International priorities', {type: 'international_priorities'}, title: "Show only international priorities" %>

          <li class="nav-header">Filter by state</li>
          <% document_type = (params[:type] || "document").pluralize %>
          <%= link_to_filter 'All', {state: :active}, title: "Show #{document_type} in any workflow state" %>
          <%= link_to_filter 'Drafts', {state: :draft}, title: "Show only draft #{document_type}" %>
          <%= link_to_filter 'Submitted', {state: :submitted}, title: "Show only submitted #{document_type}" %>
          <%= link_to_filter 'Rejected', {state: :rejected}, title: "Show only rejected #{document_type}" %>
          <%= link_to_filter 'Published', {state: :published}, title: "Show only published #{document_type}" %>
        </ul>
      </nav>
    </div>

    <div class="collection span10">
      <h1>Documents</h1>

      <table class="table table-striped">
        <thead>
          <tr>
            <th class="type">Type</th>
            <th>Title</th>
            <th>Creator</th>
            <th>Updated</th>
            <% if viewing_all_active_editions? %>
              <th>State</th>
            <% end %>
            <% if show_featuring_controls?(*@editions) %>
              <th>Featured</th>
            <% end %>
          </tr>
        </thead>
        <tbody>
          <% if @editions.blank? %>
            <tr>
              <td colspan="5">No <%= @edition_state %> <%= (params[:type].present? ? params[:type].humanize.pluralize.downcase : 'documents') %> have been found.</td>
            </tr>
          <% end %>
          <% @editions.each do |edition| %>
            <%= content_tag_for(:tr, edition, class: ('force_published' if edition.force_published?)) do %>
              <td class="type"><%= edition.type.titleize %></td>
              <td class="title">
                <span class="title"><%= link_to edition.title, admin_edition_path(edition), title: "View document #{edition.title}" %></span>
                <% if edition.force_published? %>
                  <span class="force_published label label-important">force published</span>
                <% end %>
                <% if edition.has_supporting_pages? %>
                  <div class="supporting_pages additional_information well">
                    <h4>Supporting Pages</h4>
                    <ul>
                      <% edition.supporting_pages.each do |supporting_page| %>
                      <li><%= link_to supporting_page.title, admin_supporting_page_path(supporting_page) %></li>
                      <% end %>
                    </ul>
                  </div>
                <% end %>
              </td>
              <td class="author"><%= linked_author(edition.creator) %></td>
              <td class="updated"><%= time_ago_in_words edition.updated_at %> ago</td>
              <% if viewing_all_active_editions? %>
                <td class="state"><%= edition.state.humanize %></td>
              <% end %>
              <% if show_featuring_controls?(edition) %>
                <td class="featured">
                  <% if edition.featured? %>
                    <%= button_to "No longer feature", admin_edition_featuring_path(edition), method: :delete, form_class: "unfeature" %>
                  <% else %>
                    <%= form_for(edition, url: admin_edition_featuring_path(edition), as: :edition, method: :post, html: {class: "feature"}) do |form| %>
                      <%= form.submit "Feature" %>
                    <% end %>
                  <% end %>
                </td>
              <% end %>
            <% end %>
          <% end %>
        </tbody>
      </table>
    </div>
  </div>
</section>
{'fraction_non_alphanumeric': 0.16071133167907362, 'fraction_numerical': 0.0016542597187758478, 'mean_word_length': 2.3044547690625854, 'pattern_counts': {'":': 0, '<': 297, '<?xml version=': 0, '>': 297, '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': '2478569', 'n_tokens_mistral': 3739, 'n_tokens_neox': 3399, 'n_words': 817}