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

106 lines
5.6 KiB
XML
Raw Normal View History

2021-01-27 20:40:37 +03:00
{var author = $post->getOwner()}
<table border="0" style="font-size: 11px;" n:class="post, $post->isExplicit() ? post-nsfw">
<tbody>
<tr>
<td width="54" valign="top">
<a href="{$author->getURL()}">
<img src="{$author->getAvatarURL('miniscule')}" width="50" />
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
</a>
2021-01-27 20:40:37 +03:00
</td>
<td width="100%" valign="top">
<div class="post-author">
<a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a>
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
{$post->isPostedOnBehalfOfGroup() ? tr("post_writes_g") : ($author->isFemale() ? tr("post_writes_f") : tr("post_writes_m"))}
2021-01-27 20:40:37 +03:00
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
{var wallId = $post->getTargetWall()}
{var wallURL = $wallId > -1 ? "/id$wallId" : "/club" . abs($wallId)}
на
<a href="{$wallURL}">
<b>
{if isset($thisUser) && $thisUser->getId() === $wallId}
вашей
{/if}
стене
{if $wallId < 0}
группы
{/if}
</b>
</a>
{/if}
<br/>
2021-09-20 15:19:15 +03:00
<a href="/wall{$post->getPrettyId()}" class="date">
{$post->getPublicationTime()}{if $post->isPinned()}, {_pinned}{/if}
2021-09-20 15:19:15 +03:00
</a>
2021-01-27 20:40:37 +03:00
</div>
<div class="post-content" id="{$post->getPrettyId()}">
<div class="text" id="text{$post->getPrettyId()}">
{$post->getText()|noescape}
<div n:ifcontent class="attachments_b">
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
{include "../attachment.xml", attachment => $attachment}
</div>
</div>
</div>
<div n:if="$post->isAd()" style="color:grey;">
<br/>
&nbsp;! Этот пост был размещён за взятку.
</div>
<div n:if="$post->isSigned()" class="post-signature">
{var actualAuthor = $post->getOwner(false)}
2021-01-27 20:40:37 +03:00
<span>
{_author}:
<a href="{$actualAuthor->getURL()}">
{$actualAuthor->getCanonicalName()}
2021-01-27 20:40:37 +03:00
</a>
</span>
</div>
</div>
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
{if $post->canBeDeletedBy($thisUser) && !($forceNoDeleteLink ?? false)}
<a href="/wall{$post->getPrettyId()}/delete">{_delete}</a> &nbsp;|&nbsp;
{/if}
{if $post->canBePinnedBy($thisUser) && !($forceNoPinLink ?? false)}
2021-09-20 15:19:15 +03:00
{if $post->isPinned()}
<a href="/wall{$post->getPrettyId()}/pin?act=unpin&hash={rawurlencode($csrfToken)}">{_unpin}</a>
2021-09-20 15:19:15 +03:00
{else}
<a href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}">{_pin}</a>
2021-09-20 15:19:15 +03:00
{/if}
&nbsp;|&nbsp;
2021-01-27 20:40:37 +03:00
{/if}
<a n:if="!($forceNoCommentsLink ?? false)" href="/wall{$post->getPrettyId()}#comments">
{_comments}
{if $post->getCommentsCount() > 0}
(<b>{$post->getCommentsCount()}</b>)
{/if}
</a>
{if !($forceNoCommentsLink ?? false) && !($forceNoShareLink ?? false)}
2021-01-27 20:40:37 +03:00
&nbsp;|&nbsp;
{/if}
<a n:if="!($forceNoShareLink ?? false)" class="post-share-button" href="javascript:repostPost('{$post->getPrettyId()}', '{rawurlencode($csrfToken)}')">
{_share}
{if $post->getRepostCount() > 0}
(<b>{$post->getRepostCount()}</b>)
{/if}
</a>
<div n:if="!($forceNoLike ?? false)" class="like_wrap">
{var liked = $post->hasLikeFrom($thisUser)}
<a href="/wall{$post->getPrettyId()}/like?hash={rawurlencode($csrfToken)}" class="post-like-button" data-liked="{(int) $liked}" data-likes="{$post->getLikesCount()}">
<div class="heart" id="{if $liked}liked{/if}"></div>
<span class="likeCnt">{if $post->getLikesCount() > 0}{$post->getLikesCount()}{/if}</span>
</a>
</div>
2021-01-27 20:40:37 +03:00
</div>
</td>
</tr>
</tbody>
</table>