diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-12 13:58:38 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-13 09:05:07 +0200 |
commit | 93742a439ab4492ef7a25cb9ddfd6ae004a1fc81 (patch) | |
tree | 773d1d5f10104dfa5897cea9f67884b787f4a9a7 /app/views/projects/builds/_table.html.haml | |
parent | d39e314cf5896ac06219446dc1ab8707f222d0d8 (diff) | |
download | gitlab-ce-93742a439ab4492ef7a25cb9ddfd6ae004a1fc81.tar.gz |
Code refactoring
Diffstat (limited to 'app/views/projects/builds/_table.html.haml')
-rw-r--r-- | app/views/projects/builds/_table.html.haml | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/views/projects/builds/_table.html.haml b/app/views/projects/builds/_table.html.haml index d77405b2b1f..61eff73da26 100644 --- a/app/views/projects/builds/_table.html.haml +++ b/app/views/projects/builds/_table.html.haml @@ -1,4 +1,4 @@ -- admin = false unless defined?(admin) +- admin = local_assigns.fetch(:admin, false) - if builds.blank? %li @@ -19,9 +19,6 @@ %th Coverage %th - - if admin - = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, stage: true, allow_retry: true, runner: true, coverage: true, admin: true } - - else - = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: {commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled? } + = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: admin || project.build_coverage_enabled?, admin: admin } = paginate builds, theme: 'gitlab' |