2019-06-23 14:29:58 +02:00
|
|
|
<form action="{{ $model->getUrl('/permissions') }}" method="POST" entity-permissions-editor>
|
2016-02-28 11:49:41 +01:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="PUT">
|
|
|
|
|
2019-02-03 14:45:45 +01:00
|
|
|
<p class="mb-none">{{ trans('entities.permissions_intro') }}</p>
|
2016-03-30 21:15:44 +02:00
|
|
|
|
2016-02-28 11:49:41 +01:00
|
|
|
<div class="form-group">
|
2019-02-03 14:45:45 +01:00
|
|
|
@include('form.checkbox', [
|
|
|
|
'name' => 'restricted',
|
|
|
|
'label' => trans('entities.permissions_enable'),
|
|
|
|
])
|
2016-02-28 11:49:41 +01:00
|
|
|
</div>
|
|
|
|
|
2019-06-23 14:29:58 +02:00
|
|
|
<table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
|
2016-02-28 11:49:41 +01:00
|
|
|
<tr>
|
2016-12-03 14:31:54 +01:00
|
|
|
<th>{{ trans('common.role') }}</th>
|
2019-04-13 13:07:27 +02:00
|
|
|
<th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>
|
|
|
|
{{ trans('common.actions') }}
|
|
|
|
<a href="#" permissions-table-toggle-all class="text-small ml-m text-primary">{{ trans('common.toggle_all') }}</a>
|
|
|
|
</th>
|
2016-02-28 11:49:41 +01:00
|
|
|
</tr>
|
|
|
|
@foreach($roles as $role)
|
|
|
|
<tr>
|
2019-04-13 13:07:27 +02:00
|
|
|
<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>
|
2019-02-03 14:45:45 +01:00
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
|
2016-02-28 11:49:41 +01:00
|
|
|
@if(!$model->isA('page'))
|
2019-02-03 14:45:45 +01:00
|
|
|
<td>@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
|
2016-02-28 11:49:41 +01:00
|
|
|
@endif
|
2019-02-03 14:45:45 +01:00
|
|
|
<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>
|
2016-02-28 11:49:41 +01:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
|
2017-08-26 14:24:55 +02:00
|
|
|
<div class="text-right">
|
|
|
|
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
2019-08-25 13:40:04 +02:00
|
|
|
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
2017-08-26 14:24:55 +02:00
|
|
|
</div>
|
2016-02-28 11:49:41 +01:00
|
|
|
</form>
|