<div class="container">
  <div class="btn-group" role="group" aria-label="Paper Status">
    <%= link_to "/dashboard/#{current_user.editor.login}", class: current_class?("/dashboard/#{current_user.editor.login}") do %>
    Your papers
    <div class="count-badge"><%= raw current_user.editor.papers.in_progress.count %></div>
    <% end %>
    <%= link_to dashboard_incoming_path(track_id: @track), class: current_class?(dashboard_incoming_path) do %>
    Papers with no editor
    <div class="count-badge"><%= raw Paper.unscoped.in_progress.where(editor: nil).count %></div>
    <% end %>
    <%= link_to dashboard_in_progress_path(track_id: @track), class: current_class?(dashboard_in_progress_path) do %>
    In progress papers
    <div class="count-badge"><%= raw Paper.unscoped.in_progress.count %></div>
    <% end %>
    <%= link_to dashboard_query_scoped_path(track_id: @track), class: current_class?(dashboard_query_scoped_path) do %>
    👍👎
    <% end %>
    <%= link_to dashboard_all_path(track_id: @track), class: current_class?(dashboard_all_path) do %>
    All papers
    <div class="count-badge"><%= raw Paper.unscoped.all.count %></div>
    <% end %>
    <%= link_to "/dashboard", class: current_class?("/dashboard") do %>
    <%= Rails.application.settings['abbreviation'] %> Statistics
    <% end %>
  </div>

  <% if [dashboard_incoming_path, dashboard_in_progress_path, dashboard_query_scoped_path, dashboard_all_path].include?(request.path) && JournalFeatures.tracks? %>
  <div class="float-right">
    <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", style: "max-width:340px;font-size:81%", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %>
  </div>
  <% end %>
</div>
