]> BookStack Code Mirror - bookstack/blob - resources/views/form/entity-permissions.blade.php
Merge branch 'master' into 2019-design
[bookstack] / resources / views / form / entity-permissions.blade.php
1 <form action="{{ $model->getUrl('/permissions') }}" method="POST">
2     {!! csrf_field() !!}
3     <input type="hidden" name="_method" value="PUT">
4
5     <p class="mb-none">{{ trans('entities.permissions_intro') }}</p>
6
7     <div class="form-group">
8         @include('form.checkbox', [
9             'name' => 'restricted',
10             'label' => trans('entities.permissions_enable'),
11         ])
12     </div>
13
14     {{--TODO - Add global and role "Select All" options--}}
15
16     <table class="table toggle-switch-list">
17         <tr>
18             <th>{{ trans('common.role') }}</th>
19             <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>{{ trans('common.actions') }}</th>
20         </tr>
21         @foreach($roles as $role)
22             <tr>
23                 <td>{{ $role->display_name }}</td>
24                 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
25                 @if(!$model->isA('page'))
26                     <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
27                 @endif
28                 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
29                 <td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
30             </tr>
31         @endforeach
32     </table>
33
34     <div class="text-right">
35         <a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
36         <button type="submit" class="button primary">{{ trans('entities.permissions_save') }}</button>
37     </div>
38 </form>