1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 16:04:24 +03:00
ifhub.club/application/frontend/components/activity/activity.tpl
2015-11-01 11:19:47 +07:00

40 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'}
{$events = $smarty.local.events}
{$moreCount = $smarty.local.count - count($events)}
<div class="{$component} {cmods name=$component mods=$smarty.local.mods} {$smarty.local.classes}" {cattr list=$smarty.local.attributes}>
{if $events}
{* Список *}
<ul class="activity-event-list js-activity-event-list">
{component 'activity' template='event-list' events=$events}
</ul>
{* Кнопка подгрузки *}
{if $smarty.local.count > Config::Get('module.stream.count_default')}
{$last = end($events)}
{component 'more'
count = $moreCount
classes = 'js-activity-more'
ajaxParams = [
'last_id' => $last->getId(),
'target_id' => $smarty.local.targetId
]}
{/if}
{else}
{component 'blankslate' text=$aLang.common.empty}
{/if}
</div>