mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-27 20:51:57 +00:00
Added user listing to role edit screen
This commit is contained in:
parent
2e7345f4f0
commit
a33deed26b
@ -25,3 +25,12 @@ table {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.list-table {
|
||||||
|
margin: 0 -$-xs;
|
||||||
|
td {
|
||||||
|
border: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding: $-xs;
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-9">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5">
|
||||||
<h3>Role Details</h3>
|
<h3>Role Details</h3>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Role Name</label>
|
<label for="name">Role Name</label>
|
||||||
@ -13,36 +15,18 @@
|
|||||||
@include('form/text', ['name' => 'description'])
|
@include('form/text', ['name' => 'description'])
|
||||||
</div>
|
</div>
|
||||||
<h3>System Permissions</h3>
|
<h3>System Permissions</h3>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<label>@include('settings/roles/checkbox', ['permission' => 'users-manage']) Manage users</label>
|
<label>@include('settings/roles/checkbox', ['permission' => 'users-manage']) Manage users</label>
|
||||||
</div>
|
<label>@include('settings/roles/checkbox', ['permission' => 'user-roles-manage']) Manage roles & role permissions</label>
|
||||||
<div class="col-md-6">
|
|
||||||
<label>@include('settings/roles/checkbox', ['permission' => 'user-roles-manage']) Manage user roles</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="even">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-all']) Manage all Book, Chapter & Page permissions</label>
|
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-all']) Manage all Book, Chapter & Page permissions</label>
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-own']) Manage permissions on own Book, Chapter & Pages</label>
|
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-own']) Manage permissions on own Book, Chapter & Pages</label>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="even">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>@include('settings/roles/checkbox', ['permission' => 'settings-manage']) Manage app settings</label>
|
<label>@include('settings/roles/checkbox', ['permission' => 'settings-manage']) Manage app settings</label>
|
||||||
</div>
|
</div>
|
||||||
<hr class="even">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<h3>Asset Permissions</h3>
|
<h3>Asset Permissions</h3>
|
||||||
<p>
|
<p>
|
||||||
These permissions control default access to the assets within the system. <br>
|
These permissions control default access to the assets within the system.
|
||||||
Permissions on Books, Chapters and Pages will override these permissions.
|
Permissions on Books, Chapters and Pages will override these permissions.
|
||||||
</p>
|
</p>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -110,8 +94,38 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="/settings/roles" class="button muted">Cancel</a>
|
||||||
|
<button type="submit" class="button pos">Save Role</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<h3>Users in this role</h3>
|
||||||
|
|
||||||
|
@if(isset($role) && count($role->users) > 0)
|
||||||
|
<table class="list-table">
|
||||||
|
@foreach($role->users as $user)
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 0;"><img class="avatar small" src="{{$user->getAvatar(40)}}" alt="{{$user->name}}"></td>
|
||||||
|
<td>
|
||||||
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
|
<a href="/settings/users/{{$user->id}}">
|
||||||
|
@endif
|
||||||
|
{{ $user->name }}
|
||||||
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
@else
|
||||||
|
<p class="text-muted">
|
||||||
|
No users currently in this role.
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="/settings/roles" class="button muted">Cancel</a>
|
|
||||||
<button type="submit" class="button pos">Save Role</button>
|
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user