2022-12-22 22:45:29 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module UserSidebarMixin
|
2023-07-23 20:07:37 -04:00
|
|
|
include NavigationMenuTagsMixin
|
2023-01-19 20:50:24 -05:00
|
|
|
|
2023-07-23 20:07:37 -04:00
|
|
|
def sidebar_tags
|
|
|
|
serialize_tags(object.visible_sidebar_tags(scope))
|
2022-12-22 22:45:29 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def display_sidebar_tags
|
|
|
|
DiscourseTagging.filter_visible(Tag, scope).exists?
|
|
|
|
end
|
|
|
|
|
|
|
|
def include_display_sidebar_tags?
|
|
|
|
include_sidebar_tags?
|
|
|
|
end
|
|
|
|
|
|
|
|
def include_sidebar_tags?
|
2023-10-08 19:24:10 -04:00
|
|
|
SiteSetting.tagging_enabled
|
2022-12-22 22:45:29 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def sidebar_category_ids
|
2023-07-26 22:52:33 -04:00
|
|
|
object.secured_sidebar_category_ids(scope)
|
2022-12-22 22:45:29 -05:00
|
|
|
end
|
|
|
|
end
|