Fix microblog comments and left menu links (#955)

* Фикс комментариев в микроблоге

* Update @layout.xml
This commit is contained in:
n1rwana 2023-08-11 17:10:18 +03:00 committed by GitHub
parent 6159262026
commit 6e7f8833fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 15 deletions

View file

@ -218,10 +218,13 @@
noSpam
</a>
<a
n:if="$thisUser->getLeftMenuItemStatus('links')"
n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem"
href="{$menuItem['url']}"
target="_blank"
class="link">{$menuItem["name"]}</a>
class="link">
{strpos($menuItem["name"], "@") === 0 ? tr(substr($menuItem["name"], 1)) : $menuItem["name"]}
</a>
<div id="_groupListPinnedGroups">
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
<a
@ -229,8 +232,6 @@
href="{$club->getURL()}"
class="link group_link">{$club->getName()}</a>
<a n:if="$thisUser->getLeftMenuItemStatus('links')" n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem" href="{$menuItem['url']}" target="_blank" class="link">{strpos($menuItem["name"], "@") === 0 ? tr(substr($menuItem["name"], 1)) : $menuItem["name"]}</a>
<div id="_groupListPinnedGroups">
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
<a n:foreach="$thisUser->getPinnedClubs() as $club" href="{$club->getURL()}" class="link group_link">{$club->getName()}</a>

View file

@ -61,18 +61,14 @@
{php $target = "topic"}
{/if}
<a {if is_null($linkW)}href="#_comment{$comment->getId()}"{else}href="{$target}{!is_null($comment->getTarget()) ? $comment->getTarget()->getPrettyId() : $comment->getOwner()->getId()}#_comment{$comment->getId()}"{/if} class="date">{$comment->getPublicationTime()}</a>&nbsp;|
{if $comment->canBeDeletedBy($thisUser)}
<a href="/comment{$comment->getId()}/delete">{_delete}</a>&nbsp;|
{/if}
|&nbsp;<a
{if is_null($linkW)}
<a class="comment-reply">{_reply}</a>{/if}
<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>
href="#_comment{$comment->getId()}"
{else}
href="{$target}{!is_null($comment->getTarget()) ? $comment->getTarget()->getPrettyId() : $comment->getOwner()->getId()}#_comment{$comment->getId()}"
{/if}
class="date"
>{$comment->getPublicationTime()}</a>
</div>
</div>
</td>