summaryrefslogtreecommitdiff
path: root/app/views/shared/_milestones_filter.html.haml
blob: 186ed4a7c8b0147f520756e226ba25febd28e7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- if @project
  - counts = milestone_counts(@project.milestones)

%ul.nav-links
  %li{class: milestone_class_for_state(params[:state], 'opened', true)}>
    = link_to milestones_filter_path(state: 'opened') do
      Open
      - if @project
        %span.badge #{counts[:opened]}
  %li{class: milestone_class_for_state(params[:state], 'closed')}>
    = link_to milestones_filter_path(state: 'closed') do
      Closed
      - if @project
        %span.badge #{counts[:closed]}
  %li{class: milestone_class_for_state(params[:state], 'all')}>
    = link_to milestones_filter_path(state: 'all') do
      All
      - if @project
        %span.badge #{counts[:all]}