Permalink
Browse files

Merge pull request #2458 from roadster31/brand-fix

Fixed brand sorting by "visible" status
  • Loading branch information...
roadster31 committed Dec 12, 2017
2 parents 3fef289 + 948f2f5 commit 9ce8246141cea245df0140931f70f0eaca9560aa
Showing with 11 additions and 3 deletions.
  1. +9 −1 core/lib/Thelia/Core/Template/Loop/Brand.php
  2. +2 −2 templates/backOffice/default/brands.html
@@ -78,7 +78,9 @@ protected function getArgDefinitions()
'created',
'created-reverse',
'updated',
'updated-reverse'
'updated-reverse',
'visible',
'visible-reverse'
)
)
),
@@ -197,6 +199,12 @@ public function buildModelCriteria()
case "updated-reverse":
$search->addDescendingOrderByColumn('updated_at');
break;
case "visible":
$search->orderByVisible(Criteria::ASC);
break;
case "visible-reverse":
$search->orderByVisible(Criteria::DESC);
break;
}
}
@@ -75,7 +75,7 @@
<th class="text-center">
{admin_sortable_header
current_order=$content_order
current_order=$order
order='visible'
reverse_order='visible-reverse'
path={url path='/admin/brand'}
@@ -313,4 +313,4 @@
{block name="javascript-last-call"}
{hook name='brand.js' location='brand_js'}
{/block}
{/block}

0 comments on commit 9ce8246

Please sign in to comment.