2022-04-24 08:06:45 +03:00
|
|
|
{var $author = $comment->getOwner()}
|
2021-12-04 22:46:26 +03:00
|
|
|
{var $Club = openvk\Web\Models\Entities\Club::class}
|
2024-11-01 14:46:41 +03:00
|
|
|
{var $likesCount = $comment->getLikesCount()}
|
|
|
|
{var $target = $comment->getTarget()}
|
|
|
|
{var $postId = $target instanceof \openvk\Web\Models\Entities\Post ? $target->getId() : NULL}
|
2020-06-07 19:04:43 +03:00
|
|
|
|
|
|
|
<a name="cid={$comment->getId()}"></a>
|
2024-11-17 13:03:49 +03:00
|
|
|
<table data-id="1_{$comment->getId()}" 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="{$author instanceof $Club}" n:attr="data-post-id => $postId">
|
2020-06-07 19:04:43 +03:00
|
|
|
<tbody>
|
|
|
|
<tr>
|
2021-11-28 14:39:42 +03:00
|
|
|
<td width="30" valign="top">
|
2022-02-05 20:24:46 +03:00
|
|
|
<a href="{$author->getURL()}">
|
2023-09-16 19:14:23 +03:00
|
|
|
<img src="{$author->getAvatarURL('miniscule')}" width="30" class="cCompactAvatars post-avatar" />
|
2022-02-05 20:24:46 +03:00
|
|
|
</a>
|
2020-06-07 19:04:43 +03:00
|
|
|
</td>
|
2021-11-30 18:34:07 +03:00
|
|
|
<td width="100%" valign="top">
|
2020-06-07 19:04:43 +03:00
|
|
|
<div class="post-author">
|
2023-09-16 19:14:23 +03:00
|
|
|
<a href="{$author->getURL()}"><b class="post-author-name">
|
2020-06-07 19:04:43 +03:00
|
|
|
{$author->getCanonicalName()}
|
2022-01-08 17:01:29 +03:00
|
|
|
</b></a>
|
2022-03-24 15:29:00 +03:00
|
|
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png"><br/>
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|
|
|
|
<div class="post-content" id="{$comment->getId()}">
|
|
|
|
<div class="text" id="text{$comment->getId()}">
|
2024-11-17 13:03:49 +03:00
|
|
|
<span class="really_text">{$comment->getText()|noescape}</span>
|
2021-10-12 14:17:21 +03:00
|
|
|
|
2023-10-03 19:40:13 +03:00
|
|
|
{var $attachmentsLayout = $comment->getChildrenWithLayout(288)}
|
|
|
|
<div n:ifcontent class="attachments attachments_b" style="height: {$attachmentsLayout->height|noescape}; width: {$attachmentsLayout->width|noescape};">
|
|
|
|
<div class="attachment" n:foreach="$attachmentsLayout->tiles as $attachment" style="float: {$attachment[3]|noescape}; width: {$attachment[0]|noescape}; height: {$attachment[1]|noescape};" data-localized-nsfw-text="{_nsfw_warning}">
|
2024-11-17 13:03:49 +03:00
|
|
|
{include "attachment.xml", attachment => $attachment[2], parent => $comment, parentType => "comment", tilesCount => sizeof($attachmentsLayout->tiles)}
|
2023-10-03 19:40:13 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div n:ifcontent class="attachments attachments_m">
|
|
|
|
<div class="attachment" n:foreach="$attachmentsLayout->extras as $attachment">
|
|
|
|
{include "attachment.xml", attachment => $attachment, post => $comment}
|
2021-10-12 14:17:21 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|
|
|
|
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
|
2024-10-25 16:28:35 +03:00
|
|
|
<a href="{if $correctLink}{$comment->getTargetURL()}{/if}#_comment{$comment->getId()}" class="date">{$comment->getPublicationTime()}
|
2023-09-14 20:54:22 +03:00
|
|
|
<span n:if="$comment->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
2023-08-15 02:12:48 +03:00
|
|
|
</a>
|
2023-08-11 16:50:19 +03:00
|
|
|
{if !$timeOnly}
|
|
|
|
{if $comment->canBeDeletedBy($thisUser)}
|
2024-11-01 14:46:41 +03:00
|
|
|
|
|
2024-10-25 16:28:35 +03:00
|
|
|
<a href="/comment{$comment->getId()}/delete">{_delete}</a>
|
2023-08-11 16:50:19 +03:00
|
|
|
{/if}
|
2023-09-14 20:54:22 +03:00
|
|
|
{if $comment->canBeEditedBy($thisUser)}
|
2024-10-25 16:28:35 +03:00
|
|
|
|
|
|
|
|
<a id="editPost" data-id="{$comment->getId()}">{_edit}</a>
|
2023-09-14 20:54:22 +03:00
|
|
|
{/if}
|
2024-10-25 16:28:35 +03:00
|
|
|
{if !$no_reply_button}
|
|
|
|
|
|
|
|
|
<a class="comment-reply">{_reply}</a>
|
|
|
|
{/if}
|
|
|
|
{if $thisUser->getId() != $author->getRealId()}
|
|
|
|
|
|
2023-08-11 16:50:19 +03:00
|
|
|
{var $canReport = true}
|
2024-12-07 17:18:29 +03:00
|
|
|
<a href="javascript:reportComment({$comment->getId()})">{_report}</a>
|
2023-08-11 16:50:19 +03:00
|
|
|
{/if}
|
|
|
|
<div style="float: right; font-size: .7rem;">
|
2024-11-22 21:27:21 +03:00
|
|
|
<a class="post-like-button" href="/comment{$comment->getId()}/like?hash={rawurlencode($csrfToken)}" data-likes='{$likesCount}' data-id="1_{$comment->getPrettyId()}" data-type='comment'>
|
2023-08-11 16:50:19 +03:00
|
|
|
<div class="heart" style="{if $comment->hasLikeFrom($thisUser)}opacity: 1;{else}opacity: 0.4;{/if}"></div>
|
2024-11-01 14:46:41 +03:00
|
|
|
<span class="likeCnt">{if $likesCount > 0}{$likesCount}{/if}</span>
|
2023-08-11 16:50:19 +03:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{/if}
|
2023-08-11 17:17:56 +03:00
|
|
|
|
|
|
|
<span n:if="$compact ?? false">
|
|
|
|
|
2023-08-11 17:10:18 +03:00
|
|
|
| <a
|
2024-10-25 16:28:35 +03:00
|
|
|
href="#_comment{$comment->getId()}"
|
2023-08-11 17:10:18 +03:00
|
|
|
class="date"
|
|
|
|
>{$comment->getPublicationTime()}</a>
|
2023-08-11 17:17:56 +03:00
|
|
|
|
|
|
|
</span>
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-17 13:03:49 +03:00
|
|
|
<div class='post-edit'></div>
|
2020-06-07 19:04:43 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|