1 <form action="{{ $model->getUrl('/permissions') }}" method="POST" entity-permissions-editor>
3 <input type="hidden" name="_method" value="PUT">
5 <div class="grid half left-focus v-center">
7 <p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>
9 @include('form.checkbox', [
10 'name' => 'restricted',
11 'label' => trans('entities.permissions_enable'),
16 <div class="form-group">
17 <label for="owner">{{ trans('entities.permissions_owner') }}</label>
18 @include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by'])
23 @if($model instanceof \BookStack\Entities\Models\Bookshelf)
24 <p class="text-warn">{{ trans('entities.shelves_permissions_cascade_warning') }}</p>
29 <table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
31 <th>{{ trans('common.role') }}</th>
32 <th colspan="{{ $model->isA('page') ? '3' : '4' }}">
33 {{ trans('common.actions') }}
34 <a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
37 @foreach(\BookStack\Auth\Role::restrictable() as $role)
39 <td width="33%" class="pt-m">
40 {{ $role->display_name }}
41 <a href="#" permissions-table-toggle-all-in-row class="text-small float right ml-m text-primary">{{ trans('common.toggle_all') }}</a>
43 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
44 @if(!$model->isA('page'))
45 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
47 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
48 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
53 <div class="text-right">
54 <a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
55 <button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>