openvk/Web/Presenters/templates/Group/Suggested.xml
mrilyew 73a067a0c5
feat: ajax infinite scrolling (#1141)
* rewrite

* allow comments scroll

* rework to up button

* add posts scrolling function and ability to disabl

* cloudflare bypass (do not uncomment)
2024-11-22 16:31:07 +03:00

34 lines
1.7 KiB
XML

{extends "../@layout.xml"}
{block title}{_suggested} {$club->getCanonicalName()}{/block}
{block header}
<a href="{$club->getURL()}">{$club->getName()}</a>
» {if $type == "my"}{_suggested_posts_by_you}{else}{_suggested_posts_by_everyone}{/if}
{/block}
{block content}
{if $count < 1}
{include "../components/error.xml", title => "", description => $type == "my" ? tr("no_suggested_posts_by_you") : tr("no_suggested_posts_by_people")}
{else}
<h4 id="cound">{if $type == "my"}{tr("suggested_posts_in_group_by_you", $count)}{else}{tr("suggested_posts_in_group", $count)}{/if}</h4>
<div id="postz" class="infContainer scroll_container">
{var $microblog = $thisUser->hasMicroblogEnabled()}
<div class="infObj scroll_node" n:foreach="$posts as $post">
{if $microblog}
{include "../components/post/microblogpost.xml", post => $post, commentSection => false, suggestion => true, forceNoCommentsLink => true, forceNoPinLink => true, forceNoLike => true, forceNoShareLink => true, forceNoDeleteLink => false}
{else}
{include "../components/post/oldpost.xml", post => $post, commentSection => false, suggestion => true, forceNoCommentsLink => true, forceNoPinLink => true, forceNoLike => true, forceNoShareLink => true, forceNoDeleteLink => false}
{/if}
</div>
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($posts),
"perPage" => OPENVK_DEFAULT_PER_PAGE,
"atBottom" => true,
]}
</div>
{/if}
{/block}