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('components.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by', 'compact' => false])
25 <table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
27 <th>{{ trans('common.role') }}</th>
28 <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>
29 {{ trans('common.actions') }}
30 <a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
33 @foreach(\BookStack\Auth\Role::restrictable() as $role)
35 <td width="33%" class="pt-m">
36 {{ $role->display_name }}
37 <a href="#" permissions-table-toggle-all-in-row class="text-small float right ml-m text-primary">{{ trans('common.toggle_all') }}</a>
39 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
40 @if(!$model->isA('page'))
41 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
43 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
44 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
49 <div class="text-right">
50 <a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
51 <button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>