- if builds.blank?
  %li
    .nothing-here-block No builds to show
- else
  .table-holder
    %table.table.builds
      %thead
        %tr
          %th Status
          %th Commit
          - if admin
            %th Project
            %th Runner
          %th Stage
          %th Name
          %th
          %th
          - unless admin
            - if project.build_coverage_enabled?
              %th Coverage


      - if admin
        - builds.each do |build|
          = render "admin/builds/build", build: build
      - else
        = render builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled?

  = paginate builds, theme: 'gitlab'

- if builds.blank?
  %li
    .nothing-here-block No builds to show
- else
  .table-holder
    %table.table.builds
      %thead
        %tr
          %th Status
          %th Commit
          - if admin
            %th Project
            %th Runner
          %th Stage
          %th Name
          %th
          %th
            - unless admin
              - if project.build_coverage_enabled?
                Coverage
          %th


      - if admin
        - builds.each do |build|
          = render "admin/builds/build", build: build
      - else
        = render builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled?

  = paginate builds, theme: 'gitlab'

Improve code in table partial
Improve code in table partial
