_filter.html.haml 1.6 KB
Newer Older
1
= form_tag filter_path(entity), method: 'get' do
2
  %fieldset.scope-filter
3 4 5 6 7 8
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:scope].blank?)}
        = link_to filter_path(entity, scope: nil) do
          Assigned to me
      %li{class: ("active" if params[:scope] == 'authored')}
        = link_to filter_path(entity, scope: 'authored') do
9
          Created by me
10 11 12 13
      %li{class: ("active" if params[:scope] == 'all')}
        = link_to filter_path(entity, scope: 'all') do
          All

14
  %fieldset.status-filter
15 16 17 18 19 20 21 22 23 24 25 26
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:status].blank?)}
        = link_to filter_path(entity, status: nil) do
          Open
      %li{class: ("active" if params[:status] == 'closed')}
        = link_to filter_path(entity, status: 'closed') do
          Closed
      %li{class: ("active" if params[:status] == 'all')}
        = link_to filter_path(entity, status: 'all') do
          All

  %fieldset
D
Dmitriy Zaporozhets 已提交
27
    %legend Projects
28 29 30 31 32 33 34 35 36 37 38 39
    %ul.nav.nav-pills.nav-pills-small.nav-stacked
      - @projects.each do |project|
        - unless entities_per_project(project, entity).zero?
          %li{class: ("active" if params[:project_id] == project.id.to_s)}
            = link_to filter_path(entity, project_id: project.id) do
              = project.name_with_namespace
              %small.pull-right= entities_per_project(project, entity)

  %fieldset
    - if params[:status].present? || params[:project_id].present?
      = link_to filter_path(entity, status: nil, project_id: nil), class: 'pull-right cgray' do
        %i.icon-remove
40
        %strong Clear filter
41