mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
a61c9c5e98
- Primarily moved and re-organised view files. - Included readme within views to document the convention. - Fixed some issues with page field select list in previous commit. - Tweaked some route names while going through. - Split some views out further. Closes #2805
53 lines
2.6 KiB
PHP
53 lines
2.6 KiB
PHP
<form action="{{ $model->getUrl('/permissions') }}" method="POST" entity-permissions-editor>
|
|
{!! csrf_field() !!}
|
|
<input type="hidden" name="_method" value="PUT">
|
|
|
|
<div class="grid half left-focus v-center">
|
|
<div>
|
|
<p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>
|
|
<div>
|
|
@include('form.checkbox', [
|
|
'name' => 'restricted',
|
|
'label' => trans('entities.permissions_enable'),
|
|
])
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="form-group">
|
|
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
|
|
@include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by', 'compact' => false])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
|
|
<tr>
|
|
<th>{{ trans('common.role') }}</th>
|
|
<th colspan="{{ $model->isA('page') ? '3' : '4' }}">
|
|
{{ trans('common.actions') }}
|
|
<a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
|
|
</th>
|
|
</tr>
|
|
@foreach(\BookStack\Auth\Role::restrictable() as $role)
|
|
<tr>
|
|
<td width="33%" class="pt-m">
|
|
{{ $role->display_name }}
|
|
<a href="#" permissions-table-toggle-all-in-row class="text-small float right ml-m text-primary">{{ trans('common.toggle_all') }}</a>
|
|
</td>
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
|
|
@if(!$model->isA('page'))
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
|
|
@endif
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
|
|
<div class="text-right">
|
|
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
|
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
|
</div>
|
|
</form> |