Commit d906dede authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 6cf554bd 9437f061
= render 'layouts/ci/nav_project',
back_title: 'Back to project commit',
back_url: ci_project_ref_commits_path(@project, @commit.ref, @commit.sha)
= render 'layouts/ci/nav_project',
back_title: 'Back to project commits',
back_url: ci_project_path(@project)
%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'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment