refactor: cleanup and move the sorting dropdown to right

staging
Dinesh Salunke 2023-11-03 16:28:47 +05:30
parent 4106adbd65
commit 64f76a536b
1 changed files with 13 additions and 29 deletions

View File

@ -22,35 +22,19 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<div id="js-product-list-top" class="row products-selection"> <div id="js-product-list-top" class="flex w-full justify-between">
<div class="col-md-6 hidden-sm-down total-products"> {if !empty($listing.rendered_facets)}
{if $listing.pagination.total_items > 1} <div class="col-sm-3 col-xs-4 hidden-md-up filter-button">
<p>{l s='There are %product_count% products.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.pagination.total_items]}</p> <button id="search_filter_toggler" class="btn btn-secondary">
{elseif $listing.pagination.total_items > 0} {l s='Filter' d='Shop.Theme.Actions'}
<p>{l s='There is 1 product.' d='Shop.Theme.Catalog'}</p> </button>
{/if}
</div>
<div class="col-md-6">
<div class="row sort-by-row">
{block name='sort_by'}
{include file='catalog/_partials/sort-orders.tpl' sort_orders=$listing.sort_orders}
{/block}
{if !empty($listing.rendered_facets)}
<div class="col-sm-3 col-xs-4 hidden-md-up filter-button">
<button id="search_filter_toggler" class="btn btn-secondary">
{l s='Filter' d='Shop.Theme.Actions'}
</button>
</div>
{/if}
</div> </div>
</div> {else}
<div class="col-sm-12 hidden-md-up text-sm-center showing"> <div></div>
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=[ {/if}
'%from%' => $listing.pagination.items_shown_from , <div class="relative flex gap-4">
'%to%' => $listing.pagination.items_shown_to, {block name='sort_by'}
'%total%' => $listing.pagination.total_items {include file='catalog/_partials/sort-orders.tpl' sort_orders=$listing.sort_orders}
]} {/block}
</div> </div>
</div> </div>