Commit 7c3343c1 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Unify app/views/shared/issuable/_sidebar.html.haml

parent 1f036cb7
......@@ -18,7 +18,9 @@
= render "shared/issuable/sidebar_todo", todo: todo, issuable: issuable, is_collapsed: true
.block.assignee
= render "shared/issuable/sidebar_assignees", issuable: issuable, can_edit_issuable: can_edit_issuable, signed_in: current_user.present?
= render_sidebar_epic(issuable)
= render_if_exists 'shared/issuable/sidebar_item_epic', issuable: issuable
.block.milestone
.sidebar-collapsed-icon.has-tooltip{ title: milestone_tooltip_title(issuable.milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
= icon('clock-o', 'aria-hidden': 'true')
......@@ -116,10 +118,7 @@
- if can? current_user, :admin_label, @project and @project
= render partial: "shared/issuable/label_page_create"
- if issuable.supports_weight?
.js-sidebar-weight-entry-point
= render 'shared/promotions/promote_issue_weights'
= render_if_exists 'shared/issuable/sidebar_weight', issuable: issuable
- if issuable.has_attribute?(:confidential)
-# haml-lint:disable InlineJavaScript
......
......@@ -9,13 +9,5 @@ module EE
weightNoneValue: ::Issue::WEIGHT_NONE
)
end
def render_sidebar_epic(issuable)
if issuable.project.feature_available?(:epics)
render 'shared/issuable/sidebar_item_epic', issuable: issuable
else
render 'shared/promotions/promote_epics'
end
end
end
end
- if issuable.is_a?(Issue)
.block.epic
#js-vue-sidebar-item-epic
.title.hide-collapsed
Epic
= icon('spinner spin')
- if issuable.project.feature_available?(:epics)
- if issuable.is_a?(Issue)
.block.epic
#js-vue-sidebar-item-epic
.title.hide-collapsed
Epic
= icon('spinner spin')
- else
= render 'shared/promotions/promote_epics'
- if local_assigns.fetch(:issuable).supports_weight?
.js-sidebar-weight-entry-point
= render 'shared/promotions/promote_issue_weights'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment