openvk/Web/Presenters/templates/components/post.xml
2021-10-15 18:36:21 +03:00

12 lines
449 B
XML

{var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false}
{if !$post->isPostedOnBehalfOfGroup()}
{var then = date_create("@" . $post->getOwner()->getOnline()->timestamp())}
{var now = date_create()}
{var diff = date_diff($now, $then)}
{/if}
{if $microblogEnabled}
{include "post/microblogpost.xml", post => $post, diff => $diff}
{else}
{include "post/oldpost.xml", post => $post, diff => $diff}
{/if}