mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
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",
|
route: "group.manage.categories",
|
||||||
title: "groups.manage.categories.title",
|
title: "groups.manage.categories.title",
|
||||||
},
|
},
|
||||||
{
|
];
|
||||||
|
|
||||||
|
if (this.siteSettings.tagging_enabled) {
|
||||||
|
defaultTabs.push({
|
||||||
route: "group.manage.tags",
|
route: "group.manage.tags",
|
||||||
title: "groups.manage.tags.title",
|
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 (!automatic) {
|
||||||
if (this.siteSettings.enable_imap && this.siteSettings.enable_smtp) {
|
if (this.siteSettings.enable_imap && this.siteSettings.enable_smtp) {
|
||||||
|
@ -100,6 +100,10 @@ class GroupShowSerializer < BasicGroupSerializer
|
|||||||
group_category_notifications[NotificationLevels.all[level]] || []
|
group_category_notifications[NotificationLevels.all[level]] || []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
define_method("include_#{level}_tags?") do
|
||||||
|
SiteSetting.tagging_enabled?
|
||||||
|
end
|
||||||
|
|
||||||
define_method("#{level}_tags") do
|
define_method("#{level}_tags") do
|
||||||
group_tag_notifications[NotificationLevels.all[level]] || []
|
group_tag_notifications[NotificationLevels.all[level]] || []
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user