mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Groups, Users: Fix right for Groups and Friends list
This commit is contained in:
parent
753a282b88
commit
43bfd48fa9
2 changed files with 33 additions and 31 deletions
|
@ -81,35 +81,37 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block actions}
|
{block actions}
|
||||||
{var subStatus = $x->getSubscriptionStatus($thisUser)}
|
{if $x->getId() !== $thisUser->getId()}
|
||||||
{if $subStatus === 0}
|
{var subStatus = $x->getSubscriptionStatus($thisUser)}
|
||||||
<form action="/setSub/user" method="post" class="profile_link_form">
|
{if $subStatus === 0}
|
||||||
<input type="hidden" name="act" value="add" />
|
<form action="/setSub/user" method="post" class="profile_link_form">
|
||||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
<input type="hidden" name="act" value="add" />
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||||
<input type="submit" class="profile_link" value="{_"friends_add"}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
</form>
|
<input type="submit" class="profile_link" value="{_"friends_add"}" />
|
||||||
{elseif $subStatus === 1}
|
</form>
|
||||||
<form action="/setSub/user" method="post" class="profile_link_form">
|
{elseif $subStatus === 1}
|
||||||
<input type="hidden" name="act" value="add" />
|
<form action="/setSub/user" method="post" class="profile_link_form">
|
||||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
<input type="hidden" name="act" value="add" />
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||||
<input type="submit" class="profile_link" value="{_"friends_accept"}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
</form>
|
<input type="submit" class="profile_link" value="{_"friends_accept"}" />
|
||||||
{elseif $subStatus === 2}
|
</form>
|
||||||
<form action="/setSub/user" method="post" class="profile_link_form">
|
{elseif $subStatus === 2}
|
||||||
<input type="hidden" name="act" value="rem" />
|
<form action="/setSub/user" method="post" class="profile_link_form">
|
||||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
<input type="hidden" name="act" value="rem" />
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||||
<input type="submit" class="profile_link" value="{_"friends_reject"}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
</form>
|
<input type="submit" class="profile_link" value="{_"friends_reject"}" />
|
||||||
{elseif $subStatus === 3}
|
</form>
|
||||||
<a href="/im?sel={$x->getId()}" class="profile_link">{_"send_message"}</a>
|
{elseif $subStatus === 3}
|
||||||
<form action="/setSub/user" method="post" class="profile_link_form">
|
<a href="/im?sel={$x->getId()}" class="profile_link">{_"send_message"}</a>
|
||||||
<input type="hidden" name="act" value="rem" />
|
<form action="/setSub/user" method="post" class="profile_link_form">
|
||||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
<input type="hidden" name="act" value="rem" />
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||||
<input type="submit" class="profile_link" value="{_"friends_delete"}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
</form>
|
<input type="submit" class="profile_link" value="{_"friends_delete"}" />
|
||||||
|
</form>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{var clubPinned = $thisUser->isClubPinned($x)}
|
{var clubPinned = $thisUser->isClubPinned($x)}
|
||||||
{if $clubPinned || $thisUser->getPinnedClubCount() <= 10 || $x->canBeModifiedBy($thisUser ?? NULL)}
|
{if $x->canBeModifiedBy($thisUser ?? NULL) || $clubPinned || $thisUser->getPinnedClubCount() <= 10}
|
||||||
{block actions}
|
{block actions}
|
||||||
<a class="profile_link" href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" id="_pinGroup" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}">
|
<a class="profile_link" href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" id="_pinGroup" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}">
|
||||||
{if $clubPinned}
|
{if $clubPinned}
|
||||||
|
|
Loading…
Reference in a new issue