summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-16 19:00:02 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-16 19:00:02 +0000
commitd906dedec605fc91578c2e4986a006434165bf3c (patch)
tree6324ecedec75d951880de39ec866c6e004a91939
parent6cf554bd3c41ceba1f02424ff12120b3b768759d (diff)
parent9437f0618a72d6201bbf0382f4237c678138ff43 (diff)
downloadgitlab-ce-d906dedec605fc91578c2e4986a006434165bf3c.tar.gz
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
-rw-r--r--app/views/layouts/ci/_nav_build.html.haml3
-rw-r--r--app/views/layouts/ci/_nav_commit.haml3
-rw-r--r--app/views/layouts/ci/_nav_project.html.haml4
-rw-r--r--app/views/layouts/ci/build.html.haml2
-rw-r--r--app/views/layouts/ci/commit.html.haml2
5 files changed, 4 insertions, 10 deletions
diff --git a/app/views/layouts/ci/_nav_build.html.haml b/app/views/layouts/ci/_nav_build.html.haml
deleted file mode 100644
index 732882726e7..00000000000
--- a/app/views/layouts/ci/_nav_build.html.haml
+++ /dev/null
@@ -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)
diff --git a/app/views/layouts/ci/_nav_commit.haml b/app/views/layouts/ci/_nav_commit.haml
deleted file mode 100644
index 19c526678d0..00000000000
--- a/app/views/layouts/ci/_nav_commit.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-= render 'layouts/ci/nav_project',
- back_title: 'Back to project commits',
- back_url: ci_project_path(@project)
diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml
index 10b87e3a2b1..d747679c8cf 100644
--- a/app/views/layouts/ci/_nav_project.html.haml
+++ b/app/views/layouts/ci/_nav_project.html.haml
@@ -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
diff --git a/app/views/layouts/ci/build.html.haml b/app/views/layouts/ci/build.html.haml
index d404ecb894a..a1356f0dc2e 100644
--- a/app/views/layouts/ci/build.html.haml
+++ b/app/views/layouts/ci/build.html.haml
@@ -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'
diff --git a/app/views/layouts/ci/commit.html.haml b/app/views/layouts/ci/commit.html.haml
index 5727f1b8e3e..a1356f0dc2e 100644
--- a/app/views/layouts/ci/commit.html.haml
+++ b/app/views/layouts/ci/commit.html.haml
@@ -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'