Refactoring, change menu, add many features

This commit is contained in:
Ludovic CANDELLIER
2021-10-30 02:22:51 +02:00
parent fae7b7897f
commit e356b3fcda
158 changed files with 1114 additions and 412 deletions

View File

@@ -0,0 +1,14 @@
@if (isset($list) && count($list))
@foreach($list as $item)
<option
@if (isset($value) && ($item['id'] == $value)) selected @endif value="{{$item['id']}}"
@foreach($item as $item_key => $item_value)
@if (($item_key != 'id') && ($item_key != 'txt'))
data-{{ $item_key }}="{{ $item_value }}"
@endif
@endforeach
>
{{ $item['txt'] }}
</option>
@endforeach
@endif

View File

@@ -0,0 +1,5 @@
@if (($list ?? false) && count($list))
@foreach($list as $key => $item)
<option @if (isset($values) && in_array($key, $values)) selected @endif value="{{$key}}">{{ $item }}</option>
@endforeach
@endif

View File

@@ -0,0 +1,5 @@
@if (isset($list) && count($list))
@foreach($list as $key => $item)
<option @if (isset($value) && ($key == $value)) selected @endif value="{{$key}}">{{ $item }}</option>
@endforeach
@endif

View File

@@ -0,0 +1,7 @@
@if (isset($list) && count($list))
@foreach($list as $key => $optgroup)
<optgroup label="{{ $optgroup['label'] }}">
@include('components.form.options', ['list' => $optgroup['options']])
</optgroup>
@endforeach
@endif