1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-28 20:45:00 +03:00
ifhub.club/application/frontend/components/sort/sort.ajax.tpl
Denis Shakhov c31a235423 Компоненты специфичные для lscms перенесены во frontend/components
Остальные перенесены во фреймворк
2015-01-31 19:16:15 +07:00

29 lines
903 B
Smarty

{**
* Блок сортировки
*
* @param array $items
* @param string $label
* @param boolean $showLabel
*}
{$component = 'sort'}
{$items = $smarty.local.items}
{$classes = "{$smarty.local.classes} sort"}
{foreach $items as $item}
{$items[ $item@key ][ 'attributes' ] = array_merge( $items[ $item@key ][ 'attributes' ]|default:[], [
'data-name' => 'sort_by',
'data-value' => $item[ 'name' ],
'data-order' => $item[ 'order' ]|default:'desc'
])}
{/foreach}
{component 'button' template='group' classes=$classes params=$smarty.local.params buttons=[
[ 'text' => $smarty.local.label|default:$aLang.sort.label, 'isDisabled' => true ],
{component 'dropdown'
text = $smarty.local.text|default:'...'
classes = 'js-dropdown-default'
attributes = [ 'data-lsdropdown-selectable' => 'true' ]
menu = $items}
]}