mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-28 20:45:00 +03:00
Доработка локальных переменных в компонентах
This commit is contained in:
parent
4897bfdef3
commit
70006480b3
|
@ -36,7 +36,7 @@
|
|||
|
||||
<div class="{$component} {cmods name=$component mods=$mods} {if $isActive}active{/if} {$smarty.local.classes}"
|
||||
data-param-i-target-id="{$target->getId()}"
|
||||
title="{$aLang.$component[ ($isActive) ? 'remove' : 'add' ]}"
|
||||
title="{$aLang.favourite[ ($isActive) ? 'remove' : 'add' ]}"
|
||||
{cattr list=$smarty.local.attributes}>
|
||||
|
||||
{* Кнопка добавления/удаления из избранного *}
|
||||
|
|
|
@ -9,10 +9,7 @@
|
|||
*}
|
||||
|
||||
{$component = 'ls-poll-form-answer-item'}
|
||||
|
||||
{foreach [ 'item', 'index', 'allowRemove', 'showRemove', 'isTemplate' ] as $param}
|
||||
{assign var="$param" value=$smarty.local.$param}
|
||||
{/foreach}
|
||||
{component_define_params params=[ 'item', 'index', 'allowRemove', 'showRemove', 'isTemplate' ]}
|
||||
|
||||
{$allowUpdate = $allowUpdate|default:true}
|
||||
{$allowRemove = $allowRemove|default:true}
|
||||
|
|
|
@ -3,12 +3,7 @@
|
|||
*}
|
||||
|
||||
{$component = 'ls-talk-message-root'}
|
||||
|
||||
{* Генерируем копии локальных переменных, *}
|
||||
{* чтобы их можно было изменять в дочерних шаблонах *}
|
||||
{foreach [ 'talk', 'mods', 'classes', 'attributes' ] as $param}
|
||||
{assign var="$param" value=$smarty.local.$param}
|
||||
{/foreach}
|
||||
{component_define_params params=[ 'talk', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
|
||||
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes}>
|
||||
|
|
|
@ -8,12 +8,7 @@
|
|||
*}
|
||||
|
||||
{$component = 'ls-topic'}
|
||||
|
||||
{* Генерируем копии локальных переменных, *}
|
||||
{* чтобы их можно было изменять в дочерних шаблонах *}
|
||||
{foreach [ 'topic', 'isPreview', 'isList', 'mods', 'classes', 'attributes' ] as $param}
|
||||
{assign var="$param" value=$smarty.local.$param}
|
||||
{/foreach}
|
||||
{component_define_params params=[ 'topic', 'isPreview', 'isList', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
{$user = $topic->getUser()}
|
||||
{$type = ($topic->getType()) ? $topic->getType() : $smarty.local.type}
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
*}
|
||||
|
||||
{$component = 'user-field-choose'}
|
||||
|
||||
{* Генерируем копии локальных переменных, *}
|
||||
{* чтобы их можно было изменять в дочерних шаблонах *}
|
||||
{foreach [ 'name', 'label', 'lang_choose', 'mods', 'classes', 'attributes' ] as $param}
|
||||
{assign var="$param" value=$smarty.local.$param}
|
||||
{/foreach}
|
||||
{component_define_params params=[ 'name', 'label', 'lang_choose', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
{$label = $label|default:{lang 'user.choose.label'}}
|
||||
{$lang_choose = $lang_choose|default:{lang 'user.choose.choose'}}
|
||||
|
|
Loading…
Reference in a new issue