diff options
Diffstat (limited to 'app/views/layouts/ci')
-rw-r--r-- | app/views/layouts/ci/_head.html.haml | 11 | ||||
-rw-r--r-- | app/views/layouts/ci/_info.html.haml | 9 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav.html.haml | 32 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav_admin.html.haml | 28 | ||||
-rw-r--r-- | app/views/layouts/ci/_nav_project.html.haml | 40 | ||||
-rw-r--r-- | app/views/layouts/ci/admin.html.haml | 17 | ||||
-rw-r--r-- | app/views/layouts/ci/application.html.haml | 13 | ||||
-rw-r--r-- | app/views/layouts/ci/empty.html.haml | 13 | ||||
-rw-r--r-- | app/views/layouts/ci/notify.html.haml | 19 | ||||
-rw-r--r-- | app/views/layouts/ci/project.html.haml | 26 |
10 files changed, 208 insertions, 0 deletions
diff --git a/app/views/layouts/ci/_head.html.haml b/app/views/layouts/ci/_head.html.haml new file mode 100644 index 00000000000..871752c9812 --- /dev/null +++ b/app/views/layouts/ci/_head.html.haml @@ -0,0 +1,11 @@ +%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/_info.html.haml b/app/views/layouts/ci/_info.html.haml new file mode 100644 index 00000000000..bce3ce77031 --- /dev/null +++ b/app/views/layouts/ci/_info.html.haml @@ -0,0 +1,9 @@ +.container + - if alert || notice + - if alert + .alert.alert-danger= alert + - if notice + .alert.alert-info= notice + + - if current_user && current_user.is_admin && Ci::Runner.count.zero? + = render 'ci/shared/no_runners' diff --git a/app/views/layouts/ci/_nav.html.haml b/app/views/layouts/ci/_nav.html.haml new file mode 100644 index 00000000000..4e944d4d0d6 --- /dev/null +++ b/app/views/layouts/ci/_nav.html.haml @@ -0,0 +1,32 @@ +.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-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 ci_user_sessions_path do + .profile-holder + = image_tag user_avatar_url(current_user, 64), class: 'avatar s32', alt: '' + %span= current_user.name + %li + = link_to ci_user_sessions_path, class: "logout", method: :delete do + %i.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 new file mode 100644 index 00000000000..792a5f1e4dd --- /dev/null +++ b/app/views/layouts/ci/_nav_admin.html.haml @@ -0,0 +1,28 @@ +%ul.nav.nav-pills.nav-stacked.admin-menu + = nav_link path: 'projects' do + = link_to ci_admin_projects_path do + %i.fa-list-alt + Projects + = nav_link path: 'events' do + = link_to ci_admin_events_path do + %i.fa-book + Events + = nav_link path: 'runners#index' do + = link_to ci_admin_runners_path do + %i.fa-cog + Runners + %small.pull-right + = Ci::Runner.count(:all) + = nav_link path: 'builds' do + = link_to ci_admin_builds_path do + %i.fa-link + 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-cogs + %span + Settings diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml new file mode 100644 index 00000000000..24ee1609d25 --- /dev/null +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -0,0 +1,40 @@ +%ul.nav.nav-pills.nav-stacked.project-menu + = nav_link path: 'projects#show' do + = link_to ci_project_path(@project) do + %i.fa-list-alt + Commits + %small.pull-right= @project.commits.count + = nav_link path: 'charts#show' do + = link_to ci_project_charts_path(@project) do + %i.fa-bar-chart + Charts + = nav_link path: ['runners#index', 'runners#show'] do + = link_to ci_project_runners_path(@project) do + %i.fa-cog + Runners + = nav_link path: 'variables#index' do + = link_to ci_project_variables_path(@project) do + %i.fa-code + Variables + = nav_link path: 'web_hooks#index' do + = link_to ci_project_web_hooks_path(@project) do + %i.fa-link + Web Hooks + = nav_link path: 'triggers#index' do + = link_to ci_project_triggers_path(@project) do + %i.fa-retweet + Triggers + = nav_link path: 'services#index' do + = link_to ci_project_services_path(@project) do + %i.fa-share + Services + = nav_link path: 'events#index' do + = link_to ci_project_events_path(@project) do + %i.fa-book + Events + %li + %hr + = nav_link path: 'projects#edit' do + = link_to edit_ci_project_path(@project) do + %i.fa-cogs + Settings diff --git a/app/views/layouts/ci/admin.html.haml b/app/views/layouts/ci/admin.html.haml new file mode 100644 index 00000000000..71b767cc4f1 --- /dev/null +++ b/app/views/layouts/ci/admin.html.haml @@ -0,0 +1,17 @@ +!!! 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 + + .container + .row + .col-md-2.append-bottom-20 + = render 'layouts/ci/nav_admin' + .col-md-10 + = yield diff --git a/app/views/layouts/ci/application.html.haml b/app/views/layouts/ci/application.html.haml new file mode 100644 index 00000000000..7306d378e44 --- /dev/null +++ b/app/views/layouts/ci/application.html.haml @@ -0,0 +1,13 @@ +!!! 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 + + .container.container-body + = yield diff --git a/app/views/layouts/ci/empty.html.haml b/app/views/layouts/ci/empty.html.haml new file mode 100644 index 00000000000..a36ebee7ef3 --- /dev/null +++ b/app/views/layouts/ci/empty.html.haml @@ -0,0 +1,13 @@ +!!! 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 + = yield + diff --git a/app/views/layouts/ci/notify.html.haml b/app/views/layouts/ci/notify.html.haml new file mode 100644 index 00000000000..270b206df5e --- /dev/null +++ b/app/views/layouts/ci/notify.html.haml @@ -0,0 +1,19 @@ +%html{lang: "en"} + %head + %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"} + %title + GitLab CI + + %body + = yield :header + + %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"} + %tr + %td{align: "left", style: "margin: 0; padding: 10px;"} + = yield + %br + %tr + %td{align: "left", style: "margin: 0; padding: 10px;"} + %p{style: "font-size:small;color:#777"} + - if @project + You're receiving this notification because you are the one who triggered a build on the #{@project.name} project. diff --git a/app/views/layouts/ci/project.html.haml b/app/views/layouts/ci/project.html.haml new file mode 100644 index 00000000000..d0c0861669d --- /dev/null +++ b/app/views/layouts/ci/project.html.haml @@ -0,0 +1,26 @@ +!!! 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-globe + Public + + .pull-right + = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' ) + %hr + .container + - if current_user && current_user.can_manage_project?(@project.gitlab_id) + .row + .col-md-2.append-bottom-20 + = render 'layouts/ci/nav_project' + .col-md-10 + = yield + - else + = yield |