Merge pull request #1028 from openclassify/dia

#3472 listing design improvments - Integrate
This commit is contained in:
Muammer Top 2021-04-12 11:34:12 +03:00 committed by GitHub
commit 7c66e50f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 9 deletions

View File

@ -7,7 +7,7 @@
<div id="gallerying" class="d-flex flex-wrap">
{{ addBlock('ad-list/partials/gallery',{'featured_advs':featured_advs})|raw }}
{{ addBlock('ad-list/partials/gallery',{'featured_advs': featured_advs, 'vars': _context})|raw }}
{% for adv in advs %}
<div class="w-50 gallery-item-wrapper mb-1{{ adv.doping != null ? ' doping_type4' }}">

View File

@ -18,7 +18,7 @@
<tbody>
{{ addBlock('ad-list/partials/ads', {'featured_advs': featured_advs})|raw }}
{{ addBlock('ad-list/partials/ads', {'featured_advs': featured_advs, 'vars': _context})|raw }}
{% for adv in advs %}
<tr class="{{ adv.doping_type ? 'doping_type' ~ adv.doping_type }}">

View File

@ -280,16 +280,11 @@ class AdvsController extends PublicController
if ($categoryId) {
// if ($hierarchy = $categoryId->getMains()) {
// dd(123);
// }
$mainCats = $this->category_model->getMains($categoryId->id);
$current_cat = $this->category_model->getCat($categoryId->id);
$mainCats[] = $current_cat;
$subCats = $this->category_repository->getSubCatById($categoryId->id);
$allCats = false;
// dd($mainCats);
} else {
$mainCats = $this->category_repository->mainCats();
$allCats = true;

View File

@ -1,8 +1,8 @@
{% if params.category %}
{% for category_breadcrumbs in params.mainCats %}
<li>
<a href="{{ url_route('adv_list_seo', [category_breadcrumbs['slug']]) }}">
{{ category_breadcrumbs['val'] }}
<a href="{{ url_route('adv_list_seo', [category_breadcrumbs.slug]) }}">
{{ category_breadcrumbs.name }}
</a>
</li>
{% endfor %}