mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: column counts for other privileges
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user