Commit 3693495e authored by Annabel Dunstone's avatar Annabel Dunstone

Style build dropdowns

parent 0b9cd0a1
......@@ -54,32 +54,19 @@
}
}
.nav-links {
.build-dropdown {
display: inline-block;
margin-top: 16px;
svg {
position: relative;
top: 2px;
margin-right: 3px;
height: 13px;
}
.build-job {
a {
color: $gl-text-color;
}
&.active {
a {
font-weight: bold;
}
}
}
}
.jobs-dropdown {
svg {
position: relative;
top: 2px;
margin-right: 3px;
.stage-item {
cursor: pointer;
}
}
}
......
......@@ -8,20 +8,20 @@
- builds = @build.pipeline.builds.latest.to_a
- statuses = ["failed", "pending", "running", "canceled", "skipped", "success"]
- if builds.size > 1
.dropdown.stage
.dropdown.build-dropdown
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
%span.stage-selection More
= icon('caret-down')
%ul.dropdown-menu.overflow-jobs
%ul.dropdown-menu
- builds.map(&:stage).uniq.each do |stage|
%li
%a.stage-item= stage
.dropdown.jobs-dropdown
.dropdown.build-dropdown
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
%span.build-selection More
= icon('caret-down')
%ul.dropdown-menu.overflow-jobs
%ul.dropdown-menu
- statuses.each do |build_status|
- builds.select{|build| build.status == build_status}.each do |build|
%li.build-job{class: ('active' if build == @build), data: {id: build.id, name: build.name, stage: build.stage}}
......
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