2014-07-18 18:45:16 +03:00
|
|
|
{**
|
|
|
|
* Список событий активности
|
|
|
|
*
|
|
|
|
* @param array $events
|
|
|
|
* @param integer $targetId
|
|
|
|
* @param integer $count
|
2014-11-05 17:45:27 +02:00
|
|
|
*
|
|
|
|
* @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}>
|
2014-11-06 18:51:24 +02:00
|
|
|
{if $events}
|
|
|
|
{* Список *}
|
2016-01-19 04:34:44 +02:00
|
|
|
<ul class="activity-event-list {$jsprefix}-event-list">
|
2015-06-17 08:58:47 +03:00
|
|
|
{component 'activity' template='event-list' events=$events}
|
2014-11-06 18:51:24 +02:00
|
|
|
</ul>
|
2014-07-18 18:45:16 +03:00
|
|
|
|
2014-11-06 18:51:24 +02:00
|
|
|
{* Кнопка подгрузки *}
|
2016-01-19 04:34:44 +02:00
|
|
|
{if $count > Config::Get('module.stream.count_default')}
|
2014-11-06 18:51:24 +02:00
|
|
|
{$last = end($events)}
|
2014-07-18 18:45:16 +03:00
|
|
|
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'more'
|
2015-11-01 06:19:47 +02:00
|
|
|
count = $moreCount
|
2016-01-19 04:34:44 +02:00
|
|
|
classes = "{$jsprefix}-more"
|
2015-01-27 15:48:47 +02:00
|
|
|
ajaxParams = [
|
|
|
|
'last_id' => $last->getId(),
|
2016-01-19 04:34:44 +02:00
|
|
|
'target_id' => $targetId
|
2015-01-27 15:48:47 +02:00
|
|
|
]}
|
2014-11-06 18:51:24 +02:00
|
|
|
{/if}
|
|
|
|
{else}
|
2015-04-08 14:41:06 +03:00
|
|
|
{component 'blankslate' text=$aLang.common.empty}
|
2014-11-06 18:51:24 +02:00
|
|
|
{/if}
|
2014-07-18 18:45:16 +03:00
|
|
|
</div>
|