Works for friday & saturday

This commit is contained in:
Ludovic CANDELLIER
2022-05-29 00:46:04 +02:00
parent 352b109e87
commit 5b74c93b2e
44 changed files with 2023 additions and 79 deletions

View File

@@ -5,5 +5,23 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.TagGroups.index'), 'model' => 'tag_groups'])
@include('components.datatable', [
'route' => route('Admin.Shop.TagGroups.index'),
'model' => 'tag_groups',
'callback' => 'handleTagGroup();',
])
@endsection
@include('load.form.toggle')
@push('js')
<script>
function handleTagGroup() {
initToggle("{{ route('Admin.Shop.TagGroups.toggleVisible') }}", '.visible');
}
$(document).ready(function () {
initSelect2();
});
</script>
@endpush

View File

@@ -0,0 +1,14 @@
@extends('Shop.layout.layout', [
'title' => __('Recherche'),
])
@section('content')
@include('Shop.Tags.partials.filter')
{{ $articles_count ?? 0 }} Résultats
@if ($display_by_rows ?? false)
@include('Shop.Shelves.partials.category_articles_rows')
@else
@include('Shop.Shelves.partials.category_articles')
@endif
@endsection

View File

@@ -1,16 +1,8 @@
<div class="row">
<div class="col-6">
<div class="col-12 text-right">
@include('components.form.button', ['id' => 'by_cards', 'icon' => 'fa-th', 'class' => 'btn-success'])
@include('components.form.button', ['id' => 'by_rows', 'icon' => 'fa-list', 'class' => 'btn-success'])
</div>
<div class="col-6">
<!--
<form name="product_sorting" class="mt-0">
<label>Trier par</label>
@include('components.form.select', ['name' => 'sorting', 'list' => ['Pertinence']])
</form>
-->
</div>
</div>
@push('js')

View File

@@ -1,5 +1,5 @@
<div class="row">
@if ($articles)
@if ($articles ?? false)
@foreach ($articles as $product_name => $article)
<div class="col-3 mb-3">
@include('Shop.Articles.partials.article')

View File

@@ -1,4 +1,4 @@
@if ($articles)
@if ($articles ?? false)
@foreach ($articles as $product_name => $article)
@include('Shop.Articles.partials.article_rows')
@endforeach

View File

@@ -3,18 +3,21 @@
])
@section('content')
@include('Shop.Tags.partials.filter')
<div class="row mb-3">
<div class="col-8">
<div class="col-3">
@include('Shop._partials.display_filters')
</div>
<div class="col-6">
<h1 style="font-size: 2em;">{{ $category['name'] }}</h1>
<h3 style="font-size: 1.2em;">{!! $category['description'] !!}</h3>
</div>
<div class="col-4">
<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

View File

@@ -7,25 +7,31 @@
</div>
</div>
@foreach ($tags as $tag_group_id => $group)
@if ($group['tags'] ?? false)
@component('components.layout.box-collapse', [
'title' => $group['name'],
'id' => 'tag_group_' . $tag_group_id,
])
@foreach ($group['tags'] as $tag)
<div class="form-inline">
@include('components.form.checkboxes.icheck', [
'name' => 'tag[]',
'val' => $tag['id'],
])
{{ $tag['name'] }} ({{ $tag['count'] }})
</div>
@endforeach
@endcomponent
<form id="filter">
@if ($tags ?? false)
@foreach ($tags as $tag_group_id => $group)
@if ($group['tags'] ?? false)
@component('components.layout.box-collapse', [
'title' => $group['name'],
'id' => 'tag_group_' . $tag_group_id,
])
@foreach ($group['tags'] as $tag)
<div class="form-inline">
@include('components.form.checkboxes.icheck', [
'name' => 'tags[]',
'val' => $tag['id'],
'value' => in_array($tag['id'], $tags_selected ?? []),
'id_name' => 'tag_' . $tag['id'],
'class' => 'filter_tags',
])
{{ $tag['name'] }} ({{ $tag['count'] }})
</div>
@endforeach
@endcomponent
@endif
@endforeach
@endif
@endforeach
</form>
</section>
</aside>
@@ -39,6 +45,9 @@
$('#filter-on').toggleClass('d-none');
$('#filter-off').toggleClass('d-none');
});
$('.filter_tags input').change(function() {
$('#filter').submit();
})
initChevron();
</script>
@endpush

View File

@@ -2,18 +2,6 @@
<div class="col-3 form-inline">
<a href="/"><img src="/img/logo.jpg" class="img-responvive"></a>
@if (!($no_filter ?? false))
<a id="filters" href="#" class="text-white pl-3">
<span id="filter-on" class="fa-stack fa-2x @if ($filter_on ?? false) d-none" @endif">
<i class="fa fa-stack-1x fa-filter"></i>
</span>
<span id="filter-off" class="fa-stack fa-2x @if (!($filter_on ?? false)) d-none" @endif">
<i class="fa fa-stack-1x fa-filter"></i>
<i class="fa fa-stack-2x fa-ban" style="color:Tomato"></i>
</span>
</a>
@endif
</div>
<div class="col-5 form-inline">

View File

@@ -1,13 +1,22 @@
<form method="get" action="/recherche" id="search-general">
<form method="get" action="{{ route('Shop.Searches.search') }}" id="search-general">
<div class="input-group">
<div class="input-group-prepend">
@include('components.form.select', ['name' => 'type', 'list' => ['Semences & Plants'] ])
</div>
<input type="text" class="form-control search-btn" aria-label="Text input with dropdown button">
<input type="text" name="search" value="{{ $search['search'] ?? null }}" class="form-control search-btn" aria-label="Chercher">
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-search"></i></span>
<span class="input-group-text"><i class="btn btn-sm fa fa-search"></i></span>
</div>
</div>
</form>
@push('js')
<script>
$(function() {
$('#search-general .fa-search').click(function() {
$('#search-general').submit();
});
});
</script>
@endpush

View File

@@ -1,4 +1,4 @@
<input type="checkbox" name="{{ $name }}" id="{{ $id_name ?? $name }}" class="{{ $class ?? ''}}" value="{{ $val ?? 1}}" {{ $meta ?? '' }}
@if ( (isset($value) && isset($val) && ($value == $val)) || (!isset($val) && $value)) checked @endif
@if (isset($disabled) && $disabled)disabled="disabled"@endif
@if ($disabled ?? false)disabled="disabled"@endif
>