FIX: don't show Tags tab in group management if tags are disabled
This commit is contained in:
parent
8333872e88
commit
04be39ed46
|
@ -17,13 +17,19 @@ export default Controller.extend({
|
|||
route: "group.manage.categories",
|
||||
title: "groups.manage.categories.title",
|
||||
},
|
||||
{
|
||||
];
|
||||
|
||||
if (this.siteSettings.tagging_enabled) {
|
||||
defaultTabs.push({
|
||||
route: "group.manage.tags",
|
||||
title: "groups.manage.tags.title",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
{ route: "group.manage.logs", title: "groups.manage.logs.title" },
|
||||
];
|
||||
defaultTabs.push({
|
||||
route: "group.manage.logs",
|
||||
title: "groups.manage.logs.title",
|
||||
});
|
||||
|
||||
if (!automatic) {
|
||||
if (this.siteSettings.enable_imap && this.siteSettings.enable_smtp) {
|
||||
|
|
|
@ -100,6 +100,10 @@ class GroupShowSerializer < BasicGroupSerializer
|
|||
group_category_notifications[NotificationLevels.all[level]] || []
|
||||
end
|
||||
|
||||
define_method("include_#{level}_tags?") do
|
||||
SiteSetting.tagging_enabled?
|
||||
end
|
||||
|
||||
define_method("#{level}_tags") do
|
||||
group_tag_notifications[NotificationLevels.all[level]] || []
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue