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
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-09-01 15:09:58 +0300
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-13 10:05:07 +0300
commit4fa6941020d414bcd6ef5b469340de6c940a2055 (patch)
tree10f394a075007a27470d7fd31c3857895498d619 /app
parent0c14eaa6de4ce1c44d98581714b9c99f4e3045be (diff)
Improve code
Diffstat (limited to 'app')
-rw-r--r--app/views/admin/builds/_build.html.haml4
-rw-r--r--app/views/admin/builds/index.html.haml2
-rw-r--r--app/views/projects/builds/_table.html.haml (renamed from app/views/projects/builds/_content_list.html.haml)8
-rw-r--r--app/views/projects/builds/index.html.haml2
-rw-r--r--app/views/projects/ci/builds/_build.html.haml5
5 files changed, 11 insertions, 10 deletions
diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml
index 3e868256366..2b6ad068c57 100644
--- a/app/views/admin/builds/_build.html.haml
+++ b/app/views/admin/builds/_build.html.haml
@@ -45,10 +45,10 @@
.light none
%td
- #{build.stage}
+ = build.stage
%td
- #{build.name}
+ = build.name
%td
- if build.duration
diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml
index 3715d368095..a86e054c8d4 100644
--- a/app/views/admin/builds/index.html.haml
+++ b/app/views/admin/builds/index.html.haml
@@ -15,4 +15,4 @@
#{(@scope || 'all').capitalize} builds
%ul.content-list.builds-content-list
- = render "projects/builds/content_list", builds: @builds, project: nil
+ = render "projects/builds/table", builds: @builds, project: nil, admin: true
diff --git a/app/views/projects/builds/_content_list.html.haml b/app/views/projects/builds/_table.html.haml
index b59599595dd..eecd1a1ee44 100644
--- a/app/views/projects/builds/_content_list.html.haml
+++ b/app/views/projects/builds/_table.html.haml
@@ -8,19 +8,19 @@
%tr
%th Status
%th Commit
- - if project.nil?
+ - if admin
%th Project
%th Runner
%th Stage
%th Name
%th
%th
- - if project.present?
- - if @project.build_coverage_enabled?
+ - unless admin
+ - if project.build_coverage_enabled?
%th Coverage
- - if project.nil?
+ - if admin
- builds.each do |build|
= render "admin/builds/build", build: build
- else
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index 1f1330b6b26..cbcaad9e6b7 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -20,4 +20,4 @@
%span CI Lint
%ul.content-list.builds-content-list
- = render "content_list", builds: @builds, project: @project
+ = render "table", builds: @builds, project: @project, admin: false
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 68c938d67d5..3ab64aff282 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -53,10 +53,11 @@
.light none
%td
- #{build.stage}
+ - if defined?(stage) && stage
+ = build.stage
%td
- #{build.name}
+ = build.name
%td
- if build.duration