2017-12-16 10:01:02 -05:00
|
|
|
- max_render = 4
|
2019-04-07 14:35:16 -04:00
|
|
|
- assignees_rendering_overflow = issuable.assignees.size > max_render
|
2017-12-16 10:01:02 -05:00
|
|
|
- render_count = assignees_rendering_overflow ? max_render - 1 : max_render
|
2019-04-07 14:35:16 -04:00
|
|
|
- more_assignees_count = issuable.assignees.size - render_count
|
2017-05-04 08:11:15 -04:00
|
|
|
|
2019-04-07 14:35:16 -04:00
|
|
|
- issuable.assignees.take(render_count).each do |assignee| # rubocop: disable CodeReuse/ActiveRecord
|
2020-10-14 14:08:47 -04:00
|
|
|
= link_to_member(@project, assignee, name: false, title: _("Assigned to %{name}") % { name: assignee.name})
|
2017-05-04 08:11:15 -04:00
|
|
|
|
2020-07-30 14:09:39 -04:00
|
|
|
- if more_assignees_count > 0
|
2020-10-14 14:08:47 -04:00
|
|
|
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', qa_selector: 'avatar_counter_content' }, title: _("+%{more_assignees_count} more assignees") % { more_assignees_count: more_assignees_count} }
|
|
|
|
= _("+%{more_assignees_count}") % { more_assignees_count: more_assignees_count}
|