Change tag routines, articles saving is ok

This commit is contained in:
Ludovic CANDELLIER
2020-06-14 23:30:33 +02:00
parent 927e68223b
commit abc1510284
35 changed files with 703 additions and 141 deletions

View File

@@ -1 +1 @@
@include('components.input', ['type' => 'number'])
@include('components.input', ['type' => 'number', 'meta' => "step = '.01'"])

View File

@@ -0,0 +1,5 @@
@if (isset($list) && 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

@@ -1,5 +1,9 @@
@if (isset($list) && count($list))
@foreach($list as $key => $item)
<option @if (isset($value) && ($key == $value)) selected @endif value="{{$key}}">{{ $item }}</option>
@endforeach
@endif
@if (isset($complex) && $complex)
@include('components.options-complex')
@else
@if (isset($multiple) && $multiple)
@include('components.options-multiple')
@else
@include('components.options-simple')
@endif
@endif

View File

@@ -9,9 +9,7 @@
@if (isset($with_empty))
<option>{{ $with_empty }}</option>
@endif
@if (isset($complex) && $complex)
@include('components.options-complex')
@else
@include('components.options')
@endif
@include('components.options')
</select>

View File

@@ -1,16 +1,18 @@
@foreach($images as $key => $image)
<figure class="mr-2">
<img src="{{ $image['url'] }}" class="img-thumbnail img-caption" style="max-height:92px;">
<figcaption class="text-center pt-2">
<button type="button" class="btn btn-xs btn-outline-secondary">
<i class="fas fa-expand-alt"></i>
</button>
<button type="button" class="btn btn-xs btn-outline-danger">
<i class="fas fa-trash" data-index="{{ $key }}"></i>
</button>
</figcaption>
</figure>
@endforeach
@if ($images)
@foreach($images as $key => $image)
<figure class="mr-2">
<img src="{{ $image['url'] }}" class="img-thumbnail img-caption" style="max-height:92px;">
<figcaption class="text-center pt-2">
<button type="button" class="btn btn-xs btn-outline-secondary">
<i class="fas fa-expand-alt"></i>
</button>
<button type="button" class="btn btn-xs btn-outline-danger">
<i class="fas fa-trash" data-index="{{ $key }}"></i>
</button>
</figcaption>
</figure>
@endforeach
@endif
<script>
handleDeleteImages();

View File

@@ -40,7 +40,7 @@
{
$gallery = $("#uploader-mini-gallery");
if ($gallery) {
$gallery.load("{{ route('Botanic.Admin.Varieties.getImages', ['id' => (isset($id)) ? $id : false]) }}");
$gallery.load("{{ $load_url }}");
}
}