Commit 16451a17 authored by Andrew Smith (EspadaV8)'s avatar Andrew Smith (EspadaV8) Committed by Rémy Coutable

Show issue weights on Milestone view lists

parent 9b6b7c28
......@@ -65,15 +65,32 @@ $status-box-line-height: 26px;
line-height: $line-height-base;
padding: 14px 16px;
display: flex;
justify-content: space-between;
.title {
flex: 1;
flex-grow: 2;
}
.counter {
flex: 0;
padding-left: 16px;
.issuable-count-weight {
white-space: nowrap;
.counter,
.weight {
color: var(--gray-500, $gray-500);
font-weight: $gl-font-weight-bold;
}
}
&.text-white {
.issuable-count-weight svg {
fill: $white;
}
.issuable-count-weight .counter,
.weight {
color: var(--white, $white);
}
}
}
}
......
......@@ -25,3 +25,5 @@
= link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, assignee_id: assignee.id, state: 'all' }),
class: 'has-tooltip', title: _("Assigned to %{assignee_name}") % { assignee_name: assignee.name }, data: { container: 'body' } do
- image_tag(avatar_icon_for_user(assignee, 16), class: "avatar s16", alt: '')
= render_if_exists "shared/milestones/issuable_weight", issuable: issuable
......@@ -4,11 +4,15 @@
.card
.card-header{ class: panel_class }
.title
= title
- if show_counter
.counter
= number_with_delimiter(issuables.length)
.header.gl-mb-2
.title
= title
.issuable-count-weight.gl-ml-3
- if show_counter
%span.counter
= sprite_icon('issues', css_class: 'gl-vertical-align-text-bottom')
= number_with_delimiter(issuables.length)
= render_if_exists "shared/milestones/issuables_weight", issuables: issuables
- class_prefix = dom_class(issuables).pluralize
%ul{ class: "content-list milestone-#{class_prefix}-list", id: "#{class_prefix}-list-#{id}" }
......
- issuable = local_assigns.fetch(:issuable)
- return unless issuable.weight_available?
- return unless issuable.weight?
%span.issuable-number
= sprite_icon('weight', css_class: 'gl-vertical-align-text-bottom')
= issuable.weight
- issuables = local_assigns.fetch(:issuables)
- issuables_with_weight = issuables.select(&:weight_available?).map(&:weight).compact
- return if issuables_with_weight.empty?
%span.weight.gl-ml-3
= sprite_icon('weight', css_class: 'gl-vertical-align-text-bottom')
= issuables_with_weight.sum
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