User: Don't show "Send Gift" to unauthorized users

I also added a "title" attribute to the gifts themselves, so you can
understand the text that was sent via the gift without having to open
the list unnecessarily.
This commit is contained in:
Ilya Prokopenko 2022-07-22 15:38:32 +07:00
parent 7d71dd6ace
commit d1344d0cf8
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56

View file

@ -486,8 +486,8 @@
<div class="content_subtitle">
{tr("gifts", $giftCount)}
<div style="float:right;">
{if OPENVK_ROOT_CONF['openvk']['preferences']['commerce']}
<a href="/gifts?act=pick&user={$user->getId()}">{_send_gift}</a> |
{if OPENVK_ROOT_CONF['openvk']['preferences']['commerce'] && !is_null($thisUser)}
<a href="/gifts?act=pick&user={$user->getId()}">{_send_gift}</a> |
{/if}
<a href="/gifts{$user->getId()}">{_all_title}</a>
</div>
@ -499,7 +499,8 @@
<a href="{$hideInfo ? 'javascript:false' : $giftDescriptor->sender->getURL()}">
<img style="width: 70px; max-height: 70px;"
src="{$giftDescriptor->gift->getImage(2)}"
alt="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}" />
alt="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}"
title="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}" />
</a>
</div>
</div>