[WIP] begin of new display for article, shelves
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
@include('components.form.button', ['id' => 'by_rows', 'icon' => 'fa-list', 'class' => 'btn-secondary'])
|
||||
@endif
|
||||
|
||||
@include('components.form.button', ['id' => 'semences', 'icon' => 'fa-leaf', 'class' => 'bg-yellow yellow-dark'])
|
||||
@include('components.form.button', ['id' => 'plants', 'icon' => 'fa-seedling', 'class' => 'bg-green text-white'])
|
||||
@include('components.form.button', ['data_id' => 'botanic', 'icon' => 'fa-leaf', 'class' => 'products bg-yellow yellow-dark'])
|
||||
@include('components.form.button', ['data_id' => 'merchandise', 'icon' => 'fa-seedling', 'class' => 'products bg-green text-white'])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,12 +15,16 @@
|
||||
@push('js')
|
||||
<script>
|
||||
$('#by_rows').click(function() {
|
||||
var url = "{{ route('Shop.Categories.show', ['id' => $category['id'], 'by_rows' => true]) }}";
|
||||
window.location = url;
|
||||
})
|
||||
$('#display_by_rows').val(1);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('#by_cards').click(function() {
|
||||
var url = "{{ route('Shop.Categories.show', ['id' => $category['id']]) }}";
|
||||
window.location = url;
|
||||
})
|
||||
$('#display_by_rows').val(0);
|
||||
$('#category-form').submit();
|
||||
});
|
||||
$('.products').click(function() {
|
||||
$('#product_type').val($(this).data('id'));
|
||||
$('#category-form').submit();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -3,31 +3,38 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row mb-3">
|
||||
<div class="col-3">
|
||||
@include('Shop._partials.display_filters')
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h1 style="font-size: 1.5em;">
|
||||
@foreach($breadcrumb ?? [] as $parent)
|
||||
<a href="{{ route('Shop.Categories.show', ['id' => $parent['id']]) }}" style="text-decoration: none; color: inherit;">{{ $parent['name'] }}</a> /
|
||||
@endforeach
|
||||
<span style="font-size: 1.4em;">
|
||||
{{ $category['name'] }}
|
||||
</span>
|
||||
</h1>
|
||||
<h3 style="font-size: 1.2em;">{!! $category['description'] !!}</h3>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
@include('Shop.Shelves.partials.category_add')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Tags.partials.filter')
|
||||
|
||||
@if ($display_by_rows ?? false)
|
||||
@include('Shop.Shelves.partials.category_articles_rows')
|
||||
@else
|
||||
@include('Shop.Shelves.partials.category_articles')
|
||||
@endif
|
||||
{{ Form::open(['id' => 'category-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" id="display_by_rows" name="display_by_rows" value="{{ $display_by_rows ?? false }}">
|
||||
<input type="hidden" id="product_type" name="product_type" value="{{ $product_type ?? false }}">
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-3">
|
||||
@include('Shop._partials.display_filters')
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h1 style="font-size: 1.5em;">
|
||||
@foreach($breadcrumb ?? [] as $parent)
|
||||
<a href="{{ route('Shop.Categories.show', ['id' => $parent['id']]) }}" style="text-decoration: none; color: inherit;">{{ $parent['name'] }}</a> /
|
||||
@endforeach
|
||||
<span style="font-size: 1.4em;">
|
||||
{{ $category['name'] }}
|
||||
</span>
|
||||
</h1>
|
||||
<h3 style="font-size: 1.2em;">{!! $category['description'] !!}</h3>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
@include('Shop.Shelves.partials.category_add')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Tags.partials.filter')
|
||||
|
||||
@if ($display_by_rows ?? false)
|
||||
@include('Shop.Shelves.partials.category_articles_rows')
|
||||
@else
|
||||
@include('Shop.Shelves.partials.category_articles')
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user