gitlab-org--gitlab-foss/app/views/shared/issuable/_assignees.html.haml
Jacopo cc75946592 List of avatars should never show +1
The list of avatars should never show +1. If you have +1, that means you can use that space to show that person's avatar,
for that reason should always start with +2.
2017-12-18 11:48:38 +01:00

10 lines
602 B
Text

- max_render = 4
- assignees_rendering_overflow = issue.assignees.size > max_render
- render_count = assignees_rendering_overflow ? max_render - 1 : max_render
- more_assignees_count = issue.assignees.size - render_count
- issue.assignees.take(render_count).each do |assignee|
= 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}