summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-16 20:16:44 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-16 20:16:44 +0200
commit9437f0618a72d6201bbf0382f4237c678138ff43 (patch)
tree67de8fd81d45e20cf91eb5122764d2992f351a96
parenta0aa6453bd0099a0e1d0bfd6725fff8aaa9d29a9 (diff)
downloadgitlab-ce-9437f0618a72d6201bbf0382f4237c678138ff43.tar.gz
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
-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'