summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-16 23:55:09 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-17 13:56:21 +0200
commitda6d9607d1b997de19af94f9ff1bf58610f7f4ff (patch)
treed6773587562e9438eb5f97512e5a54f031365bc0
parent591f2e1df245ed4f80b485f4c056e0730ed9ffb2 (diff)
downloadgitlab-ce-da6d9607d1b997de19af94f9ff1bf58610f7f4ff.tar.gz
Integrate CI navigation more tightly with project
-rw-r--r--app/views/layouts/ci/_nav_admin.html.haml4
-rw-r--r--app/views/layouts/ci/_nav_dashboard.html.haml24
-rw-r--r--app/views/layouts/ci/application.html.haml2
-rw-r--r--app/views/layouts/nav/_admin.html.haml7
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml12
-rw-r--r--app/views/layouts/nav/_project.html.haml7
6 files changed, 22 insertions, 34 deletions
diff --git a/app/views/layouts/ci/_nav_admin.html.haml b/app/views/layouts/ci/_nav_admin.html.haml
index c987ab876a3..d0ca4c421ef 100644
--- a/app/views/layouts/ci/_nav_admin.html.haml
+++ b/app/views/layouts/ci/_nav_admin.html.haml
@@ -1,9 +1,9 @@
%ul.nav.nav-sidebar
= nav_link do
- = link_to ci_root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
+ = link_to admin_root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
= icon('caret-square-o-left fw')
%span
- Back to Dashboard
+ Back to Admin
%li.separate-item
= nav_link path: 'projects#index' do
diff --git a/app/views/layouts/ci/_nav_dashboard.html.haml b/app/views/layouts/ci/_nav_dashboard.html.haml
deleted file mode 100644
index fcff405d19d..00000000000
--- a/app/views/layouts/ci/_nav_dashboard.html.haml
+++ /dev/null
@@ -1,24 +0,0 @@
-%ul.nav.nav-sidebar
- = nav_link do
- = link_to root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
- = icon('caret-square-o-left fw')
- %span
- Back to GitLab
- %li.separate-item
- = nav_link path: 'projects#index' do
- = link_to ci_root_path do
- %i.fa.fa-home
- %span
- Projects
- - if current_user && current_user.is_admin?
- %li
- = link_to ci_admin_projects_path do
- %i.fa.fa-cogs
- %span
- Admin
- %li
- = link_to ci_help_path do
- %i.fa.fa-info
- %span
- Help
-
diff --git a/app/views/layouts/ci/application.html.haml b/app/views/layouts/ci/application.html.haml
index b9f871d5447..9cc7fb85142 100644
--- a/app/views/layouts/ci/application.html.haml
+++ b/app/views/layouts/ci/application.html.haml
@@ -8,4 +8,4 @@
- else
= render "layouts/header/public", title: header_title
- = render 'layouts/ci/page', sidebar: 'nav_dashboard'
+ = render 'layouts/ci/page'
diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml
index 3fe0127041e..2079feeeab6 100644
--- a/app/views/layouts/nav/_admin.html.haml
+++ b/app/views/layouts/nav/_admin.html.haml
@@ -4,7 +4,7 @@
= icon('dashboard fw')
%span
Overview
- = nav_link(controller: :projects) do
+ = nav_link(controller: [:admin, :projects]) do
= link_to admin_namespaces_projects_path, title: 'Projects', data: {placement: 'right'} do
= icon('cube fw')
%span
@@ -24,6 +24,11 @@
= icon('key fw')
%span
Deploy Keys
+ = nav_link do
+ = link_to ci_admin_projects_path, title: 'Continuous Integration', data: {placement: 'right'} do
+ = icon('building fw')
+ %span
+ Continuous Integration
= nav_link(controller: :logs) do
= link_to admin_logs_path, title: 'Logs', data: {placement: 'right'} do
= icon('file-text fw')
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index 56283cba6bd..acb7b62f2a8 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -1,5 +1,5 @@
%ul.nav.nav-sidebar
- = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do
+ = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: {class: 'home'}) do
= link_to root_path, title: 'Projects', data: {placement: 'right'} do
= icon('home fw')
%span
@@ -31,6 +31,11 @@
%span
Merge Requests
%span.count= current_user.assigned_merge_requests.opened.count
+ = nav_link(controller: [:ci, :projects]) do
+ = link_to ci_root_path, title: 'Continuous Integration', data: {placement: 'right'} do
+ = icon('building fw')
+ %span
+ Continuous Integration
= nav_link(controller: :snippets) do
= link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do
= icon('clipboard fw')
@@ -46,8 +51,3 @@
= icon('user fw')
%span
Profile Settings
- = nav_link(controller: :ci) do
- = link_to ci_root_path, title: 'Continuous Integration', data: {placement: 'right'} do
- = icon('building fw')
- %span
- CI
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index 8ce46d4865b..a218ec7486c 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -76,6 +76,13 @@
Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
+ - if @project.gitlab_ci?
+ = nav_link(controller: [:ci, :project]) do
+ = link_to ci_project_path(@project.gitlab_ci_project), title: 'Continuous Integration', data: {placement: 'right'} do
+ = icon('building fw')
+ %span
+ Continuous Integration
+
- if project_nav_tab? :settings
= nav_link(controller: [:project_members, :teams]) do
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do