diff --git a/public/src/admin/manage/group.js b/public/src/admin/manage/group.js
index 6300d5a225..cdda3ce5fc 100644
--- a/public/src/admin/manage/group.js
+++ b/public/src/admin/manage/group.js
@@ -88,6 +88,13 @@ define('admin/manage/group', [
});
});
+ $('[component="category/list"] [data-cid]').on('click', function () {
+ var cid = $(this).attr('data-cid');
+ if (cid) {
+ ajaxify.go('admin/manage/privileges/' + cid);
+ }
+ });
+
colorpicker.enable(changeGroupLabelColor, function (hsb, hex) {
groupLabelPreview.css('background-color', '#' + hex);
});
diff --git a/src/controllers/admin/groups.js b/src/controllers/admin/groups.js
index b17c4c23d5..fee25662b4 100644
--- a/src/controllers/admin/groups.js
+++ b/src/controllers/admin/groups.js
@@ -5,6 +5,7 @@ const validator = require('validator');
const db = require('../../database');
const user = require('../../user');
+const categories = require('../../categories');
const groups = require('../../groups');
const meta = require('../../meta');
const pagination = require('../../pagination');
@@ -50,12 +51,15 @@ groupsController.get = async function (req, res, next) {
};
});
+ const allCategories = await categories.buildForSelectAll();
+
res.render('admin/manage/group', {
group: group,
groupNames: groupNameData,
allowPrivateGroups: meta.config.allowPrivateGroups,
maximumGroupNameLength: meta.config.maximumGroupNameLength,
maximumGroupTitleLength: meta.config.maximumGroupTitleLength,
+ categories: allCategories,
});
};
diff --git a/src/views/admin/manage/group.tpl b/src/views/admin/manage/group.tpl
index cc0547a6e8..30196bab75 100644
--- a/src/views/admin/manage/group.tpl
+++ b/src/views/admin/manage/group.tpl
@@ -113,6 +113,11 @@
+
+