mirror of
https://github.com/openvk/openvk
synced 2024-12-24 01:21:07 +03:00
168 lines
9.8 KiB
XML
168 lines
9.8 KiB
XML
{var $author = $post->getOwner()}
|
|
{var $platform = $post->getPlatform()}
|
|
{var $platformDetails = $post->getPlatformDetails()}
|
|
{if $post->isDeactivationMessage() && $post->getText()}
|
|
{var $deac = "post_deact"}
|
|
{else}
|
|
{var $deac = "post_deact_silent"}
|
|
{/if}
|
|
|
|
|
|
|
|
<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')}" class="post-avatar" width="50" />
|
|
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
|
|
</a>
|
|
</td>
|
|
<td width="100%" valign="top">
|
|
<div class="post-author">
|
|
<a href="{$author->getURL()}"><b class="post-author-name">{$author->getCanonicalName()}</b></a>
|
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
|
|
{if $post->isDeactivationMessage()}
|
|
{$author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")}
|
|
{elseif $post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup()}
|
|
{$author->isFemale() ? tr("upd_f") : tr("upd_m")}
|
|
{elseif $post->isUpdateAvatarMessage() && $post->isPostedOnBehalfOfGroup()}
|
|
{tr("upd_g")}
|
|
{elseif $post->isPostedOnBehalfOfGroup()}
|
|
{_post_writes_g}
|
|
{else}
|
|
{if $author->isFemale()}
|
|
{_post_writes_f}
|
|
{elseif $author->isNeutral()}
|
|
{_post_writes_g}
|
|
{else}
|
|
{_post_writes_m}
|
|
{/if}
|
|
{/if}
|
|
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
|
|
{var $wallOwner = $post->getWallOwner()}
|
|
<a href="{$wallOwner->getURL()}" class="mention" data-mention-ref="{$post->getTargetWall()}">
|
|
<b>
|
|
{if isset($thisUser) && $thisUser->getId() === $post->getTargetWall()}
|
|
{_post_on_your_wall}
|
|
{elseif $wallOwner instanceof \openvk\Web\Models\Entities\Club}
|
|
{tr("post_on_group_wall", ovk_proc_strtr($wallOwner->getName(), 52))}
|
|
{else}
|
|
{tr("post_on_user_wall", $wallOwner->getMorphedName("genitive", false))}
|
|
{/if}
|
|
</b>
|
|
</a>
|
|
{/if}
|
|
<br/>
|
|
<a href="{if !$suggestion}/wall{$post->getPrettyId()}{else}javascript:void(0){/if}" class="date">
|
|
{$post->getPublicationTime()} <span n:if="$post->getEditTime()" class="editedMark">({_edited_short})</span>{if $post->isPinned()}, {_pinned}{/if}
|
|
|
|
<a n:if="!empty($platform)" class="client_app" data-app-tag="{$platform}" data-app-name="{$platformDetails['name']}" data-app-url="{$platformDetails['url']}" data-app-img="{$platformDetails['img']}">
|
|
<img src="/assets/packages/static/openvk/img/app_icons_mini/{$post->getPlatform(this)}.svg">
|
|
</a>
|
|
</a>
|
|
</div>
|
|
<div class="post-content" id="{$post->getPrettyId()}">
|
|
<div class="text" id="text{$post->getPrettyId()}">
|
|
{var $owner = $author->getId()}
|
|
|
|
<span data-text="{$post->getText(false)}" class="really_text">{$post->getText()|noescape}</span>
|
|
|
|
{var $width = ($GLOBALS["_bigWall"] ?? false) ? 550 : 320}
|
|
{if isset($GLOBALS["_nesAttGloCou"])}
|
|
{var $width = $width - 70 * $GLOBALS["_nesAttGloCou"]}
|
|
{/if}
|
|
{var $attachmentsLayout = $post->getChildrenWithLayout($width)}
|
|
<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}">
|
|
{include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post"}
|
|
</div>
|
|
</div>
|
|
|
|
<div n:ifcontent class="attachments attachments_m">
|
|
<div class="attachment" n:foreach="$attachmentsLayout->extras as $attachment">
|
|
{include "../attachment.xml", attachment => $attachment}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div n:if="$suggestion && $post->canBePinnedBy($thisUser ?? NULL)" class="suggestionControls" style="margin-bottom: 7px;">
|
|
<input type="button" class="button" id="publish_post" data-id="{$post->getId()}" value="{_publish_suggested}">
|
|
<input type="button" class="button" id="decline_post" data-id="{$post->getId()}" value="{_decline_suggested}">
|
|
</div>
|
|
<div n:if="$post->isAd()" style="color:grey;">
|
|
<br/>
|
|
! {_post_is_ad}
|
|
</div>
|
|
<div n:if="$post->isSigned()" class="post-signature">
|
|
{var $actualAuthor = $post->getOwner(false)}
|
|
<span>
|
|
{_author}:
|
|
<a href="{$actualAuthor->getURL()}" class="mention" data-mention-ref="{$actualAuthor->getId()}">
|
|
{$actualAuthor->getCanonicalName()}
|
|
</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div n:if="!($compact ?? false)" class="post-menu">
|
|
{if is_null($thisUser)}
|
|
{var $forceNoDeleteLink = true}
|
|
{var $forceNoPinLink = true}
|
|
{/if}
|
|
|
|
{if !($forceNoEditLink ?? false) && $post->canBeEditedBy($thisUser)}
|
|
<a id="editPost"
|
|
data-id="{$post->getId()}"
|
|
data-nsfw="{(int)$post->isExplicit()}"
|
|
{if $post->getTargetWall() < 0 && $post->getWallOwner()->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>{_edit}</a> |
|
|
{/if}
|
|
|
|
{if !($forceNoDeleteLink ?? false) && $post->canBeDeletedBy($thisUser)}
|
|
<a href="/wall{$post->getPrettyId()}/delete">{_delete}</a> |
|
|
{/if}
|
|
|
|
{if !($forceNoPinLink ?? false) && $post->canBePinnedBy($thisUser)}
|
|
{if $post->isPinned()}
|
|
<a href="/wall{$post->getPrettyId()}/pin?act=unpin&hash={rawurlencode($csrfToken)}">{_unpin}</a>
|
|
{else}
|
|
<a href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}">{_pin}</a>
|
|
{/if}
|
|
|
|
|
{/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)}
|
|
|
|
|
{/if}
|
|
|
|
<a n:if="!($forceNoShareLink ?? false)" id="reposts{$post->getPrettyId()}" class="post-share-button" {ifset $thisUser} href="javascript:repostPost('{$post->getPrettyId()}', '{rawurlencode($csrfToken)}')"{/ifset}>
|
|
{_share}
|
|
{if $post->getRepostCount() > 0}
|
|
(<b id="repostsCount{$post->getPrettyId()}">{$post->getRepostCount()}</b>)
|
|
{/if}
|
|
</a>
|
|
|
|
<div n:if="!($forceNoLike ?? false)" class="like_wrap">
|
|
{ifset $thisUser}
|
|
{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>
|
|
{else}
|
|
<a n:if="$post->getLikesCount() > 0" class="post-like-button">
|
|
<div class="heart"></div>
|
|
<span class="likeCnt">{$post->getLikesCount()}</span>
|
|
</a>
|
|
{/ifset}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|