Skip to content
Snippets Groups Projects
Commit 9437f061 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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
parent a0aa6453
No related branches found
No related tags found
No related merge requests found
= 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
Loading
Loading
Loading
Loading
@@ -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'
Loading
Loading
@@ -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'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment