mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
e3358fcfa5
This commit allows you to pin groups to the left menu (max 10 groups, only those in which you are the administrator) from the My Groups page. Fixes #186
62 lines
1.7 KiB
XML
62 lines
1.7 KiB
XML
{extends "../@listView.xml"}
|
||
{var iterator = $user->getClubs($page)}
|
||
{var count = $user->getClubCount()}
|
||
|
||
{block title}{_"groups"}{/block}
|
||
|
||
{block header}
|
||
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a> » {_"groups"}
|
||
|
||
<div n:if="!is_null($thisUser) && $user->getId() === $thisUser->getId()" style="float:right;">
|
||
<span>
|
||
<b>
|
||
<a href="/groups_create">
|
||
{_"create_group"}
|
||
</a>
|
||
</b>
|
||
</span>
|
||
</div>
|
||
{/block}
|
||
|
||
{block actions}
|
||
<div class="tile">
|
||
<a href="javascript:alert('Не запилил')" class="profile_link">Поиск групп</a>
|
||
</div>
|
||
{/block}
|
||
|
||
{* BEGIN ELEMENTS DESCRIPTION *}
|
||
|
||
{block link|strip|stripHtml}
|
||
{$x->getURL()}
|
||
{/block}
|
||
|
||
{block preview}
|
||
<img src="{$x->getAvatarUrl()}" width="75" alt="Фотография группы" />
|
||
{/block}
|
||
|
||
{block name}
|
||
{$x->getName()}
|
||
{/block}
|
||
|
||
{block description}
|
||
{$x->getDescription()}
|
||
{if $x->canBeModifiedBy($thisUser ?? NULL)}
|
||
{var clubPinned = $thisUser->isClubPinned($x)}
|
||
<table n:if="$clubPinned || $thisUser->getPinnedClubCount() <= 10">
|
||
<tbody>
|
||
<tr>
|
||
<td width="120" valign="top"><span class="nobold">{_actions}: </span></td>
|
||
<td>
|
||
<a href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}">
|
||
{if $clubPinned}
|
||
{_remove_from_sidebar}
|
||
{else}
|
||
{_add_to_sidebar}
|
||
{/if}
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
{/if}
|
||
{/block}
|