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

18 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)
2021-04-29 21:17:54 +05:30
- display_count = local_assigns.fetch(:display_count, true)
2016-11-03 12:29:30 +05:30
2021-11-18 22:05:49 +05:30
= gl_tabs_nav({ class: 'issues-state-filters gl-border-b-0 gl-flex-grow-1' }) do
= gl_tab_link_to page_filter_path(state: 'opened'), { item_active: params[:state] == 'opened', id: 'state-opened', title: _("Filter by %{page_context_word} that are currently open.") % { page_context_word: page_context_word }, data: { state: 'opened' } } do
#{issuables_state_counter_text(type, :opened, display_count)}
2016-11-03 12:29:30 +05:30
- if type == :merge_requests
2021-11-18 22:05:49 +05:30
= gl_tab_link_to page_filter_path(state: 'merged'), item_active: params[:state] == 'merged', id: 'state-merged', title: _('Filter by merge requests that are currently merged.'), data: { state: 'merged' } do
#{issuables_state_counter_text(type, :merged, display_count)}
= gl_tab_link_to page_filter_path(state: 'closed'), item_active: params[:state] == 'closed', id: 'state-closed', title: _('Filter by merge requests that are currently closed and unmerged.'), data: { state: 'closed' } do
#{issuables_state_counter_text(type, :closed, display_count)}
2016-04-02 18:10:28 +05:30
- else
2021-11-18 22:05:49 +05:30
= gl_tab_link_to page_filter_path(state: 'closed'), item_active: params[:state] == 'closed', id: 'state-closed', title: _('Filter by issues that are currently closed.'), data: { state: 'closed', qa_selector: 'closed_issues_link' } do
#{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)