1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00
ifhub.club/application/frontend/components/activity/activity.tpl
2016-01-24 14:41:21 +07:00

41 lines
1.2 KiB
Smarty

{**
* Список событий активности
*
* @param array $events
* @param integer $targetId
* @param integer $count
*
* @param string $mods
* @param string $classes
* @param string $attributes
*}
{$component = 'activity'}
{$jsprefix = 'js-activity'}
{component_define_params params=[ 'events', 'count', 'targetId', 'mods', 'classes', 'attributes' ]}
{$moreCount = $count - count($events)}
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes}>
{if $events}
{* Список *}
<ul class="activity-event-list {$jsprefix}-event-list">
{component 'activity' template='event-list' events=$events}
</ul>
{* Кнопка подгрузки *}
{if $count > Config::Get('module.stream.count_default')}
{$last = end($events)}
{component 'more'
count = $moreCount
classes = "{$jsprefix}-more"
ajaxParams = [
'last_id' => $last->getId(),
'target_id' => $targetId
]}
{/if}
{else}
{component 'blankslate' text=$aLang.common.empty}
{/if}
</div>