Pass in just assignees instead of issuable
This commit is contained in:
parent
9f9765485e
commit
ddb1d326e0
5 changed files with 16 additions and 7 deletions
|
@ -88,4 +88,6 @@
|
|||
%section.issuable-discussion
|
||||
= render 'projects/issues/discussion'
|
||||
|
||||
= render 'shared/issuable/sidebar', issuable: @issue, issuable_sidebar: @issuable_sidebar
|
||||
-# `assignees` is required for populating selected assignee values in the select box
|
||||
This is should be removed when sidebar is converted to Vue.
|
||||
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @issue.assignees
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
.merge-request-details.issuable-details
|
||||
= render "projects/merge_requests/mr_box"
|
||||
|
||||
-# `assignees` is required for populating selected assignee values in the select box and rendering the assignee link
|
||||
This is should be removed when sidebar is converted to Vue.
|
||||
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees
|
||||
|
||||
= render 'shared/issuable/sidebar', issuable: @merge_request, issuable_sidebar: @issuable_sidebar
|
||||
|
||||
#conflicts{ "v-cloak" => "true", data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json),
|
||||
|
|
|
@ -86,7 +86,9 @@
|
|||
.mr-loading-status
|
||||
= spinner
|
||||
|
||||
= render 'shared/issuable/sidebar', issuable: @merge_request, issuable_sidebar: @issuable_sidebar
|
||||
-# `assignees` is required for populating selected assignee values in the select box and rendering the assignee link
|
||||
This is should be removed when sidebar is converted to Vue.
|
||||
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees
|
||||
|
||||
- if @merge_request.can_be_reverted?(current_user)
|
||||
= render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit, title: @merge_request.title
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
.block.todo.hide-expanded
|
||||
= render "shared/issuable/sidebar_todo", issuable_sidebar: issuable_sidebar, is_collapsed: true
|
||||
.block.assignee.qa-assignee-block
|
||||
= render "shared/issuable/sidebar_assignees", issuable: issuable, issuable_sidebar: issuable_sidebar
|
||||
= render "shared/issuable/sidebar_assignees", issuable_sidebar: issuable_sidebar, assignees: assignees
|
||||
|
||||
= render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue