diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-14 14:03:02 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-14 14:03:02 +0200 |
commit | 1ce85dc4e2a1b162a0c30349f3594c1aab710708 (patch) | |
tree | 50f9befb4ed130ccf55d8aeb9713ccaf3920723f /app/views | |
parent | d0b9a6fca2e73277c8a8e64c9a5f1e7cc02f0570 (diff) | |
download | gitlab-ce-1ce85dc4e2a1b162a0c30349f3594c1aab710708.tar.gz |
Fix navigation and header tile
Remove redundant navigation on commits and builds page
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/ci/builds/show.html.haml | 9 | ||||
-rw-r--r-- | app/views/ci/commits/show.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav_build.html.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav_commit.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav_project.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/ci/build.html.haml | 11 | ||||
-rw-r--r-- | app/views/layouts/ci/commit.html.haml | 11 | ||||
-rw-r--r-- | app/views/layouts/ci/project.html.haml | 2 |
8 files changed, 34 insertions, 18 deletions
diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml index 1a07feeb20e..d1e955b5012 100644 --- a/app/views/ci/builds/show.html.haml +++ b/app/views/ci/builds/show.html.haml @@ -1,12 +1,3 @@ -%h4.page-title - = link_to @project.name, ci_project_path(@project) - @ - = @commit.short_sha - -%p - = link_to ci_project_ref_commits_path(@project, @commit.ref, @commit.sha) do - ← Back to project commit -%hr #up-build-trace - if @commit.matrix? %ul.nav.nav-tabs.append-bottom-10 diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 72fda8fe949..1aeb557314a 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -1,11 +1,3 @@ -%h4.page-title - = @project.name - @ - #{gitlab_commit_link(@project, @commit.sha)} -%p - = link_to ci_project_path(@project) do - ← Back to project commits -%hr .commit-info %pre.commit-message #{@commit.git_commit_message} diff --git a/app/views/layouts/ci/_nav_build.html.haml b/app/views/layouts/ci/_nav_build.html.haml new file mode 100644 index 00000000000..732882726e7 --- /dev/null +++ b/app/views/layouts/ci/_nav_build.html.haml @@ -0,0 +1,3 @@ += 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 new file mode 100644 index 00000000000..19c526678d0 --- /dev/null +++ b/app/views/layouts/ci/_nav_commit.haml @@ -0,0 +1,3 @@ += 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 2d9897fa864..10b87e3a2b1 100644 --- a/app/views/layouts/ci/_nav_project.html.haml +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -1,4 +1,9 @@ %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 + = icon('caret-square-o-left fw') + %span= defined?(back_title) ? back_title : 'Back to Dashboard' + %li.separate-item = nav_link path: ['projects#show', 'commits#show', 'builds#show'] do = link_to ci_project_path(@project) do %i.fa.fa-list-alt diff --git a/app/views/layouts/ci/build.html.haml b/app/views/layouts/ci/build.html.haml new file mode 100644 index 00000000000..d404ecb894a --- /dev/null +++ b/app/views/layouts/ci/build.html.haml @@ -0,0 +1,11 @@ +!!! 5 +%html{ lang: "en"} + = render 'layouts/head' + %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} + - header_title ci_commit_title(@commit) + - if current_user + = render "layouts/header/default", title: header_title + - else + = render "layouts/header/public", title: header_title + + = render 'layouts/ci/page', sidebar: 'nav_build' diff --git a/app/views/layouts/ci/commit.html.haml b/app/views/layouts/ci/commit.html.haml new file mode 100644 index 00000000000..5727f1b8e3e --- /dev/null +++ b/app/views/layouts/ci/commit.html.haml @@ -0,0 +1,11 @@ +!!! 5 +%html{ lang: "en"} + = render 'layouts/head' + %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} + - header_title ci_commit_title(@commit) + - if current_user + = render "layouts/header/default", title: header_title + - else + = render "layouts/header/public", title: header_title + + = render 'layouts/ci/page', sidebar: 'nav_commit' diff --git a/app/views/layouts/ci/project.html.haml b/app/views/layouts/ci/project.html.haml index 23a4928fcc7..15478c3f5bc 100644 --- a/app/views/layouts/ci/project.html.haml +++ b/app/views/layouts/ci/project.html.haml @@ -2,7 +2,7 @@ %html{ lang: "en"} = render 'layouts/head' %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} - - header_title = @project.name + - header_title @project.name, ci_project_path(@project) - if current_user = render "layouts/header/default", title: header_title - else |