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

26 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)
- issuables = @issues || @merge_requests
2016-04-02 18:10:28 +05:30
%ul.nav-links.issues-state-filters
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'opened') }>
2017-09-10 17:25:29 +05:30
= link_to page_filter_path(state: 'opened', label: true), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do
2016-11-03 12:29:30 +05:30
#{issuables_state_counter_text(type, :opened)}
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') }>
2017-09-10 17:25:29 +05:30
= link_to page_filter_path(state: 'merged', label: true), id: 'state-merged', title: 'Filter by merge requests that are currently merged.', data: { state: 'merged' } do
2016-11-03 12:29:30 +05:30
#{issuables_state_counter_text(type, :merged)}
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'closed') }>
2017-09-10 17:25:29 +05:30
= link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.', data: { state: 'closed' } do
2016-11-03 12:29:30 +05:30
#{issuables_state_counter_text(type, :closed)}
2016-04-02 18:10:28 +05:30
- else
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'closed') }>
2017-09-10 17:25:29 +05:30
= link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do
2016-11-03 12:29:30 +05:30
#{issuables_state_counter_text(type, :closed)}
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
%li{ class: active_when(params[:state] == 'all') }>
2017-09-10 17:25:29 +05:30
= link_to page_filter_path(state: 'all', label: true), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do
2016-11-03 12:29:30 +05:30
#{issuables_state_counter_text(type, :all)}