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 noSpam
</a> </a>
<a <a
n:if="$thisUser->getLeftMenuItemStatus('links')"
n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem" n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem"
href="{$menuItem['url']}" href="{$menuItem['url']}"
target="_blank" 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 id="_groupListPinnedGroups">
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div> <div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
<a <a
@ -229,8 +232,6 @@
href="{$club->getURL()}" href="{$club->getURL()}"
class="link group_link">{$club->getName()}</a> 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 id="_groupListPinnedGroups">
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div> <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> <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"} {php $target = "topic"}
{/if} {/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;| |&nbsp;<a
{if $comment->canBeDeletedBy($thisUser)} {if is_null($linkW)}
<a href="/comment{$comment->getId()}/delete">{_delete}</a>&nbsp;| href="#_comment{$comment->getId()}"
{/if} {else}
{if is_null($linkW)} href="{$target}{!is_null($comment->getTarget()) ? $comment->getTarget()->getPrettyId() : $comment->getOwner()->getId()}#_comment{$comment->getId()}"
<a class="comment-reply">{_reply}</a>{/if} {/if}
<div style="float: right; font-size: .7rem;"> class="date"
<a class="post-like-button" href="/comment{$comment->getId()}/like?hash={rawurlencode($csrfToken)}"> >{$comment->getPublicationTime()}</a>
<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>
</div> </div>
</td> </td>