mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: move group privs above user, add labels
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"global": "Global",
|
"global": "Global",
|
||||||
"global.no-users": "No user-specific global privileges.",
|
"global.no-users": "No user-specific global privileges.",
|
||||||
|
"group-privileges": "Group Privileges",
|
||||||
|
"user-privileges": "User Privileges",
|
||||||
"chat": "Chat",
|
"chat": "Chat",
|
||||||
"upload-images": "Upload Images",
|
"upload-images": "Upload Images",
|
||||||
"upload-files": "Upload Files",
|
"upload-files": "Upload Files",
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
<!-- IMPORT partials/category-selector.tpl -->
|
<!-- IMPORT partials/category-selector.tpl -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div class="privilege-table-container">
|
<div class="privilege-table-container">
|
||||||
<!-- IF cid -->
|
<!-- IF cid -->
|
||||||
<!-- IMPORT admin/partials/categories/privileges.tpl -->
|
<!-- IMPORT admin/partials/categories/privileges.tpl -->
|
||||||
|
|||||||
@@ -1,64 +1,4 @@
|
|||||||
<table class="table table-striped privilege-table">
|
<label>[[admin/manage/privileges:group-privileges]]</label>
|
||||||
<thead>
|
|
||||||
<tr class="privilege-table-header">
|
|
||||||
<th colspan="2"></th>
|
|
||||||
<th class="arrowed" colspan="3">
|
|
||||||
[[admin/manage/categories:privileges.section-viewing]]
|
|
||||||
</th>
|
|
||||||
<th class="arrowed" colspan="9">
|
|
||||||
[[admin/manage/categories:privileges.section-posting]]
|
|
||||||
</th>
|
|
||||||
<th class="arrowed" colspan="3">
|
|
||||||
[[admin/manage/categories:privileges.section-moderation]]
|
|
||||||
</th>
|
|
||||||
<!-- IF privileges.columnCountUserOther -->
|
|
||||||
<th class="arrowed" colspan="{privileges.columnCountUserOther}">
|
|
||||||
[[admin/manage/categories:privileges.section-other]]
|
|
||||||
</th>
|
|
||||||
<!-- END -->
|
|
||||||
</tr><tr><!-- zebrastripe reset --></tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
|
|
||||||
<!-- BEGIN privileges.labels.users -->
|
|
||||||
<th class="text-center">{privileges.labels.users.name}</th>
|
|
||||||
<!-- END privileges.labels.users -->
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<!-- IF privileges.users.length -->
|
|
||||||
<!-- BEGIN privileges.users -->
|
|
||||||
<tr data-uid="{privileges.users.uid}">
|
|
||||||
<td>
|
|
||||||
<!-- IF ../picture -->
|
|
||||||
<img class="avatar avatar-sm" src="{privileges.users.picture}" title="{privileges.users.username}" />
|
|
||||||
<!-- ELSE -->
|
|
||||||
<div class="avatar avatar-sm" style="background-color: {../icon:bgColor};">{../icon:text}</div>
|
|
||||||
<!-- ENDIF ../picture -->
|
|
||||||
</td>
|
|
||||||
<td>{privileges.users.username}</td>
|
|
||||||
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
|
|
||||||
</tr>
|
|
||||||
<!-- END privileges.users -->
|
|
||||||
<tr>
|
|
||||||
<td colspan="{privileges.columnCountUser}">
|
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
|
||||||
[[admin/manage/categories:privileges.search-user]]
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ELSE -->
|
|
||||||
<tr>
|
|
||||||
<td colspan="{privileges.columnCountUser}">
|
|
||||||
[[admin/manage/categories:privileges.no-users]]
|
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
|
||||||
[[admin/manage/categories:privileges.search-user]]
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF privileges.users.length -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table class="table table-striped privilege-table">
|
<table class="table table-striped privilege-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="privilege-table-header">
|
<tr class="privilege-table-header">
|
||||||
@@ -132,3 +72,65 @@
|
|||||||
<div class="help-block">
|
<div class="help-block">
|
||||||
[[admin/manage/categories:privileges.inherit]]
|
[[admin/manage/categories:privileges.inherit]]
|
||||||
</div>
|
</div>
|
||||||
|
<hr/>
|
||||||
|
<label>[[admin/manage/privileges:user-privileges]]</label>
|
||||||
|
<table class="table table-striped privilege-table">
|
||||||
|
<thead>
|
||||||
|
<tr class="privilege-table-header">
|
||||||
|
<th colspan="2"></th>
|
||||||
|
<th class="arrowed" colspan="3">
|
||||||
|
[[admin/manage/categories:privileges.section-viewing]]
|
||||||
|
</th>
|
||||||
|
<th class="arrowed" colspan="9">
|
||||||
|
[[admin/manage/categories:privileges.section-posting]]
|
||||||
|
</th>
|
||||||
|
<th class="arrowed" colspan="3">
|
||||||
|
[[admin/manage/categories:privileges.section-moderation]]
|
||||||
|
</th>
|
||||||
|
<!-- IF privileges.columnCountUserOther -->
|
||||||
|
<th class="arrowed" colspan="{privileges.columnCountUserOther}">
|
||||||
|
[[admin/manage/categories:privileges.section-other]]
|
||||||
|
</th>
|
||||||
|
<!-- END -->
|
||||||
|
</tr><tr><!-- zebrastripe reset --></tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
|
||||||
|
<!-- BEGIN privileges.labels.users -->
|
||||||
|
<th class="text-center">{privileges.labels.users.name}</th>
|
||||||
|
<!-- END privileges.labels.users -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- IF privileges.users.length -->
|
||||||
|
<!-- BEGIN privileges.users -->
|
||||||
|
<tr data-uid="{privileges.users.uid}">
|
||||||
|
<td>
|
||||||
|
<!-- IF ../picture -->
|
||||||
|
<img class="avatar avatar-sm" src="{privileges.users.picture}" title="{privileges.users.username}" />
|
||||||
|
<!-- ELSE -->
|
||||||
|
<div class="avatar avatar-sm" style="background-color: {../icon:bgColor};">{../icon:text}</div>
|
||||||
|
<!-- ENDIF ../picture -->
|
||||||
|
</td>
|
||||||
|
<td>{privileges.users.username}</td>
|
||||||
|
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
|
||||||
|
</tr>
|
||||||
|
<!-- END privileges.users -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="{privileges.columnCountUser}">
|
||||||
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
||||||
|
[[admin/manage/categories:privileges.search-user]]
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ELSE -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="{privileges.columnCountUser}">
|
||||||
|
[[admin/manage/categories:privileges.no-users]]
|
||||||
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">
|
||||||
|
[[admin/manage/categories:privileges.search-user]]
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF privileges.users.length -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|||||||
@@ -1,7 +1,49 @@
|
|||||||
|
<label>[[admin/manage/privileges:group-privileges]]</label>
|
||||||
<table class="table table-striped privilege-table">
|
<table class="table table-striped privilege-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="privilege-table-header">
|
<tr class="privilege-table-header">
|
||||||
<th colspan="3"></th>
|
<th colspan="15"></th>
|
||||||
|
</tr><tr><!-- zebrastripe reset --></tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
|
||||||
|
<!-- BEGIN privileges.labels.groups -->
|
||||||
|
<th class="text-center">{privileges.labels.groups.name}</th>
|
||||||
|
<!-- END privileges.labels.groups -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- BEGIN privileges.groups -->
|
||||||
|
<tr data-group-name="{privileges.groups.name}" data-private="<!-- IF privileges.groups.isPrivate -->1<!-- ELSE -->0<!-- ENDIF privileges.groups.isPrivate -->">
|
||||||
|
<td>
|
||||||
|
<!-- IF privileges.groups.isPrivate -->
|
||||||
|
<i class="fa fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
|
||||||
|
<!-- ENDIF privileges.groups.isPrivate -->
|
||||||
|
{privileges.groups.name}
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
|
||||||
|
</tr>
|
||||||
|
<!-- END privileges.groups -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="{privileges.columnCount}">
|
||||||
|
<div class="btn-toolbar">
|
||||||
|
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group">
|
||||||
|
[[admin/manage/categories:privileges.search-group]]
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="help-block">
|
||||||
|
[[admin/manage/categories:privileges.inherit]]
|
||||||
|
</div>
|
||||||
|
<hr/>
|
||||||
|
<label>[[admin/manage/privileges:user-privileges]]</label>
|
||||||
|
<table class="table table-striped privilege-table">
|
||||||
|
<thead>
|
||||||
|
<tr class="privilege-table-header">
|
||||||
|
<th colspan="15"></th>
|
||||||
</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>
|
||||||
@@ -44,43 +86,3 @@
|
|||||||
<!-- ENDIF privileges.users.length -->
|
<!-- ENDIF privileges.users.length -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table class="table table-striped privilege-table">
|
|
||||||
<thead>
|
|
||||||
<tr class="privilege-table-header">
|
|
||||||
<th colspan="3"></th>
|
|
||||||
</tr><tr><!-- zebrastripe reset --></tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
|
|
||||||
<!-- BEGIN privileges.labels.groups -->
|
|
||||||
<th class="text-center">{privileges.labels.groups.name}</th>
|
|
||||||
<!-- END privileges.labels.groups -->
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<!-- BEGIN privileges.groups -->
|
|
||||||
<tr data-group-name="{privileges.groups.name}" data-private="<!-- IF privileges.groups.isPrivate -->1<!-- ELSE -->0<!-- ENDIF privileges.groups.isPrivate -->">
|
|
||||||
<td>
|
|
||||||
<!-- IF privileges.groups.isPrivate -->
|
|
||||||
<i class="fa fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
|
|
||||||
<!-- ENDIF privileges.groups.isPrivate -->
|
|
||||||
{privileges.groups.name}
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
|
|
||||||
</tr>
|
|
||||||
<!-- END privileges.groups -->
|
|
||||||
<tr>
|
|
||||||
<td colspan="{privileges.columnCount}">
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
<button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group">
|
|
||||||
[[admin/manage/categories:privileges.search-group]]
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="help-block">
|
|
||||||
[[admin/manage/categories:privileges.inherit]]
|
|
||||||
</div>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user