diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-01 14:09:58 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-13 09:05:07 +0200 |
commit | 4fa6941020d414bcd6ef5b469340de6c940a2055 (patch) | |
tree | 10f394a075007a27470d7fd31c3857895498d619 | |
parent | 0c14eaa6de4ce1c44d98581714b9c99f4e3045be (diff) | |
download | gitlab-ce-4fa6941020d414bcd6ef5b469340de6c940a2055.tar.gz |
Improve code
-rw-r--r-- | app/views/admin/builds/_build.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/builds/index.html.haml | 2 | ||||
-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.haml | 2 | ||||
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 5 |
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 |