2014-07-07 13:50:14 +03:00
|
|
|
|
{**
|
|
|
|
|
* Стена
|
|
|
|
|
*
|
2014-07-15 15:08:52 +03:00
|
|
|
|
* @param array $posts Посты
|
|
|
|
|
* @param array $count Общее кол-во постов на стене
|
|
|
|
|
* @param array $lastId ID последнего загруженного поста
|
|
|
|
|
* @param array $classes Доп-ые классы
|
|
|
|
|
* @param array $mods Модификаторы
|
|
|
|
|
* @param array $attributes Атрибуты
|
2014-07-07 13:50:14 +03:00
|
|
|
|
*}
|
|
|
|
|
|
|
|
|
|
{* Название компонента *}
|
|
|
|
|
{$component = 'wall'}
|
|
|
|
|
|
2014-07-15 15:08:52 +03:00
|
|
|
|
{$loadedCount = count($smarty.local.posts)}
|
|
|
|
|
{$moreCount = $smarty.local.count - $loadedCount}
|
2014-07-07 13:50:14 +03:00
|
|
|
|
|
|
|
|
|
{* Стена *}
|
2014-07-15 15:08:52 +03:00
|
|
|
|
<div class="{$component} {mod name=$component mods=$smarty.local.mods} {$smarty.local.classes}" data-user-id="{$oUserProfile->getId()}" {$smarty.local.attributes}>
|
2014-11-06 18:51:24 +02:00
|
|
|
|
{* Форма добавления записи *}
|
|
|
|
|
{if $oUserCurrent}
|
|
|
|
|
{include './wall.form.tpl'}
|
|
|
|
|
{else}
|
|
|
|
|
{include 'components/alert/alert.tpl' text=$aLang.wall.alerts.unregistered mods='info' classes='mt-15'}
|
|
|
|
|
{/if}
|
2014-07-07 13:50:14 +03:00
|
|
|
|
|
2014-11-06 18:51:24 +02:00
|
|
|
|
{* Список записей *}
|
|
|
|
|
<div class="js-wall-entry-container" data-id="0">
|
|
|
|
|
{include './wall.posts.tpl' posts=$smarty.local.posts}
|
|
|
|
|
</div>
|
2014-07-07 13:50:14 +03:00
|
|
|
|
|
2014-11-06 18:51:24 +02:00
|
|
|
|
{* Уведомление о пустом списке *}
|
|
|
|
|
{if $oUserCurrent || ( ! $oUserCurrent && ! $loadedCount )}
|
|
|
|
|
{include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty' classes='mt-15 js-wall-alert-empty' attributes='id="wall-empty"' visible=!$loadedCount}
|
|
|
|
|
{/if}
|
2014-07-07 13:50:14 +03:00
|
|
|
|
|
2014-11-06 18:51:24 +02:00
|
|
|
|
{* Кнопка подгрузки записей *}
|
|
|
|
|
{if $moreCount}
|
|
|
|
|
{include 'components/more/more.tpl'
|
|
|
|
|
classes = 'js-wall-more'
|
|
|
|
|
count = $moreCount
|
|
|
|
|
attributes = [
|
|
|
|
|
'data-more-target' => '.js-wall-entry-container[data-id=0]',
|
|
|
|
|
'data-proxy-last_id' => $smarty.local.lastId
|
|
|
|
|
]}
|
|
|
|
|
{/if}
|
2014-07-07 13:50:14 +03:00
|
|
|
|
</div>
|