diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-01 17:51:23 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-17 11:18:53 -0500 |
commit | d3cd603b46f55c0048445578fbb6d4819bff8cd1 (patch) | |
tree | 3fc8337876d231c448be866cde4657bf154c4405 /app/views/projects/builds/show.html.haml | |
parent | 283c1dc3301a8583f21feac71aed2c4d6773ccd8 (diff) | |
download | gitlab-ce-d3cd603b46f55c0048445578fbb6d4819bff8cd1.tar.gz |
Hide dropdown if all tests fit on one line; add counter to dropdown
Diffstat (limited to 'app/views/projects/builds/show.html.haml')
-rw-r--r-- | app/views/projects/builds/show.html.haml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 8101d7a13da..f3718b3cb49 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -7,24 +7,24 @@ - builds = @build.pipeline.builds.latest.to_a - if builds.size > 1 + .dropdown.overflow-jobs-dropdown + %button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'} + %span.more-tests More + = icon('caret-down') + %ul.dropdown-menu.dropdown-menu-align-right.overflow-jobs + %li %ul.nav-links.no-top.no-bottom - statuses = ["failed", "pending", "running", "canceled", "skipped", "success"] - statuses.each do |build_status| - builds.select{|build| build.status == build_status}.each do |build| - %li{class: ('active' if build == @build) } - = link_to namespace_project_build_path(@project.namespace, @project, build), class: 'build-job' do + %li.build-job{class: ('active' if build == @build) } + = link_to namespace_project_build_path(@project.namespace, @project, build) do = ci_icon_for_status(build.status) %span - if build.name = build.name - else = build.id - .dropdown - %button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'} - %span Test Name - = icon('chevron-down') - %ul.dropdown-menu.overflow-jobs - %li - if @build.retried? %li.active |