Commit 71e7d91c authored by Clement Ho's avatar Clement Ho

[skip ci] add multiple assignees to issues list

parent 013a3f6b
......@@ -93,3 +93,14 @@
align-self: center;
}
}
.avatar-counter {
background-color: $gray-darkest;
color: $white-light;
border: 1px solid $white-light;
border-radius: 1em;
font-family: $regular_font;
font-size: 9px;
line-height: 17px;
text-align: center;
}
......@@ -481,6 +481,15 @@
vertical-align: text-top;
}
}
.avatar-counter {
display: inline-block;
position: relative;
top: -0.2em;
height: 17px;
width: 17px;
line-height: 15px;
}
}
}
......
......@@ -116,6 +116,10 @@ module Issuable
def locking_enabled?
title_changed? || description_changed?
end
def assignees
[User.first, User.last, User.first, User.last, User.first, User.last, User.first, User.last, User.first, User.last, User.first, User.last, User.first, User.last]
end
end
module ClassMethods
......
......@@ -2,6 +2,7 @@ class IssuableEntity < Grape::Entity
expose :id
expose :iid
expose :assignee_id
expose :assignees, using: UserEntity
expose :author_id
expose :description
expose :lock_version
......
......@@ -15,7 +15,7 @@
- if issue.assignee
%li
= link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")
= render 'shared/issuable/assignees', project: @project, issue: issue
= render 'shared/issuable_meta_data', issuable: issue
......
- max_render = 3
- max = [max_render, issue.assignees.length].min
- issue.assignees.each_with_index do |assignee, index|
- if index < max
= link_to_member(@project, assignee, name: false, title: "Assigned to :name")
- if issue.assignees.length > max_render
- counter = issue.assignees.length - max_render
%span{ class:'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{counter} more assignees" } }
- if counter < 99
= "+#{counter}"
- else
99+
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