<commit_before><% content_for :page_heading do %>
  <h2>
    <%= t('.manage_articles') %>
    <%= link_to(t('.new_article'), { controller: 'content', action: 'new' }, { id: 'dialog-link', class: 'btn btn-info pull-right' }) %>
  </h2>
<% end %>

<%= form_tag({ action: 'index' }, { method: :get, name: 'article', remote: true, class: 'form-inline spinnable', "data-update-success": 'articleList' }) do %>

  <% if params[:search] and params[:search]['state'] %>
    <input type="hidden" name="search[state]" value="<%= params[:search]['state'] %>" />
  <% end %>

  <p>
    <%= link_to(t('.all_articles'), { action: 'index' }, { class: 'label label-default' }) %>
    <%= link_to(t('.published'), { action: 'index', search: { state: 'published' } }, { class: 'label label-success' }) %>
    <%= link_to(t('.withdrawn'), { action: 'index', search: { state: 'withdrawn' } }, { class: 'label label-danger' }) %>
    <%= link_to(t('.drafts'), { action: 'index', search: { state: 'drafts' } }, { class: 'label label-info' }) %>
    <%= link_to(t('.publication_pending'), { action: 'index', search: { state: 'pending' } }, { class: 'label label-warning' }) %>
  </p>

  <div class="panel panel-default">
    <div class="panel-heading">
      <div class="pull-right">
        <div class="form-group">
          <%= select_tag('search[user_id]', options_from_collection_for_select(User.all, 'id', 'name'), prompt: t('.select_an_author'), class: 'form-control') %>
        </div>
        <div class="form-group">
          <%= select_tag('search[published_at]', options_for_select(Article.publication_months), prompt: t('.publication_date'), class: 'form-control') %>
        </div>
        <div class="form-group">
          <input id="search" type="text" name="search[searchstring]" class="form-control" />
        </div>
        <div class="form-group">
          <%= submit_tag(t('.search'), class: 'btn btn-success') %>
          <span id="spinner" style="display:none;"><%= image_tag('spinner.gif') %></span>
        </div>
      </div>
      <br style="clear: both" />
    </div>
  </div>
  <table class="table table-hover">
    <thead>
      <tr>
        <th><%= Article.human_attribute_name(:title) %></th>
        <th><%= Article.human_attribute_name(:author) %></th>
        <th><%= Article.human_attribute_name(:created_at) %></th>
        <th><%= Article.human_attribute_name(:published_at) %></th>
        <th><%= Article.human_attribute_name(:feedback) %></th>
        <th><%= Article.human_attribute_name(:text_filter) %></th>
        <th><%= t(".actions") %></th>
      </tr>
    </thead>
    <tbody id="articleList">
      <%= render 'article_list', articles: @articles %>
    </tbody>
  </table>
<% end %><commit_msg>Use view translations for table columns headers<commit_after><% content_for :page_heading do %>
  <h2>
    <%= t('.manage_articles') %>
    <%= link_to(t('.new_article'), { controller: 'content', action: 'new' }, { id: 'dialog-link', class: 'btn btn-info pull-right' }) %>
  </h2>
<% end %>

<%= form_tag({ action: 'index' }, { method: :get, name: 'article', remote: true, class: 'form-inline spinnable', "data-update-success": 'articleList' }) do %>

  <% if params[:search] and params[:search]['state'] %>
    <input type="hidden" name="search[state]" value="<%= params[:search]['state'] %>" />
  <% end %>

  <p>
    <%= link_to(t('.all_articles'), { action: 'index' }, { class: 'label label-default' }) %>
    <%= link_to(t('.published'), { action: 'index', search: { state: 'published' } }, { class: 'label label-success' }) %>
    <%= link_to(t('.withdrawn'), { action: 'index', search: { state: 'withdrawn' } }, { class: 'label label-danger' }) %>
    <%= link_to(t('.drafts'), { action: 'index', search: { state: 'drafts' } }, { class: 'label label-info' }) %>
    <%= link_to(t('.publication_pending'), { action: 'index', search: { state: 'pending' } }, { class: 'label label-warning' }) %>
  </p>

  <div class="panel panel-default">
    <div class="panel-heading">
      <div class="pull-right">
        <div class="form-group">
          <%= select_tag('search[user_id]', options_from_collection_for_select(User.all, 'id', 'name'), prompt: t('.select_an_author'), class: 'form-control') %>
        </div>
        <div class="form-group">
          <%= select_tag('search[published_at]', options_for_select(Article.publication_months), prompt: t('.publication_date'), class: 'form-control') %>
        </div>
        <div class="form-group">
          <input id="search" type="text" name="search[searchstring]" class="form-control" />
        </div>
        <div class="form-group">
          <%= submit_tag(t('.search'), class: 'btn btn-success') %>
          <span id="spinner" style="display:none;"><%= image_tag('spinner.gif') %></span>
        </div>
      </div>
      <br style="clear: both" />
    </div>
  </div>
  <table class="table table-hover">
    <thead>
      <tr>
        <th><%= t(".title") %></th>
        <th><%= t(".author") %></th>
        <th><%= t(".created_at") %></th>
        <th><%= t(".published_at") %></th>
        <th><%= t(".feedback") %></th>
        <th><%= t(".text_filter") %></th>
        <th><%= t(".actions") %></th>
      </tr>
    </thead>
    <tbody id="articleList">
      <%= render 'article_list', articles: @articles %>
    </tbody>
  </table>
<% end %>
{'fraction_non_alphanumeric': 0.23641813413263393, 'fraction_numerical': 0.0007493443237167478, 'mean_word_length': 3.4087530966143684, 'pattern_counts': {'":': 2, '<': 145, '<?xml version=': 0, '>': 145, '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': '4934162', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1766, 'n_words': 362}