Node.js based forum software built for the modern web
fix: column counts for other privileges
Julian Lam2b9b2b4a255a
diff --git a/src/privileges/global.js b/src/privileges/global.jsindex 5d8a17431a..9fd4358364 100644--- a/src/privileges/global.js+++ b/src/privileges/global.js@@ -83,8 +83,9 @@ privsGlobal.list = async function () {});payload.keys = keys;- // This is a hack because I can't do {labels.users.length} to echo the count in templates.js- payload.columnCount = payload.labels.users.length + 3;+ payload.columnCountUserOther = keys.users.length - privsGlobal.userPrivilegeList.length;+ payload.columnCountGroupOther = keys.groups.length - privsGlobal.groupPrivilegeList.length;+return payload;};diff --git a/src/views/admin/partials/privileges/global.tpl b/src/views/admin/partials/privileges/global.tplindex e65a4990c5..99ffa7437e 100644--- a/src/views/admin/partials/privileges/global.tpl+++ b/src/views/admin/partials/privileges/global.tpl@@ -66,7 +66,7 @@{{{ if !isAdminPriv }}}<tr class="privilege-table-header"><th class="privilege-filters btn-toolbar" colspan="100">- <!-- IF privileges.columnCountGroupOther -->+ <!-- IF privileges.columnCountUserOther --><button type="button" data-filter="19,99" class="btn btn-default pull-right">[[admin/manage/categories:privileges.section-other]]</button><!-- END --><button type="button" data-filter="16,18" class="btn btn-default pull-right">[[admin/manage/categories:privileges.section-moderation]]</button>