mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-16 13:24:26 +03:00
37 lines
1.3 KiB
Smarty
37 lines
1.3 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'
|
|
sClasses = 'wall-more-comments js-wall-more-comments'
|
|
iCount = $post->getCountReply() - Config::Get('module.wall.count_last_reply')
|
|
bAppend = 'false'
|
|
sAttributes = "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} |