Commit 4fa69410 authored by Katarzyna Kobierska's avatar Katarzyna Kobierska

Improve code

parent 0c14eaa6
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
.light none .light none
%td %td
#{build.stage} = build.stage
%td %td
#{build.name} = build.name
%td %td
- if build.duration - if build.duration
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
#{(@scope || 'all').capitalize} builds #{(@scope || 'all').capitalize} builds
%ul.content-list.builds-content-list %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
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
%tr %tr
%th Status %th Status
%th Commit %th Commit
- if project.nil? - if admin
%th Project %th Project
%th Runner %th Runner
%th Stage %th Stage
%th Name %th Name
%th %th
%th %th
- if project.present? - unless admin
- if @project.build_coverage_enabled? - if project.build_coverage_enabled?
%th Coverage %th Coverage
- if project.nil? - if admin
- builds.each do |build| - builds.each do |build|
= render "admin/builds/build", build: build = render "admin/builds/build", build: build
- else - else
......
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
%span CI Lint %span CI Lint
%ul.content-list.builds-content-list %ul.content-list.builds-content-list
= render "content_list", builds: @builds, project: @project = render "table", builds: @builds, project: @project, admin: false
...@@ -53,10 +53,11 @@ ...@@ -53,10 +53,11 @@
.light none .light none
%td %td
#{build.stage} - if defined?(stage) && stage
= build.stage
%td %td
#{build.name} = build.name
%td %td
- if build.duration - if build.duration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment