% content_for :page_heading do %>
<%= t('.manage_articles') %>
<%= link_to(t('.new_article'), {controller: 'content', action: 'new'}, id: 'dialog-link', class: 'btn btn-info pull-right') %>
<% 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'] %>
<% end %>
<%= 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'}) %>
<%= select_tag('search[user_id]', options_from_collection_for_select(User.all, 'id', 'name'), {prompt: t('.select_an_author'), class: 'form-control'}) %>
<%= select_tag('search[published_at]', options_for_select(Article.publication_months), {prompt: t('.publication_date'), class: 'form-control'}) %>
<%= submit_tag(t('.search'), {class: 'btn btn-success'}) %>
<%= image_tag('spinner.gif') %>
<%= render 'article_list', { articles: @articles } %>
<% end %>