gitlab-org--gitlab-foss/app/views/shared/issuable/_reviewers.html.haml

11 lines
784 B
Text

- max_render = 4
- reviewers_rendering_overflow = issuable.reviewers.size > max_render
- render_count = reviewers_rendering_overflow ? max_render - 1 : max_render
- more_reviewers_count = issuable.reviewers.size - render_count
- issuable.reviewers.take(render_count).each do |reviewer| # rubocop: disable CodeReuse/ActiveRecord
= link_to_member(@project, reviewer, name: false, title: _("Review requested from %{name}") % { name: reviewer.name})
- if more_reviewers_count > 0
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old' }, title: _("+%{more_reviewers_count} more reviewers") % { more_reviewers_count: more_reviewers_count} }
= _("+%{more_reviewers_count}") % { more_reviewers_count: more_reviewers_count}