= form_tag project_entities_path, method: 'get' do
  %fieldset
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:scope].blank?)}
        = link_to project_filter_path(scope: nil) 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

    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:state].blank?)}
        = link_to project_filter_path(state: nil) 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



= form_tag project_entities_path, method: 'get' do
  %fieldset
    - if current_user
      %ul.nav.nav-pills.nav-stacked
        %li{class: ("active" if params[:scope].blank?)}
          = link_to project_filter_path(scope: nil) 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

    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:state].blank?)}
        = link_to project_filter_path(state: nil) 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



Hide some filters if current_user is nil
Hide some filters if current_user is nil
