2016-09-23 09:16:11 -04:00
- type = local_assigns.fetch(:type, :issues)
- page_context_word = type.to_s.humanize(capitalize: false)
2018-03-23 10:27:15 -04:00
- display_count = local_assigns.fetch(:display_count, :true)
2016-09-23 09:16:11 -04:00
2018-04-19 23:34:20 -04:00
%ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs
2017-02-12 03:02:26 -05:00
%li{ class: active_when(params[:state] == 'opened') }>
2018-12-13 23:13:51 -05:00
= link_to page_filter_path(state: 'opened'), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do
2018-03-23 10:27:15 -04:00
#{issuables_state_counter_text(type, :opened, display_count)}
2016-02-05 05:35:55 -05:00
2016-09-23 09:16:11 -04:00
- if type == :merge_requests
2017-02-12 03:02:26 -05:00
%li{ class: active_when(params[:state] == 'merged') }>
2018-12-13 23:13:51 -05:00
= link_to page_filter_path(state: 'merged'), id: 'state-merged', title: 'Filter by merge requests that are currently merged.', data: { state: 'merged' } do
2018-03-23 10:27:15 -04:00
#{issuables_state_counter_text(type, :merged, display_count)}
2016-02-05 05:35:55 -05:00
2017-06-19 14:59:17 -04:00
%li{ class: active_when(params[:state] == 'closed') }>
2018-12-13 23:13:51 -05:00
= link_to page_filter_path(state: 'closed'), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.', data: { state: 'closed' } do
2018-03-23 10:27:15 -04:00
#{issuables_state_counter_text(type, :closed, display_count)}
2017-06-19 14:59:17 -04:00
- else
%li{ class: active_when(params[:state] == 'closed') }>
2018-12-13 23:13:51 -05:00
= link_to page_filter_path(state: 'closed'), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do
2018-03-23 10:27:15 -04:00
#{issuables_state_counter_text(type, :closed, display_count)}
2016-02-05 05:35:55 -05:00
2018-03-23 10:27:15 -04:00
= render 'shared/issuable/nav_links/all', page_context_word: page_context_word, counter: issuables_state_counter_text(type, :all, display_count)