openvk/Web/Presenters/templates/components/post.xml

13 lines
484 B
XML
Raw Permalink Normal View History

2021-01-27 20:40:37 +03:00
{var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false}
2021-10-15 18:36:21 +03:00
{if !$post->isPostedOnBehalfOfGroup()}
{var then = date_create("@" . $post->getOwner()->getOnline()->timestamp())}
{var now = date_create()}
{var diff = date_diff($now, $then)}
{/if}
2021-01-27 20:40:37 +03:00
{if $microblogEnabled}
2021-11-28 14:39:42 +03:00
{include "post/microblogpost.xml", post => $post, diff => $diff, commentSection => $commentSection}
2021-01-27 20:40:37 +03:00
{else}
2021-10-15 18:36:21 +03:00
{include "post/oldpost.xml", post => $post, diff => $diff}
2021-01-27 20:40:37 +03:00
{/if}