mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Groups: Do not show group pin button in group list when the group cannot be pinned
This commit is contained in:
parent
b765038bc3
commit
948719ec3d
2 changed files with 7 additions and 5 deletions
|
@ -540,6 +540,8 @@ class User extends RowModel
|
||||||
$manager = $club->getManager($this);
|
$manager = $club->getManager($this);
|
||||||
if(!is_null($manager))
|
if(!is_null($manager))
|
||||||
return $manager->isClubPinned();
|
return $manager->isClubPinned();
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMeetings(int $page = 1): \Traversable
|
function getMeetings(int $page = 1): \Traversable
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
{$x->getDescription()}
|
{$x->getDescription()}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{var clubPinned = $thisUser->isClubPinned($x)}
|
{block actions}
|
||||||
{if $x->canBeModifiedBy($thisUser ?? NULL) || $clubPinned || $thisUser->getPinnedClubCount() <= 10}
|
{var clubPinned = $thisUser->isClubPinned($x)}
|
||||||
{block actions}
|
{if $x->canBeModifiedBy($thisUser ?? NULL) && ($clubPinned || $thisUser->getPinnedClubCount() <= 10)}
|
||||||
<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}
|
||||||
{_remove_from_left_menu}
|
{_remove_from_left_menu}
|
||||||
|
@ -61,5 +61,5 @@
|
||||||
{_add_to_left_menu}
|
{_add_to_left_menu}
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
{/block}
|
{/if}
|
||||||
{/if}
|
{/block}
|
||||||
|
|
Loading…
Reference in a new issue