diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2017-06-22 05:30:45 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-06-22 05:30:45 +0300 |
commit | 340b8a10bb184b3a54306d1415d9fa4a6c5fbe7c (patch) | |
tree | 5fcf3f0791b47c43f9997dbf4042a8182c80fdad /app/views | |
parent | 759a38d69b1a6c17197560835c62f47c5884decc (diff) | |
parent | 929502174d99c5d2b1ccd633b0a8db91ace0e73c (diff) |
Merge branch '33833-issue-and-mr-state-tabs-don-t-work-on-dashboard' into 'master'
Resolve "Issue and MR state tabs don't work on dashboard"
Closes #33833
See merge request !12278
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/shared/issuable/_nav.html.haml | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index cf7ba52d840..3f03cc7a275 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -1,24 +1,25 @@ - type = local_assigns.fetch(:type, :issues) - page_context_word = type.to_s.humanize(capitalize: false) - issuables = @issues || @merge_requests -- closed_title = 'Filter by issues that are currently closed.' %ul.nav-links.issues-state-filters %li{ class: active_when(params[:state] == 'opened') }> - %button.btn.btn-link{ id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", type: 'button', data: { state: 'opened' } } + = 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 #{issuables_state_counter_text(type, :opened)} - if type == :merge_requests %li{ class: active_when(params[:state] == 'merged') }> - %button.btn.btn-link{ id: 'state-merged', title: 'Filter by merge requests that are currently merged.', type: 'button', data: { state: 'merged' } } + = 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 #{issuables_state_counter_text(type, :merged)} - - closed_title = 'Filter by merge requests that are currently closed and unmerged.' - - %li{ class: active_when(params[:state] == 'closed') }> - %button.btn.btn-link{ id: 'state-closed', title: closed_title, type: 'button', data: { state: 'closed' } } - #{issuables_state_counter_text(type, :closed)} + %li{ class: active_when(params[:state] == 'closed') }> + = 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 + #{issuables_state_counter_text(type, :closed)} + - else + %li{ class: active_when(params[:state] == 'closed') }> + = 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') }> - %button.btn.btn-link{ id: 'state-all', title: "Show all #{page_context_word}.", type: 'button', data: { 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)} |