summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_assignees.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/issuable/_assignees.html.haml')
-rw-r--r--app/views/shared/issuable/_assignees.html.haml14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_assignees.html.haml b/app/views/shared/issuable/_assignees.html.haml
new file mode 100644
index 00000000000..217af7c9fac
--- /dev/null
+++ b/app/views/shared/issuable/_assignees.html.haml
@@ -0,0 +1,14 @@
+- max_render = 3
+- max = [max_render, issue.assignees.length].min
+
+- issue.assignees.take(max).each do |assignee|
+ = 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+