1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-04 23:44:25 +03:00
ifhub.club/application/frontend/components/sort/sort.ajax.tpl
Denis Shakhov 19239e8b79 Добавление префикса ls компонентам
+ Обновление фреймворка
2015-05-20 23:27:10 +07:00

29 lines
914 B
Smarty

{**
* Блок сортировки
*
* @param array $items
* @param string $label
* @param boolean $showLabel
*}
{$component = 'ls-sort'}
{$items = $smarty.local.items}
{$classes = "{$smarty.local.classes} {$component}"}
{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}
]}