ca884980ee
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
10 lines
653 B
Text
10 lines
653 B
Text
- max_render = 4
|
|
- assignees_rendering_overflow = issuable.assignees.size > max_render
|
|
- render_count = assignees_rendering_overflow ? max_render - 1 : max_render
|
|
- more_assignees_count = issuable.assignees.size - render_count
|
|
|
|
- issuable.assignees.take(render_count).each do |assignee| # rubocop: disable CodeReuse/ActiveRecord
|
|
= link_to_member(@project, assignee, name: false, title: "Assigned to :name")
|
|
|
|
- if more_assignees_count.positive?
|
|
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees" } } +#{more_assignees_count}
|