.side-filters.hidden-xs.hidden-sm
  = form_tag project_entities_path, method: 'get' do
    - if current_user
      %fieldset
        %ul.nav.nav-pills.nav-stacked
          %li{class: ("active" if params[:scope] == 'all')}
            = link_to project_filter_path(scope: 'all') do
              Everyone's
          %li{class: ("active" if params[:scope] == 'assigned-to-me')}
            = link_to project_filter_path(scope: 'assigned-to-me') do
              Assigned to me
          %li{class: ("active" if params[:scope] == 'created-by-me')}
            = link_to project_filter_path(scope: 'created-by-me') do
              Created by me

    %fieldset
      %legend State
      %ul.nav.nav-pills
        %li{class: ("active" if params[:state] == 'opened')}
          = link_to project_filter_path(state: 'opened') do
            Open
        %li{class: ("active" if params[:state] == 'closed')}
          = link_to project_filter_path(state: 'closed') do
            Closed
        %li{class: ("active" if params[:state] == 'all')}
          = link_to project_filter_path(state: 'all') do
            All

    %fieldset
      - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any?
        = link_to project_entities_path, class: 'cgray pull-right' do
          %i.icon-remove
          %strong Clear filter


