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/components/activity/activity.tpl

41 lines
1.2 KiB
Smarty
Raw Normal View History

2014-07-18 18:45:16 +03:00
{**
* Список событий активности
*
* @param array $events
* @param integer $targetId
* @param integer $count
*
* @param string $mods
* @param string $classes
* @param string $attributes
2014-07-18 18:45:16 +03:00
*}
{$component = 'activity'}
2016-01-19 04:34:44 +02:00
{$jsprefix = 'js-activity'}
2016-01-24 09:41:21 +02:00
{component_define_params params=[ 'events', 'count', 'targetId', 'mods', 'classes', 'attributes' ]}
2014-07-18 18:45:16 +03:00
2016-01-19 04:34:44 +02:00
{$moreCount = $count - count($events)}
2014-07-19 19:50:52 +03:00
2016-01-19 04:34:44 +02:00
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes}>
{if $events}
{* Список *}
2016-01-19 04:34:44 +02:00
<ul class="activity-event-list {$jsprefix}-event-list">
{component 'activity' template='event-list' events=$events}
</ul>
2014-07-18 18:45:16 +03:00
{* Кнопка подгрузки *}
2016-01-19 04:34:44 +02:00
{if $count > Config::Get('module.stream.count_default')}
{$last = end($events)}
2014-07-18 18:45:16 +03:00
{component 'more'
2015-11-01 06:19:47 +02:00
count = $moreCount
2016-01-19 04:34:44 +02:00
classes = "{$jsprefix}-more"
ajaxParams = [
'last_id' => $last->getId(),
2016-01-19 04:34:44 +02:00
'target_id' => $targetId
]}
{/if}
{else}
2015-04-08 14:41:06 +03:00
{component 'blankslate' text=$aLang.common.empty}
{/if}
2014-07-18 18:45:16 +03:00
</div>