mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7298 privilege header misalignment
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
"privileges.section-viewing": "Viewing Privileges",
|
"privileges.section-viewing": "Viewing Privileges",
|
||||||
"privileges.section-posting": "Posting Privileges",
|
"privileges.section-posting": "Posting Privileges",
|
||||||
"privileges.section-moderation": "Moderation Privileges",
|
"privileges.section-moderation": "Moderation Privileges",
|
||||||
|
"privileges.section-other": "Other",
|
||||||
"privileges.section-user": "User",
|
"privileges.section-user": "User",
|
||||||
"privileges.search-user": "Add User",
|
"privileges.search-user": "Add User",
|
||||||
"privileges.no-users": "No user-specific privileges in this category.",
|
"privileges.no-users": "No user-specific privileges in this category.",
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ module.exports = function (privileges) {
|
|||||||
},
|
},
|
||||||
function (payload, next) {
|
function (payload, next) {
|
||||||
// This is a hack because I can't do {labels.users.length} to echo the count in templates.js
|
// 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 + 2;
|
payload.columnCountUser = payload.labels.users.length + 2;
|
||||||
|
payload.columnCountUserOther = payload.labels.users.length - privileges.privilegeLabels.length;
|
||||||
|
payload.columnCountGroup = payload.labels.groups.length + 2;
|
||||||
|
payload.columnCountGroupOther = payload.labels.groups.length - privileges.privilegeLabels.length;
|
||||||
next(null, payload);
|
next(null, payload);
|
||||||
},
|
},
|
||||||
], callback);
|
], callback);
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
<th class="arrowed" colspan="3">
|
<th class="arrowed" colspan="3">
|
||||||
[[admin/manage/categories:privileges.section-moderation]]
|
[[admin/manage/categories:privileges.section-moderation]]
|
||||||
</th>
|
</th>
|
||||||
|
<!-- IF privileges.columnCountUserOther -->
|
||||||
|
<th class="arrowed" colspan="{privileges.columnCountUserOther}">
|
||||||
|
[[admin/manage/categories:privileges.section-other]]
|
||||||
|
</th>
|
||||||
|
<!-- END -->
|
||||||
</tr><tr><!-- zebrastripe reset --></tr>
|
</tr><tr><!-- zebrastripe reset --></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
|
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
|
||||||
@@ -35,7 +40,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END privileges.users -->
|
<!-- END privileges.users -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="{privileges.columnCount}">
|
<td colspan="{privileges.columnCountUser}">
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
||||||
[[admin/manage/categories:privileges.search-user]]
|
[[admin/manage/categories:privileges.search-user]]
|
||||||
</button>
|
</button>
|
||||||
@@ -43,7 +48,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="{privileges.columnCount}">
|
<td colspan="{privileges.columnCountUser}">
|
||||||
[[admin/manage/categories:privileges.no-users]]
|
[[admin/manage/categories:privileges.no-users]]
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
||||||
[[admin/manage/categories:privileges.search-user]]
|
[[admin/manage/categories:privileges.search-user]]
|
||||||
@@ -67,6 +72,11 @@
|
|||||||
<th class="arrowed" colspan="3">
|
<th class="arrowed" colspan="3">
|
||||||
[[admin/manage/categories:privileges.section-moderation]]
|
[[admin/manage/categories:privileges.section-moderation]]
|
||||||
</th>
|
</th>
|
||||||
|
<!-- IF privileges.columnCountGroupOther -->
|
||||||
|
<th class="arrowed" colspan="{privileges.columnCountGroupOther}">
|
||||||
|
[[admin/manage/categories:privileges.section-other]]
|
||||||
|
</th>
|
||||||
|
<!-- END -->
|
||||||
</tr><tr><!-- zebrastripe reset --></tr>
|
</tr><tr><!-- zebrastripe reset --></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
|
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
|
||||||
@@ -89,7 +99,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END privileges.groups -->
|
<!-- END privileges.groups -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="{privileges.columnCount}">
|
<td colspan="{privileges.columnCountGroup}">
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group">
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group">
|
||||||
[[admin/manage/categories:privileges.search-group]]
|
[[admin/manage/categories:privileges.search-group]]
|
||||||
|
|||||||
Reference in New Issue
Block a user