2016-09-23 09:16:11 -04:00
|
|
|
- type = local_assigns.fetch(:type, :issues)
|
|
|
|
- page_context_word = type.to_s.humanize(capitalize: false)
|
|
|
|
- issuables = @issues || @merge_requests
|
|
|
|
|
2016-02-05 05:35:55 -05:00
|
|
|
%ul.nav-links.issues-state-filters
|
|
|
|
%li{class: ("active" if params[:state] == 'opened')}
|
2016-04-15 13:18:31 -04:00
|
|
|
= link_to page_filter_path(state: 'opened', label: true), title: "Filter by #{page_context_word} that are currently opened." do
|
2016-09-26 13:12:16 -04:00
|
|
|
#{issuables_state_counter_text(type, :opened)}
|
2016-02-05 05:35:55 -05:00
|
|
|
|
2016-09-23 09:16:11 -04:00
|
|
|
- if type == :merge_requests
|
2016-02-05 05:35:55 -05:00
|
|
|
%li{class: ("active" if params[:state] == 'merged')}
|
2016-04-15 13:18:31 -04:00
|
|
|
= link_to page_filter_path(state: 'merged', label: true), title: 'Filter by merge requests that are currently merged.' do
|
2016-09-26 13:12:16 -04:00
|
|
|
#{issuables_state_counter_text(type, :merged)}
|
2016-02-05 05:35:55 -05:00
|
|
|
|
|
|
|
%li{class: ("active" if params[:state] == 'closed')}
|
2016-04-15 13:18:31 -04:00
|
|
|
= link_to page_filter_path(state: 'closed', label: true), title: 'Filter by merge requests that are currently closed and unmerged.' do
|
2016-09-26 13:12:16 -04:00
|
|
|
#{issuables_state_counter_text(type, :closed)}
|
2016-02-05 05:35:55 -05:00
|
|
|
- else
|
|
|
|
%li{class: ("active" if params[:state] == 'closed')}
|
2016-04-15 13:18:31 -04:00
|
|
|
= link_to page_filter_path(state: 'closed', label: true), title: 'Filter by issues that are currently closed.' do
|
2016-09-26 13:12:16 -04:00
|
|
|
#{issuables_state_counter_text(type, :closed)}
|
2016-02-05 05:35:55 -05:00
|
|
|
|
|
|
|
%li{class: ("active" if params[:state] == 'all')}
|
2016-04-15 13:18:31 -04:00
|
|
|
= link_to page_filter_path(state: 'all', label: true), title: "Show all #{page_context_word}." do
|
2016-09-26 13:12:16 -04:00
|
|
|
#{issuables_state_counter_text(type, :all)}
|