Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-11 20:25:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-11 20:25:53 +0300
commit2b683807b52d4b7d156da31ed9e1f8aa20c248d9 (patch)
treebbe5226dbcab0b7ee352265c121720837115e727 /app/views
parente3c30bf2e84462810bd8eff941681682a7ce6dc7 (diff)
Use GitLab UI when render CI
Diffstat (limited to 'app/views')
-rw-r--r--app/views/ci/builds/show.html.haml2
-rw-r--r--app/views/ci/commits/show.html.haml4
-rw-r--r--app/views/ci/projects/show.html.haml5
-rw-r--r--app/views/layouts/ci/_head.html.haml11
-rw-r--r--app/views/layouts/ci/_nav.html.haml32
-rw-r--r--app/views/layouts/ci/_nav_admin.html.haml11
-rw-r--r--app/views/layouts/ci/_nav_dashboard.html.haml24
-rw-r--r--app/views/layouts/ci/_nav_project.html.haml34
-rw-r--r--app/views/layouts/ci/_page.html.haml26
-rw-r--r--app/views/layouts/ci/admin.html.haml23
-rw-r--r--app/views/layouts/ci/application.html.haml19
-rw-r--r--app/views/layouts/ci/empty.html.haml14
-rw-r--r--app/views/layouts/ci/project.html.haml32
13 files changed, 109 insertions, 128 deletions
diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml
index db8926e30d3..1a07feeb20e 100644
--- a/app/views/ci/builds/show.html.haml
+++ b/app/views/ci/builds/show.html.haml
@@ -1,5 +1,5 @@
%h4.page-title
- = link_to ci_project_path(@project)
+ = link_to @project.name, ci_project_path(@project)
@
= @commit.short_sha
diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml
index 9b597b45aa5..72fda8fe949 100644
--- a/app/views/ci/commits/show.html.haml
+++ b/app/views/ci/commits/show.html.haml
@@ -63,7 +63,7 @@
%i.fa.fa-time
#{time_interval_in_words @commit.duration}
-%table.builds
+%table.table.builds
%thead
%tr
%th Status
@@ -81,7 +81,7 @@
%h3
Retried builds
- %table.builds
+ %table.table.builds
%thead
%tr
%th Status
diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml
index b79ab957ba8..6443378af99 100644
--- a/app/views/ci/projects/show.html.haml
+++ b/app/views/ci/projects/show.html.haml
@@ -16,7 +16,8 @@
%li{class: 'active'}
= link_to @ref, ci_project_path(@project, ref: @ref)
-
+ %li.pull-right
+ = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' )
- if @ref
%p
@@ -37,7 +38,7 @@
-%table.builds
+%table.table.builds
%thead
%tr
%th Status
diff --git a/app/views/layouts/ci/_head.html.haml b/app/views/layouts/ci/_head.html.haml
deleted file mode 100644
index 871752c9812..00000000000
--- a/app/views/layouts/ci/_head.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-%head
- %meta{charset: "utf-8"}
- %meta{content: "GitLab Continuous Integration", name: "description"}
- %title GitLab CI
- = stylesheet_link_tag "ci/application", :media => "all"
- = javascript_include_tag "ci/application"
- = csrf_meta_tags
- = favicon_link_tag 'ci/favicon.ico'
- :erb
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
diff --git a/app/views/layouts/ci/_nav.html.haml b/app/views/layouts/ci/_nav.html.haml
deleted file mode 100644
index 3d2c7ce06da..00000000000
--- a/app/views/layouts/ci/_nav.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-.navbar.navbar-static-top.navbar-ci
- .container
- .navbar-header
- %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
- %span.sr-only Toggle navigation
- %i.fa.fa-reorder
-
- = link_to 'GitLab CI', ci_root_path, class: "navbar-brand"
-
- .collapse.navbar-collapse
- %ul.nav.navbar-nav
- - if current_user && current_user.is_admin?
- %li
- = link_to ci_admin_projects_path do
- Admin
- %li
- = link_to 'Help', ci_help_path
-
- %ul.nav.navbar-nav.pull-right
- - if current_user
- %li
- = link_to "/profile", no_turbolink do
- .profile-holder
- = image_tag user_avatar_url(current_user, 64), class: 'avatar s32', alt: ''
- %span= current_user.name
- %li
- = link_to destroy_user_session_path, class: "logout", method: :delete do
- %i.fa.fa-signout
- Logout
- - else
- %li
- = link_to "Login with GitLab", auth_ci_user_sessions_path, no_turbolink.merge(class: 'btn btn-success btn-login')
diff --git a/app/views/layouts/ci/_nav_admin.html.haml b/app/views/layouts/ci/_nav_admin.html.haml
index 26eaf4db0e5..7d65405740c 100644
--- a/app/views/layouts/ci/_nav_admin.html.haml
+++ b/app/views/layouts/ci/_nav_admin.html.haml
@@ -1,4 +1,11 @@
-%ul.nav.nav-pills.nav-stacked.admin-menu
+%ul.nav.nav-sidebar
+ = nav_link do
+ = link_to ci_root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
+ = icon('caret-square-o-left fw')
+ %span
+ Back to Dashboard
+
+ %li.separate-item
= nav_link path: 'projects#index' do
= link_to ci_admin_projects_path do
%i.fa.fa-list-alt
@@ -19,8 +26,6 @@
Builds
%small.pull-right
= Ci::Build.count(:all)
- %li
- %hr
= nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
= link_to ci_admin_application_settings_path do
%i.fa.fa-cogs
diff --git a/app/views/layouts/ci/_nav_dashboard.html.haml b/app/views/layouts/ci/_nav_dashboard.html.haml
new file mode 100644
index 00000000000..202d73d1713
--- /dev/null
+++ b/app/views/layouts/ci/_nav_dashboard.html.haml
@@ -0,0 +1,24 @@
+%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#show' 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/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml
index d5b66b92fe8..9cef47eb4f7 100644
--- a/app/views/layouts/ci/_nav_project.html.haml
+++ b/app/views/layouts/ci/_nav_project.html.haml
@@ -1,40 +1,48 @@
-%ul.nav.nav-pills.nav-stacked.project-menu
+%ul.nav.nav-sidebar
= nav_link path: 'projects#show' do
= link_to ci_project_path(@project) do
%i.fa.fa-list-alt
- Commits
- %small.pull-right= @project.commits.count
+ %span
+ Commits
+ %small.pull-right= @project.commits.count
= nav_link path: 'charts#show' do
= link_to ci_project_charts_path(@project) do
%i.fa.fa-bar-chart
- Charts
+ %span
+ Charts
= nav_link path: ['runners#index', 'runners#show'] do
= link_to ci_project_runners_path(@project) do
%i.fa.fa-cog
- Runners
+ %span
+ Runners
= nav_link path: 'variables#show' do
= link_to ci_project_variables_path(@project) do
%i.fa.fa-code
- Variables
+ %span
+ Variables
= nav_link path: 'web_hooks#index' do
= link_to ci_project_web_hooks_path(@project) do
%i.fa.fa-link
- Web Hooks
+ %span
+ Web Hooks
= nav_link path: 'triggers#index' do
= link_to ci_project_triggers_path(@project) do
%i.fa.fa-retweet
- Triggers
+ %span
+ Triggers
= nav_link path: 'services#index' do
= link_to ci_project_services_path(@project) do
%i.fa.fa-share
- Services
+ %span
+ Services
= nav_link path: 'events#index' do
= link_to ci_project_events_path(@project) do
%i.fa.fa-book
- Events
- %li
- %hr
+ %span
+ Events
+ %li.separate-item
= nav_link path: 'projects#edit' do
= link_to edit_ci_project_path(@project) do
%i.fa.fa-cogs
- Settings
+ %span
+ Settings
diff --git a/app/views/layouts/ci/_page.html.haml b/app/views/layouts/ci/_page.html.haml
new file mode 100644
index 00000000000..c598f63c4c8
--- /dev/null
+++ b/app/views/layouts/ci/_page.html.haml
@@ -0,0 +1,26 @@
+.page-with-sidebar{ class: nav_sidebar_class }
+ = render "layouts/broadcast"
+ .sidebar-wrapper.nicescroll
+ .header-logo
+ = link_to ci_root_path, class: 'home', title: 'Dashboard', id: 'js-shortcuts-home', data: {toggle: 'tooltip', placement: 'bottom'} do
+ = brand_header_logo
+ .gitlab-text-container
+ %h3 GitLab CI
+ - if defined?(sidebar) && sidebar
+ = render "layouts/ci/#{sidebar}"
+ - elsif current_user
+ = render 'layouts/nav/dashboard'
+ .collapse-nav
+ = render partial: 'layouts/collapse_button'
+ - if current_user
+ = link_to current_user, class: 'sidebar-user' do
+ = image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s36'
+ .username
+ = current_user.username
+ .content-wrapper
+ = render "layouts/flash"
+ = render 'layouts/ci/info'
+ %div{ class: container_class }
+ .content
+ .clearfix
+ = yield
diff --git a/app/views/layouts/ci/admin.html.haml b/app/views/layouts/ci/admin.html.haml
index cd160a54455..c8cb185d28c 100644
--- a/app/views/layouts/ci/admin.html.haml
+++ b/app/views/layouts/ci/admin.html.haml
@@ -1,18 +1,11 @@
!!! 5
%html{ lang: "en"}
- = render 'layouts/ci/head'
- %body{ :'data-page' => body_data_page }
- = render 'layouts/ci/nav'
- = render 'layouts/ci/info'
- - if content_for?(:title)
- .container.container-title
- = yield(:title)
- %hr
+ = render 'layouts/head'
+ %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
+ - header_title = "Admin area"
+ - if current_user
+ = render "layouts/header/default", title: header_title
+ - else
+ = render "layouts/header/public", title: header_title
- .container.container-body
- .content
- .row
- .col-md-2.append-bottom-20
- = render 'layouts/ci/nav_admin'
- .col-md-10
- = yield
+ = render 'layouts/ci/page', sidebar: 'nav_admin'
diff --git a/app/views/layouts/ci/application.html.haml b/app/views/layouts/ci/application.html.haml
index 8990ffbffe6..7fb1a0097b2 100644
--- a/app/views/layouts/ci/application.html.haml
+++ b/app/views/layouts/ci/application.html.haml
@@ -1,14 +1,11 @@
!!! 5
%html{ lang: "en"}
- = render 'layouts/ci/head'
- %body{ :'data-page' => body_data_page }
- = render 'layouts/ci/nav'
- = render 'layouts/ci/info'
- - if content_for?(:title)
- .container.container-title
- = yield(:title)
- %hr
+ = render 'layouts/head'
+ %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
+ - header_title = "Projects"
+ - if current_user
+ = render "layouts/header/default", title: header_title
+ - else
+ = render "layouts/header/public", title: header_title
- .container.container-body
- .content
- = yield
+ = render 'layouts/ci/page', sidebar: 'nav_dashboard'
diff --git a/app/views/layouts/ci/empty.html.haml b/app/views/layouts/ci/empty.html.haml
deleted file mode 100644
index bda574c0ed1..00000000000
--- a/app/views/layouts/ci/empty.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-!!! 5
-%html{ lang: "en"}
- = render 'layouts/ci/head'
- %body{ :'data-page' => body_data_page }
- = render 'layouts/ci/info'
- - if content_for?(:title)
- .container.container-title
- = yield(:title)
- %hr
-
- .container.container-body
- .content
- = yield
-
diff --git a/app/views/layouts/ci/project.html.haml b/app/views/layouts/ci/project.html.haml
index 88c21211a57..23a4928fcc7 100644
--- a/app/views/layouts/ci/project.html.haml
+++ b/app/views/layouts/ci/project.html.haml
@@ -1,27 +1,11 @@
!!! 5
%html{ lang: "en"}
- = render 'layouts/ci/head'
- %body{ :'data-page' => body_data_page }
- = render 'layouts/ci/nav'
- = render 'layouts/ci/info'
- .container
- %h3.project-title
- = @project.name
- - if @project.public
- %small
- %i.fa.fa-globe
- Public
+ = render 'layouts/head'
+ %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
+ - header_title = @project.name
+ - if current_user
+ = render "layouts/header/default", title: header_title
+ - else
+ = render "layouts/header/public", title: header_title
- .pull-right
- = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' )
- %hr
- .container.container-body
- .content
- - if current_user && can?(current_user, :admin_project, gl_project)
- .row
- .col-md-2.append-bottom-20
- = render 'layouts/ci/nav_project'
- .col-md-10
- = yield
- - else
- = yield
+ = render 'layouts/ci/page', sidebar: 'nav_project'