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

Style build dropdowns

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