diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-08-11 12:02:09 +0300 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-13 10:05:07 +0300 |
commit | 21976091175598b590f4f9306d812280ba9f4c28 (patch) | |
tree | 44e07d3a463a605657ef10a27f1e0304b6d74dcf /app | |
parent | e9dbcd8abef32884e1fa95a52e4a33d2046ef29a (diff) |
Move builds content list to partial
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/builds/index.html.haml | 21 | ||||
-rw-r--r-- | app/views/projects/builds/_content_list.html.haml | 43 | ||||
-rw-r--r-- | app/views/projects/builds/index.html.haml | 21 |
3 files changed, 45 insertions, 40 deletions
diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index eb189328ab8..3715d368095 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -15,23 +15,4 @@ #{(@scope || 'all').capitalize} builds %ul.content-list.builds-content-list - - if @builds.blank? - %li - .nothing-here-block No builds to show - - else - .table-holder - %table.table.builds - %thead - %tr - %th Status - %th Commit - %th Project - %th Runner - %th Name - %th - %th - - - @builds.each do |build| - = render "admin/builds/build", build: build - - = paginate @builds, theme: 'gitlab' + = render "projects/builds/content_list", builds: @builds, project: nil diff --git a/app/views/projects/builds/_content_list.html.haml b/app/views/projects/builds/_content_list.html.haml new file mode 100644 index 00000000000..93283edc2e1 --- /dev/null +++ b/app/views/projects/builds/_content_list.html.haml @@ -0,0 +1,43 @@ +- if project.nil? + - if builds.blank? + %li + .nothing-here-block No builds to show + - else + .table-holder + %table.table.builds + %thead + %tr + %th Status + %th Commit + %th Project + %th Runner + %th Name + %th + %th + + - builds.each do |build| + = render "admin/builds/build", build: build + + = paginate builds, theme: 'gitlab' + +- if project.present? + - if builds.blank? + %li + .nothing-here-block No builds to show + - else + .table-holder + %table.table.builds + %thead + %tr + %th Status + %th Commit + %th Stage + %th Name + %th + - if project.build_coverage_enabled? + %th Coverage + %th + + = render builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled? + + = paginate builds, theme: 'gitlab' diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 3f3895e19f0..1f1330b6b26 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -20,23 +20,4 @@ %span CI Lint %ul.content-list.builds-content-list - - if @builds.blank? - %li - .nothing-here-block No builds to show - - else - .table-holder - %table.table.builds - %thead - %tr - %th Status - %th Commit - %th Stage - %th Name - %th - - if @project.build_coverage_enabled? - %th Coverage - %th - - = render @builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: @project.build_coverage_enabled? - - = paginate @builds, theme: 'gitlab' + = render "content_list", builds: @builds, project: @project |