feat: quick access dropdown on groups page to access privileges page

v1.18.x
psychobunny 5 years ago
parent 06143ca7d7
commit 2c83278f97

@ -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);
});

@ -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,
});
};

@ -113,6 +113,11 @@
<option value="{groupNames.encodedName}" <!-- IF groupNames.selected -->selected<!-- ENDIF groupNames.selected -->>{groupNames.displayName}</option>
<!-- END groupNames -->
</select>
<br />
<div class="well">
<strong class="pull-left">[[admin/manage/privileges:edit-privileges]]</strong><br />
<!-- IMPORT partials/category-selector.tpl -->
</div>
</div>
</form>
</div>

Loading…
Cancel
Save