]> BookStack Code Mirror - bookstack/blob - resources/views/form/restriction-form.blade.php
Updated all application urls to allow path prefix.
[bookstack] / resources / views / form / restriction-form.blade.php
1 <form action="{{ $model->getUrl('/permissions') }}" method="POST">
2     {!! csrf_field() !!}
3     <input type="hidden" name="_method" value="PUT">
4
5     <p>Once enabled, These permissions will take priority over any set role permissions.</p>
6
7     <div class="form-group">
8         @include('form/checkbox', ['name' => 'restricted', 'label' => 'Enable custom permissions'])
9     </div>
10
11
12     <table class="table">
13         <tr>
14             <th>Role</th>
15             <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>Actions</th>
16         </tr>
17         @foreach($roles as $role)
18             <tr>
19                 <td>{{ $role->display_name }}</td>
20                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'View', 'action' => 'view'])</td>
21                 @if(!$model->isA('page'))
22                     <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Create', 'action' => 'create'])</td>
23                 @endif
24                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Update', 'action' => 'update'])</td>
25                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Delete', 'action' => 'delete'])</td>
26             </tr>
27         @endforeach
28     </table>
29
30     <a href="{{ $model->getUrl() }}" class="button muted">Cancel</a>
31     <button type="submit" class="button pos">Save Permissions</button>
32 </form>