1 <form action="{{ $model->getUrl('/permissions') }}" method="POST" entity-permissions-editor>
3 <input type="hidden" name="_method" value="PUT">
5 <p class="mb-none">{{ trans('entities.permissions_intro') }}</p>
7 <div class="grid half">
8 <div class="form-group">
9 @include('form.checkbox', [
10 'name' => 'restricted',
11 'label' => trans('entities.permissions_enable'),
14 <div class="form-group">
15 <label for="owner">Owner</label>
19 <table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
21 <th>{{ trans('common.role') }}</th>
22 <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>
23 {{ trans('common.actions') }}
24 <a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
27 @foreach(\BookStack\Auth\Role::restrictable() as $role)
29 <td width="33%" class="pt-m">
30 {{ $role->display_name }}
31 <a href="#" permissions-table-toggle-all-in-row class="text-small float right ml-m text-primary">{{ trans('common.toggle_all') }}</a>
33 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
34 @if(!$model->isA('page'))
35 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
37 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
38 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
43 <div class="text-right">
44 <a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
45 <button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>