diff --git a/public/language/en-GB/admin/manage/privileges.json b/public/language/en-GB/admin/manage/privileges.json index 5e6d451b67..ca4ad9fc36 100644 --- a/public/language/en-GB/admin/manage/privileges.json +++ b/public/language/en-GB/admin/manage/privileges.json @@ -1,7 +1,8 @@ { "global": "Global", "global.no-users": "No user-specific global privileges.", - + "group-privileges": "Group Privileges", + "user-privileges": "User Privileges", "chat": "Chat", "upload-images": "Upload Images", "upload-files": "Upload Files", diff --git a/src/views/admin/manage/privileges.tpl b/src/views/admin/manage/privileges.tpl index a4bc0a8997..527dd86607 100644 --- a/src/views/admin/manage/privileges.tpl +++ b/src/views/admin/manage/privileges.tpl @@ -10,8 +10,6 @@ <!-- IMPORT partials/category-selector.tpl --> </div> - <hr /> - <div class="privilege-table-container"> <!-- IF cid --> <!-- IMPORT admin/partials/categories/privileges.tpl --> diff --git a/src/views/admin/partials/categories/privileges.tpl b/src/views/admin/partials/categories/privileges.tpl index be5d892545..66874922d5 100644 --- a/src/views/admin/partials/categories/privileges.tpl +++ b/src/views/admin/partials/categories/privileges.tpl @@ -1,64 +1,4 @@ - <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> - + <label>[[admin/manage/privileges:group-privileges]]</label> <table class="table table-striped privilege-table"> <thead> <tr class="privilege-table-header"> @@ -132,3 +72,65 @@ <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="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> diff --git a/src/views/admin/partials/global/privileges.tpl b/src/views/admin/partials/global/privileges.tpl index 6a792eb7ee..eadc53decb 100644 --- a/src/views/admin/partials/global/privileges.tpl +++ b/src/views/admin/partials/global/privileges.tpl @@ -1,7 +1,49 @@ + <label>[[admin/manage/privileges:group-privileges]]</label> <table class="table table-striped privilege-table"> <thead> <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> <th colspan="2">[[admin/manage/categories:privileges.section-user]]</th> @@ -44,43 +86,3 @@ <!-- ENDIF privileges.users.length --> </tbody> </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>