1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-08 01:14:24 +03:00
ifhub.club/application/frontend/skin/developer/components/field/field.select.tpl

17 lines
564 B
Smarty
Raw Normal View History

2014-05-10 18:37:29 +03:00
{**
* Выпадающий список
*}
{extends './field.tpl'}
{block 'field_input'}
<select {field_input_attr_common useValue=false} {if $smarty.local.isMultiple}multiple{/if}>
{foreach $smarty.local.items as $item}
{$isSelected = ( is_array( $selectedValue ) ) ? in_array( $item.value, $selectedValue ) : ( $item.value == $selectedValue )}
<option value="{$item.value}" {if $isSelected}selected{/if}>
{$item.text|indent:( $item.level * 5 ):'&nbsp;'}
</option>
2014-05-10 18:37:29 +03:00
{/foreach}
</select>
{/block}