2019-06-23 20:29:58 +08:00
|
|
|
<form action="{{ $model->getUrl('/permissions') }}" method="POST" entity-permissions-editor>
|
2016-02-28 18:49:41 +08:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="PUT">
|
|
|
|
|
2021-01-01 01:25:20 +08:00
|
|
|
<div class="grid half left-focus v-center">
|
|
|
|
<div>
|
|
|
|
<p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>
|
|
|
|
<div>
|
|
|
|
@include('form.checkbox', [
|
|
|
|
'name' => 'restricted',
|
|
|
|
'label' => trans('entities.permissions_enable'),
|
|
|
|
])
|
|
|
|
</div>
|
2020-12-31 23:27:25 +08:00
|
|
|
</div>
|
2021-01-01 01:25:20 +08:00
|
|
|
<div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
|
2021-03-21 23:04:32 +08:00
|
|
|
@include('components.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by', 'compact' => false])
|
2021-01-01 01:25:20 +08:00
|
|
|
</div>
|
2020-12-31 23:27:25 +08:00
|
|
|
</div>
|
2016-02-28 18:49:41 +08:00
|
|
|
</div>
|
|
|
|
|
2021-01-01 01:25:20 +08:00
|
|
|
<hr>
|
|
|
|
|
2019-06-23 20:29:58 +08:00
|
|
|
<table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
|
2016-02-28 18:49:41 +08:00
|
|
|
<tr>
|
2016-12-03 21:31:54 +08:00
|
|
|
<th>{{ trans('common.role') }}</th>
|
2021-06-05 05:36:30 +08:00
|
|
|
<th colspan="{{ $model->isA('page') ? '3' : '4' }}">
|
2019-04-13 19:07:27 +08:00
|
|
|
{{ trans('common.actions') }}
|
|
|
|
<a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</th>
|
2016-02-28 18:49:41 +08:00
|
|
|
</tr>
|
2019-10-05 19:55:01 +08:00
|
|
|
@foreach(\BookStack\Auth\Role::restrictable() as $role)
|
2016-02-28 18:49:41 +08:00
|
|
|
<tr>
|
2019-04-13 19:07:27 +08:00
|
|
|
<td width="33%" class="pt-m">
|
|
|
|
{{ $role->display_name }}
|
|
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small float right ml-m text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</td>
|
2019-02-03 21:45:45 +08:00
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
|
2016-02-28 18:49:41 +08:00
|
|
|
@if(!$model->isA('page'))
|
2019-02-03 21:45:45 +08:00
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
|
2016-02-28 18:49:41 +08:00
|
|
|
@endif
|
2019-02-03 21:45:45 +08:00
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
|
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
|
2016-02-28 18:49:41 +08:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
|
2017-08-26 20:24:55 +08:00
|
|
|
<div class="text-right">
|
|
|
|
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
2019-08-25 19:40:04 +08:00
|
|
|
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
2017-08-26 20:24:55 +08:00
|
|
|
</div>
|
2016-02-28 18:49:41 +08:00
|
|
|
</form>
|