mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-16 21:34:25 +03:00
41 lines
1.6 KiB
Smarty
41 lines
1.6 KiB
Smarty
{**
|
|
* Список постов на стене
|
|
*
|
|
* @param array $posts Список постов
|
|
*}
|
|
|
|
{foreach $smarty.local.posts as $post}
|
|
{$comments = $post->getLastReplyWall()}
|
|
{$postId = $post->getId()}
|
|
|
|
{* Запись *}
|
|
{include './wall.entry.tpl' entry=$post showReply=!$comments classes='wall-post js-wall-post' type='post'}
|
|
|
|
{* Комментарии *}
|
|
<div class="wall-comments js-wall-comment-wrapper" data-id="{$postId}">
|
|
{* Кнопка подгрузки комментариев *}
|
|
{if count( $comments ) < $post->getCountReply()}
|
|
{include 'components/more/more.tpl'
|
|
classes = 'wall-more-comments js-wall-more-comments'
|
|
count = $post->getCountReply() - Config::Get('module.wall.count_last_reply')
|
|
append = 'false'
|
|
attributes = [
|
|
'data-more-target' => ".js-wall-entry-container[data-id={$postId}]",
|
|
'data-proxy-last_id' => $comments[0]->getId(),
|
|
'data-param-target_id' => $postId
|
|
]}
|
|
{/if}
|
|
|
|
{* Комментарии *}
|
|
<div class="js-wall-entry-container" data-id="{$postId}">
|
|
{if $comments}
|
|
{include './wall.comments.tpl' comments=$comments}
|
|
{/if}
|
|
</div>
|
|
|
|
{* Форма добавления комментария *}
|
|
{if $oUserCurrent}
|
|
{include './wall.form.tpl' id=$postId display=$comments placeholder=$aLang.wall.form.fields.text.placeholder_reply}
|
|
{/if}
|
|
</div>
|
|
{/foreach} |