2016-02-27 14:24:42 -05:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
<div class="card content-wrap">
|
|
|
|
<h1 class="list-heading">{{ $title }}</h1>
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
<div class="setting-list">
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
<div class="grid half">
|
|
|
|
<div>
|
|
|
|
<label class="setting-list-label">{{ trans('settings.role_details') }}</label>
|
2019-02-02 10:49:57 -05:00
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
<div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">{{ trans('settings.role_name') }}</label>
|
|
|
|
@include('form.text', ['name' => 'display_name'])
|
2019-02-02 10:49:57 -05:00
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">{{ trans('settings.role_desc') }}</label>
|
|
|
|
@include('form.text', ['name' => 'description'])
|
2016-04-09 08:52:44 -04:00
|
|
|
</div>
|
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
@if(config('auth.method') === 'ldap')
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">{{ trans('settings.role_external_auth_id') }}</label>
|
|
|
|
@include('form.text', ['name' => 'external_auth_id'])
|
|
|
|
</div>
|
2017-08-26 12:17:04 -04:00
|
|
|
@endif
|
2019-02-03 12:34:15 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-04-13 07:07:27 -04:00
|
|
|
<div class="grid half" permissions-table>
|
2019-02-03 12:34:15 -05:00
|
|
|
<div>
|
|
|
|
<label class="setting-list-label">{{ trans('settings.role_system') }}</label>
|
2019-04-13 07:07:27 -04:00
|
|
|
<a href="#" permissions-table-toggle-all class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
2019-02-03 12:34:15 -05:00
|
|
|
</div>
|
|
|
|
<div class="toggle-switch-list">
|
|
|
|
<div>@include('settings.roles.checkbox', ['permission' => 'users-manage', 'label' => trans('settings.role_manage_users')])</div>
|
|
|
|
<div>@include('settings.roles.checkbox', ['permission' => 'user-roles-manage', 'label' => trans('settings.role_manage_roles')])</div>
|
|
|
|
<div>@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-all', 'label' => trans('settings.role_manage_entity_permissions')])</div>
|
|
|
|
<div>@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-own', 'label' => trans('settings.role_manage_own_entity_permissions')])</div>
|
|
|
|
<div>@include('settings.roles.checkbox', ['permission' => 'settings-manage', 'label' => trans('settings.role_manage_settings')])</div>
|
2016-02-28 05:49:41 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
<div>
|
|
|
|
<label class="setting-list-label">{{ trans('settings.role_asset') }}</label>
|
|
|
|
<p>{{ trans('settings.role_asset_desc') }}</p>
|
|
|
|
|
|
|
|
@if (isset($role) && $role->system_name === 'admin')
|
2019-04-07 06:34:40 -04:00
|
|
|
<p class="text-warn">{{ trans('settings.role_asset_admins') }}</p>
|
2019-02-02 10:49:57 -05:00
|
|
|
@endif
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2019-04-13 07:07:27 -04:00
|
|
|
<table permissions-table class="table toggle-switch-list compact permissions-table">
|
2019-02-03 12:34:15 -05:00
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<th width="20%">
|
|
|
|
<a href="#" permissions-table-toggle-all class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</th>
|
2019-02-03 12:34:15 -05:00
|
|
|
<th width="20%">{{ trans('common.create') }}</th>
|
|
|
|
<th width="20%">{{ trans('common.view') }}</th>
|
|
|
|
<th width="20%">{{ trans('common.edit') }}</th>
|
|
|
|
<th width="20%">{{ trans('common.delete') }}</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.shelves_long') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-create-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-view-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-view-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.books') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-create-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-view-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-view-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'book-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.chapters') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-create-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-create-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-view-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-view-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'chapter-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.pages') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-create-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-create-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-view-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-view-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'page-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.images') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>@include('settings.roles.checkbox', ['permission' => 'image-create-all', 'label' => ''])</td>
|
|
|
|
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'image-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'image-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'image-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'image-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.attachments') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>@include('settings.roles.checkbox', ['permission' => 'attachment-create-all', 'label' => ''])</td>
|
|
|
|
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'attachment-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'attachment-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'attachment-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'attachment-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-04-13 07:07:27 -04:00
|
|
|
<td>
|
|
|
|
<div>{{ trans('entities.comments') }}</div>
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 12:34:15 -05:00
|
|
|
<td>@include('settings.roles.checkbox', ['permission' => 'comment-create-all', 'label' => ''])</td>
|
|
|
|
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'comment-update-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'comment-update-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'comment-delete-own', 'label' => trans('settings.role_own')])
|
|
|
|
<br>
|
|
|
|
@include('settings.roles.checkbox', ['permission' => 'comment-delete-all', 'label' => trans('settings.role_all')])
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2019-02-02 10:49:57 -05:00
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
</div>
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
<div class="form-group text-right">
|
|
|
|
<a href="{{ baseUrl("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
|
|
|
@if (isset($role) && $role->id)
|
2019-02-16 10:05:18 -05:00
|
|
|
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button outline">{{ trans('settings.role_delete') }}</a>
|
2019-02-03 12:34:15 -05:00
|
|
|
@endif
|
|
|
|
<button type="submit" class="button primary">{{ trans('settings.role_save') }}</button>
|
2016-02-27 14:24:42 -05:00
|
|
|
</div>
|
2019-02-02 10:49:57 -05:00
|
|
|
|
2019-02-03 12:34:15 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card content-wrap auto-height">
|
|
|
|
<h2 class="list-heading">{{ trans('settings.role_users') }}</h2>
|
|
|
|
@if(isset($role) && count($role->users) > 0)
|
|
|
|
<div class="grid third">
|
|
|
|
@foreach($role->users as $user)
|
|
|
|
<div class="user-list-item">
|
|
|
|
<div>
|
|
|
|
<img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
|
|
|
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
2017-08-26 12:17:04 -04:00
|
|
|
@endif
|
2019-02-03 12:34:15 -05:00
|
|
|
{{ $user->name }}
|
|
|
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
2017-08-26 12:17:04 -04:00
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
@else
|
|
|
|
<p class="text-muted">
|
|
|
|
{{ trans('settings.role_users_none') }}
|
|
|
|
</p>
|
|
|
|
@endif
|
2016-04-09 08:52:44 -04:00
|
|
|
</div>
|