]> BookStack Code Mirror - bookstack/blob - resources/views/form/entity-permissions-row.blade.php
f8c1dc1c7ac7a0f25c454ab47e12f42b25d398e8
[bookstack] / resources / views / form / entity-permissions-row.blade.php
1 <div component="permissions-table" class="content-permissions-row flex-container-row justify-space-between wrap">
2     <div class="gap-x-m flex-container-row items-center px-l py-m flex">
3         <div class="text-large" title="{{ $role->id === 0 ? 'Everyone Else' : trans('common.role') }}">
4             @icon($role->id === 0 ? 'groups' : 'role')
5         </div>
6         <span>
7             <strong>{{ $role->display_name }}</strong> <br>
8             <small class="text-muted">{{ $role->description }}</small>
9         </span>
10         @if($role->id !== 0)
11             <button type="button"
12                 class="ml-auto flex-none text-small text-primary text-button hover-underline content-permissions-row-toggle-all hide-under-s"
13                 refs="permissions-table@toggle-all"
14                 ><strong>{{ trans('common.toggle_all') }}</strong></button>
15         @endif
16     </div>
17     @php
18         $inheriting = ($role->id === 0 && !$model->restricted);
19     @endphp
20     @if($role->id === 0)
21         <div class="px-l flex-container-row items-center" refs="entity-permissions@everyoneInherit">
22             @include('form.custom-checkbox', [
23                 'name' => 'entity-permissions-inherit',
24                 'label' => 'Inherit defaults',
25                 'value' => 'true',
26                 'checked' => $inheriting
27             ])
28         </div>
29     @endif
30     <div class="flex-container-row justify-space-between gap-x-xl wrap items-center">
31         <div class="px-l">
32             @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view', 'disabled' => $inheriting])
33         </div>
34         <div class="px-l">
35             @if(!$model instanceof \BookStack\Entities\Models\Page)
36                 @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create', 'disabled' => $inheriting])
37             @endif
38         </div>
39         <div class="px-l">
40             @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update', 'disabled' => $inheriting])
41         </div>
42         <div class="px-l">
43             @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete', 'disabled' => $inheriting])
44         </div>
45     </div>
46 </div>