mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Updated user and shelf views to new design
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
|
||||
<label>
|
||||
<input value="true" id="{{$name}}" type="checkbox" name="{{$name}}"
|
||||
@if($errors->has($name)) class="neg" @endif
|
||||
@if(old($name) || (!old() && isset($model) && $model->$name)) checked="checked" @endif
|
||||
>
|
||||
{{ $label }}
|
||||
</label>
|
||||
{{--
|
||||
$name
|
||||
$label
|
||||
$errors?
|
||||
$model?
|
||||
--}}
|
||||
@include('components.custom-checkbox', [
|
||||
'name' => $name,
|
||||
'label' => $label,
|
||||
'value' => 'true',
|
||||
'checked' => old($name) || (!old() && isset($model) && $model->$name)
|
||||
])
|
||||
|
||||
@if($errors->has($name))
|
||||
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
|
||||
|
@ -2,15 +2,18 @@
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
|
||||
<p>{{ trans('entities.permissions_intro') }}</p>
|
||||
<p class="mb-none">{{ trans('entities.permissions_intro') }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
@include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')])
|
||||
@include('form.checkbox', [
|
||||
'name' => 'restricted',
|
||||
'label' => trans('entities.permissions_enable'),
|
||||
])
|
||||
</div>
|
||||
|
||||
{{--TODO - Add global and role "Select All" options--}}
|
||||
|
||||
<table class="table">
|
||||
<table class="table toggle-switch-list">
|
||||
<tr>
|
||||
<th>{{ trans('common.role') }}</th>
|
||||
<th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>{{ trans('common.actions') }}</th>
|
||||
@ -18,12 +21,12 @@
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->display_name }}</td>
|
||||
<td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</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>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -1,6 +1,13 @@
|
||||
{{--TODO - Make custom--}}
|
||||
<label>
|
||||
<input value="true" id="{{$name}}[{{$role->id}}][{{$action}}]" type="checkbox" name="{{$name}}[{{$role->id}}][{{$action}}]"
|
||||
@if(isset($model) && $model->hasRestriction($role->id, $action)) checked="checked" @endif>
|
||||
{{ $label }}
|
||||
</label>
|
||||
{{--
|
||||
$name
|
||||
$label
|
||||
$role
|
||||
$action
|
||||
$model?
|
||||
--}}
|
||||
@include('components.custom-checkbox', [
|
||||
'name' => $name . '[' . $role->id . '][' . $action . ']',
|
||||
'label' => $label,
|
||||
'value' => 'true',
|
||||
'checked' => isset($model) && $model->hasRestriction($role->id, $action)
|
||||
])
|
@ -1,13 +1,16 @@
|
||||
|
||||
@foreach($roles as $role)
|
||||
<label>
|
||||
<input value="{{ $role->id }}" id="{{$name}}-{{$role->name}}" type="checkbox" name="{{$name}}[{{$role->name}}]"
|
||||
@if($errors->has($name)) class="neg" @endif
|
||||
@if(old($name . '.' . $role->name) || (!old('name') && isset($model) && $model->hasRole($role->name))) checked="checked" @endif
|
||||
>
|
||||
{{ $role->display_name }}
|
||||
</label>
|
||||
@endforeach
|
||||
<div class="toggle-switch-list dual-column-content">
|
||||
@foreach($roles as $role)
|
||||
<div>
|
||||
@include('components.custom-checkbox', [
|
||||
'name' => $name . '[' . $role->name . ']',
|
||||
'label' => $role->display_name,
|
||||
'value' => $role->id,
|
||||
'checked' => old($name . '.' . $role->name) || (!old('name') && isset($model) && $model->hasRole($role->name))
|
||||
])
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if($errors->has($name))
|
||||
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
|
||||
|
Reference in New Issue
Block a user