Backport Extract epic nav into separate partial for easier CE => EE
This commit is contained in:
parent
515c619c18
commit
1a2ba2af33
2 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
|||
- type = local_assigns.fetch(:type, :issues)
|
||||
- page_context_word = type.to_s.humanize(capitalize: false)
|
||||
- issuables = @issues || @merge_requests
|
||||
|
||||
%ul.nav-links.issues-state-filters
|
||||
%li{ class: active_when(params[:state] == 'opened') }>
|
||||
|
@ -20,6 +19,4 @@
|
|||
= link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do
|
||||
#{issuables_state_counter_text(type, :closed)}
|
||||
|
||||
%li{ class: active_when(params[:state] == 'all') }>
|
||||
= link_to page_filter_path(state: 'all', label: true), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do
|
||||
#{issuables_state_counter_text(type, :all)}
|
||||
= render 'shared/issuable/nav_links/all', page_context_word: page_context_word, counter: issuables_state_counter_text(type, :all)
|
||||
|
|
6
app/views/shared/issuable/nav_links/_all.html.haml
Normal file
6
app/views/shared/issuable/nav_links/_all.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- page_context_word = local_assigns.fetch(:page_context_word)
|
||||
- counter = local_assigns.fetch(:counter)
|
||||
|
||||
%li{ class: active_when(params[:state] == 'all') }>
|
||||
= link_to page_filter_path(state: 'all', label: true), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do
|
||||
#{counter}
|
Loading…
Reference in a new issue