mirror of
https://github.com/openvk/openvk
synced 2024-12-25 18:11:07 +03:00
49 lines
2.7 KiB
XML
49 lines
2.7 KiB
XML
{var author = $comment->getOwner()}
|
|
{var $Club = openvk\Web\Models\Entities\Club::class}
|
|
{var postId = $comment->getTarget() instanceof \openvk\Web\Models\Entities\Post ? $comment->getTarget()->getId() : NULL}
|
|
|
|
<a name="cid={$comment->getId()}"></a>
|
|
<table border="0" style="font-size: 11px;" class="post comment" id="_comment{$comment->getId()}" data-comment-id="{$comment->getId()}" data-owner-id="{$author->getId()}" data-from-group="{$comment->getOwner() instanceof $Club}" n:attr="data-post-id => $postId">
|
|
<tbody>
|
|
<tr>
|
|
<td width="30" valign="top">
|
|
<img
|
|
src="{$author->getAvatarURL()}"
|
|
width="30"
|
|
class="cCompactAvatars" />
|
|
</td>
|
|
<td width="100%" valign="top">
|
|
<div class="post-author">
|
|
<a href="{$author->getURL()}"><b>
|
|
{$author->getCanonicalName()}
|
|
</b></a><br/>
|
|
</div>
|
|
<div class="post-content" id="{$comment->getId()}">
|
|
<div class="text" id="text{$comment->getId()}">
|
|
{$comment->getText()|noescape}
|
|
|
|
<div n:ifcontent class="attachments_b">
|
|
<div class="attachment" n:foreach="$comment->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
|
{include "attachment.xml", attachment => $attachment}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
|
|
<a href="#_comment{$comment->getId()}" class="date">{$comment->getPublicationTime()}</a> |
|
|
{if $comment->canBeDeletedBy($thisUser)}
|
|
<a href="/comment{$comment->getId()}/delete">{_"delete"}</a> |
|
|
{/if}
|
|
<a class="comment-reply">{_"reply"}</a>
|
|
<div style="float: right; font-size: .7rem;">
|
|
<a class="post-like-button" href="/comment{$comment->getId()}/like?hash={rawurlencode($csrfToken)}">
|
|
<div class="heart" style="{if $comment->hasLikeFrom($thisUser)}opacity: 1;{else}opacity: 0.4;{/if}"></div>
|
|
<span class="likeCnt">{if $comment->getLikesCount() > 0}{$comment->getLikesCount()}{/if}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|