Merge branch 'fix-ci-nav' into 'master'
Fix confusing behaviour of back link in CI sidebar Back link should always be responsible for sidebar navigation below. It should change sidebar navigation to one level up See merge request !1316
This commit is contained in:
commit
d906dedec6
5 changed files with 4 additions and 10 deletions
|
@ -1,3 +0,0 @@
|
|||
= render 'layouts/ci/nav_project',
|
||||
back_title: 'Back to project commit',
|
||||
back_url: ci_project_ref_commits_path(@project, @commit.ref, @commit.sha)
|
|
@ -1,3 +0,0 @@
|
|||
= render 'layouts/ci/nav_project',
|
||||
back_title: 'Back to project commits',
|
||||
back_url: ci_project_path(@project)
|
|
@ -1,8 +1,8 @@
|
|||
%ul.nav.nav-sidebar
|
||||
= nav_link do
|
||||
= link_to defined?(back_url) ? back_url : ci_root_path, title: defined?(back_title) ? back_title : 'Back to Dashboard', data: {placement: 'right'}, class: 'back-link' do
|
||||
= link_to ci_root_path, title: 'Back to CI projects', data: {placement: 'right'}, class: 'back-link' do
|
||||
= icon('caret-square-o-left fw')
|
||||
%span= defined?(back_title) ? back_title : 'Back to Dashboard'
|
||||
%span= 'Back to CI projects'
|
||||
%li.separate-item
|
||||
= nav_link path: ['projects#show', 'commits#show', 'builds#show'] do
|
||||
= link_to ci_project_path(@project) do
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
- else
|
||||
= render "layouts/header/public", title: header_title
|
||||
|
||||
= render 'layouts/ci/page', sidebar: 'nav_build'
|
||||
= render 'layouts/ci/page', sidebar: 'nav_project'
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
- else
|
||||
= render "layouts/header/public", title: header_title
|
||||
|
||||
= render 'layouts/ci/page', sidebar: 'nav_commit'
|
||||
= render 'layouts/ci/page', sidebar: 'nav_project'
|
||||
|
|
Loading…
Reference in a new issue