mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Revised role index list to align with user list
This commit is contained in:
@@ -133,6 +133,11 @@ return [
|
||||
// Role Settings
|
||||
'roles' => 'Roles',
|
||||
'role_user_roles' => 'User Roles',
|
||||
'roles_index_desc' => 'Roles are used to group users & provide system permission to their members. When a user is a member of multiple roles the privileges granted will stack and the user will inherit all abilities.',
|
||||
'roles_x_users_assigned' => '1 user assigned|:count users assigned',
|
||||
'roles_x_permissions_provided' => '1 permission|:count permissions',
|
||||
'roles_assigned_users' => 'Assigned Users',
|
||||
'roles_permissions_provided' => 'Provided Permissions',
|
||||
'role_create' => 'Create New Role',
|
||||
'role_create_success' => 'Role successfully created',
|
||||
'role_delete' => 'Delete Role',
|
||||
|
@@ -12,30 +12,38 @@
|
||||
<h1 class="list-heading">{{ trans('settings.role_user_roles') }}</h1>
|
||||
|
||||
<div class="text-right">
|
||||
<a href="{{ url("/settings/roles/new") }}" class="button outline">{{ trans('settings.role_create') }}</a>
|
||||
<a href="{{ url("/settings/roles/new") }}" class="button outline my-none">{{ trans('settings.role_create') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ trans('settings.role_name') }}</th>
|
||||
<th></th>
|
||||
<th class="text-center">{{ trans('settings.users') }}</th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td><a href="{{ url("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||
<td>
|
||||
@if($role->mfa_enforced)
|
||||
<span title="{{ trans('settings.role_mfa_enforced') }}">@icon('lock') </span>
|
||||
@endif
|
||||
{{ $role->description }}
|
||||
</td>
|
||||
<td class="text-center">{{ $role->users->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<p class="text-muted">{{ trans('settings.roles_index_desc') }}</p>
|
||||
|
||||
<div class="flex-container-row items-center justify-space-between gap-m mt-m mb-l wrap">
|
||||
<div>
|
||||
<div class="block inline mr-xs">
|
||||
<form method="get" action="{{ url("/settings/roles") }}">
|
||||
<input type="text" name="search" placeholder="{{ trans('common.search') }}" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-flex-end">
|
||||
@include('common.sort', ['options' => [
|
||||
'display_name' => trans('common.sort_name'),
|
||||
'users_count' => trans('settings.roles_assigned_users'),
|
||||
'permissions_count' => trans('settings.roles_permissions_provided'),
|
||||
], 'order' => $listDetails['order'], 'sort' => $listDetails['sort'], 'type' => 'roles'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-list">
|
||||
@foreach($roles as $role)
|
||||
@include('settings.roles.parts.roles-list-item', ['role' => $role])
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mb-m">
|
||||
{{ $roles->links() }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -0,0 +1,14 @@
|
||||
<div class="item-list-row flex-container-row py-xs items-center">
|
||||
<div class="py-xs px-m flex-2">
|
||||
<a href="{{ url("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a><br>
|
||||
@if($role->mfa_enforced)
|
||||
<small title="{{ trans('settings.role_mfa_enforced') }}">@icon('lock') </small>
|
||||
@endif
|
||||
<small>{{ $role->description }}</small>
|
||||
</div>
|
||||
<div class="text-right flex py-xs px-m text-muted">
|
||||
{{ trans_choice('settings.roles_x_users_assigned', $role->users_count, ['count' => $role->users_count]) }}
|
||||
<br>
|
||||
{{ trans_choice('settings.roles_x_permissions_provided', $role->permissions_count, ['count' => $role->permissions_count]) }}
|
||||
</div>
|
||||
</div>
|
@@ -10,7 +10,7 @@
|
||||
<div class="flex-container-row wrap justify-space-between items-center">
|
||||
<h1 class="list-heading">{{ trans('settings.users') }}</h1>
|
||||
<div>
|
||||
<a href="{{ url("/settings/users/create") }}" class="outline button mt-none">{{ trans('settings.users_add_new') }}</a>
|
||||
<a href="{{ url("/settings/users/create") }}" class="outline button my-none">{{ trans('settings.users_add_new') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user