Commit ef5abca1 authored by Rajat Jain's avatar Rajat Jain

Add Epics in issuable list when EE

Create a method in LabelsHelper which returns the correct
list of `issuable_types` to the view.
parent 65cfa455
......@@ -242,6 +242,10 @@ module LabelsHelper
klass.new(hash.slice(:color, :description, :title, :group_id, :project_id))
end
def issuable_types
['issues', 'merge requests']
end
# Required for Banzai::Filter::LabelReferenceFilter
module_function :render_colored_label, :text_color_for_bg, :escape_once, :label_tooltip_title
end
......
- @no_container = true
- page_title 'Labels'
- can_admin_label = can?(current_user, :admin_label, @group)
- issuables = ['issues', 'merge requests'] + (@group&.feature_available?(:epics) ? ['epics'] : [])
- search = params[:search]
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || search.present? || subscribed.present?
......@@ -13,7 +13,7 @@
.labels-container.prepend-top-5
- if @labels.any?
.text-muted
= _('Labels can be applied to %{features}. Group labels are available for any project within the group.') % { features: issuables.to_sentence }
= _('Labels can be applied to %{features}. Group labels are available for any project within the group.') % { features: issuable_types.to_sentence }
.other-labels
%h5= _('Labels')
%ul.content-list.manage-labels-list.js-other-labels
......
......@@ -43,6 +43,12 @@ module EE
})
end
def issuable_types
return super unless @group&.feature_available?(:epics)
super + ['epics']
end
module_function :scoped_label_wrapper, :scoped_labels_doc_link, :label_tooltip_title
end
end
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