2014-01-25 14:41:11 +02:00
|
|
|
{**
|
|
|
|
* Блок сортировки
|
|
|
|
*
|
|
|
|
* @param string $sSortName
|
|
|
|
* @param array $aSortList
|
|
|
|
* @param string $sSortOrder
|
|
|
|
* @param string $sSortOrderWay
|
|
|
|
* @param string $sSortLabel
|
|
|
|
* @param boolean $bSortShowLabel
|
|
|
|
*
|
|
|
|
* @styles assets/css/sort.css
|
|
|
|
*}
|
|
|
|
|
2014-03-04 10:34:05 +02:00
|
|
|
<div class="sort {$sSortClasses}">
|
|
|
|
{if $bSortShowLabel|default:true}
|
|
|
|
<div class="sort-label">{if $sSortLabel}{$sSortLabel}{else}{$aLang.sort.label}{/if}</div>
|
|
|
|
{/if}
|
2014-01-25 14:41:11 +02:00
|
|
|
|
2014-03-04 10:34:05 +02:00
|
|
|
<div class="dropdown dropdown-toggle js-dropdown-default" data-dropdown-target="js-dropdown-sort-{$sSortName}" data-dropdown-selectable="true">...</div>
|
2014-01-25 14:41:11 +02:00
|
|
|
|
2014-03-04 10:34:05 +02:00
|
|
|
<ul class="dropdown-menu" id="js-dropdown-sort-{$sSortName}">
|
|
|
|
{foreach $aSortList as $aSortItem}
|
|
|
|
{$bIsActive = $sSortOrder == $aSortItem['name']}
|
2014-01-25 14:41:11 +02:00
|
|
|
|
2014-03-04 10:34:05 +02:00
|
|
|
<li {if $bIsActive}class="active" title="{if $sSortOrderWay == 'asc'}asc{else}desc{/if}"{/if}>
|
|
|
|
<a href="{$sSortUrl}?order={$aSortItem['name']}&order_way={if $bIsActive}{if $sSortOrderWay == 'asc'}desc{else}asc{/if}{else}asc{/if}">
|
|
|
|
{$aSortItem['text']}
|
|
|
|
{if $bIsActive}{if $sSortOrderWay == 'asc'}↓{else}↑{/if}{/if}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{/foreach}
|
|
|
|
</ul>
|
|
|
|
</div>
|