summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_sidebar_assignees.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/issuable/_sidebar_assignees.html.haml')
-rw-r--r--app/views/shared/issuable/_sidebar_assignees.html.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml
index 25e4f0dc14e..99dc58b582f 100644
--- a/app/views/shared/issuable/_sidebar_assignees.html.haml
+++ b/app/views/shared/issuable/_sidebar_assignees.html.haml
@@ -8,9 +8,10 @@
= _('Assignee')
= icon('spinner spin')
- else
+ - assignee = assignees.first
.sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body", boundary: 'viewport' }, title: (issuable_sidebar.dig(:assignee, :name) || _('Assignee')) }
- if issuable_sidebar[:assignee]
- = link_to_member(@project, issuable.assignee, size: 24)
+ = link_to_member(@project, assignee, size: 24)
- else
= icon('user', 'aria-hidden': 'true')
.title.hide-collapsed
@@ -23,7 +24,7 @@
= sidebar_gutter_toggle_icon
.value.hide-collapsed
- if issuable_sidebar[:assignee]
- = link_to_member(@project, issuable.assignee, size: 32, extra_class: 'bold') do
+ = link_to_member(@project, assignee, size: 32, extra_class: 'bold') do
- if issuable_sidebar[:can_merge]
%span.float-right.cannot-be-merged{ data: { toggle: 'tooltip', placement: 'left' }, title: _('Not allowed to merge') }
= icon('exclamation-triangle', 'aria-hidden': 'true')
@@ -38,10 +39,10 @@
= _('assign yourself')
.selectbox.hide-collapsed
- - if issuable.assignees.none?
+ - if assignees.none?
= hidden_field_tag "#{issuable_type}[assignee_ids][]", 0, id: nil
- else
- - issuable.assignees.each do |assignee|
+ - assignees.each do |assignee|
= hidden_field_tag "#{issuable_type}[assignee_ids][]", assignee.id, id: nil, data: { avatar_url: assignee.avatar_url, name: assignee.name, username: assignee.username }
- options = { toggle_class: 'js-user-search js-author-search',