add watermark on zoom, update display of article nature on shelve (change icon to text
This commit is contained in:
@@ -1,26 +1,41 @@
|
||||
@foreach ($article_natures as $nature)
|
||||
<div class="btn products" data-id="{{ $nature }}">
|
||||
@if ($article_nature == $nature)
|
||||
<img src="{{ App\Repositories\Shop\ArticleNatures::getIconBySlug($nature, 'normal', 'icon_selection') }}">
|
||||
@else
|
||||
<img src="{{ App\Repositories\Shop\ArticleNatures::getIconBySlug($nature, 'normal', 'icon') }}">
|
||||
@endif
|
||||
</div>
|
||||
<div class="btn products" data-id="{{ $nature }}">
|
||||
@if ($article_nature == $nature)
|
||||
@php
|
||||
$iconType = 'icon_selection';
|
||||
$iconClass = 'badge-success';
|
||||
@endphp
|
||||
@else
|
||||
@php
|
||||
$iconType = 'icon';
|
||||
$iconClass = 'badge-secondary';
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@php
|
||||
$icon = App\Repositories\Shop\ArticleNatures::getIconBySlug($nature, 'normal', $iconType);
|
||||
@endphp
|
||||
@if ($icon)
|
||||
<img src="{{ $icon }}" alt="{{ $nature }}">
|
||||
@else
|
||||
<span class="badge {{ $iconClass }}" style="font-size: 1.2em;">{{ $nature }}</span>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$('#by_rows').click(function() {
|
||||
$('#display_by_rows').val(1);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('#by_cards').click(function() {
|
||||
$('#display_by_rows').val(0);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('.products').click(function() {
|
||||
$('#article_nature').val($(this).data('id'));
|
||||
$('#category-form').submit();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
<script>
|
||||
$('#by_rows').click(function() {
|
||||
$('#display_by_rows').val(1);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('#by_cards').click(function() {
|
||||
$('#display_by_rows').val(0);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('.products').click(function() {
|
||||
$('#article_nature').val($(this).data('id'));
|
||||
$('#category-form').submit();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user