debian-mirror-gitlab/app/views/shared/issuable/_nav.html.haml

24 lines
1.6 KiB
Text
Raw Normal View History

2016-11-03 12:29:30 +05:30
- type = local_assigns.fetch(:type, :issues)
- page_context_word = type.to_s.humanize(capitalize: false)
2018-05-09 12:01:36 +05:30
- display_count = local_assigns.fetch(:display_count, :true)
2016-11-03 12:29:30 +05:30
2018-11-08 19:23:39 +05:30
%ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'opened') }>
2019-02-15 15:39:39 +05:30
= 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-05-09 12:01:36 +05:30
#{issuables_state_counter_text(type, :opened, display_count)}
2016-04-02 18:10:28 +05:30
2016-11-03 12:29:30 +05:30
- if type == :merge_requests
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'merged') }>
2019-02-15 15:39:39 +05:30
= link_to page_filter_path(state: 'merged'), id: 'state-merged', title: 'Filter by merge requests that are currently merged.', data: { state: 'merged' } do
2018-05-09 12:01:36 +05:30
#{issuables_state_counter_text(type, :merged, display_count)}
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'closed') }>
2019-02-15 15:39:39 +05:30
= 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-05-09 12:01:36 +05:30
#{issuables_state_counter_text(type, :closed, display_count)}
2016-04-02 18:10:28 +05:30
- else
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'closed') }>
2019-12-04 20:38:33 +05:30
= link_to page_filter_path(state: 'closed'), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed', qa_selector: 'closed_issues_link' } do
2018-05-09 12:01:36 +05:30
#{issuables_state_counter_text(type, :closed, display_count)}
2016-04-02 18:10:28 +05:30
2018-05-09 12:01:36 +05:30
= render 'shared/issuable/nav_links/all', page_context_word: page_context_word, counter: issuables_state_counter_text(type, :all, display_count)