openvk/Web/Presenters/templates/User/Groups.xml

123 lines
4.4 KiB
XML
Raw Normal View History

2020-06-07 19:04:43 +03:00
{extends "../@listView.xml"}
2022-04-24 08:06:45 +03:00
{var $iterator = $user->getClubs($page, $admin)}
{var $count = $user->getClubCount($admin)}
2020-06-07 19:04:43 +03:00
{block title}
{_groups}
{/block}
2020-06-07 19:04:43 +03:00
{block header}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
{_my_groups}
2022-01-31 02:30:15 +03:00
{else}
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a> » {_groups}
2022-01-31 02:30:15 +03:00
{/if}
2020-06-07 19:04:43 +03:00
{/block}
{* BEGIN ELEMENTS DESCRIPTION *}
{block tabs}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
2022-02-01 18:11:39 +03:00
<div n:attr='id => ($admin ? false : "activetabs")' class="tab">
<a n:attr='id => ($admin ? false : "act_tab_a")' href="/groups{$user->getId()}">
{_groups}
</a>
</div>
<div n:attr='id => (!$admin ? false : "activetabs")' class="tab">
<a n:attr='id => (!$admin ? false : "act_tab_a")' href="/groups{$user->getId()}?act=managed">
{_managed}
</a>
</div>
{/if}
{/block}
2022-01-31 02:30:15 +03:00
{block size}
<div style="padding-bottom: 0px; {if is_null($thisUser) || $user->getId() !== $thisUser->getId()}padding-top: 0px;{/if}" class="summaryBar">
<div class="summary">
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
{tr("groups_list", $thisUser->getClubCount())}
{else}
{tr("groups", $user->getClubCount())}
{/if}
</div>
</div>
2022-01-31 02:30:15 +03:00
{/block}
2020-06-07 19:04:43 +03:00
{block link|strip|stripHtml}
{$x->getURL()}
{/block}
{block preview}
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография группы" />
2020-06-07 19:04:43 +03:00
{/block}
{block name}{/block}
{block infotable}
<table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="label"><span class="nobold">{_name}: </span></td>
<td class="data">
<a href="{$x->getURL()}">{$x->getName()}</a>
<img n:if="$x->isVerified()"
class="name-checkmark"
src="/assets/packages/static/openvk/img/checkmark.png"
/>
</td>
</tr>
<tr>
<td class="label"><span class="nobold">{_size}:</span></td>
<td class="data"><a href="/club{$x->getId()}/followers">{tr("participants", $x->getFollowersCount())}</a></td>
</tr>
</tbody>
</table>
2020-06-07 19:04:43 +03:00
{/block}
{block description}
{$x->getDescription()}
{/block}
{block actions}
{if $x->canBeModifiedBy($thisUser ?? NULL)}
{var $clubPinned = $thisUser->isClubPinned($x)}
<a href="{$x->getURL()}" class="profile_link">{_check_community}</a>
<a href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" class="profile_link" n:if="$clubPinned || $thisUser->getPinnedClubCount() <= 10" id="_pinGroup" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}">
{if $clubPinned}
{_remove_from_left_menu}
{else}
{_add_to_left_menu}
{/if}
</a>
<form class="profile_link_form" action="/setSub/club" method="post">
<input type="hidden" name="act" value="rem" />
<input type="hidden" name="id" value="{$x->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
2022-08-09 09:37:08 +03:00
<input type="submit" class="profile_link" value="{_leave_community}" />
</form>
{/if}
{/block}
2022-01-31 02:30:15 +03:00
{block bottom}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
<div class="groups_options">
<div id="gp_container" style="width: 200px; margin-right: 39px;">
<h4>{_open_new_group}</h4>
<span>{_open_group_desc}</span>
<form action="/groups_create">
<button class="button">{_create_group}</button>
</form>
</div>
<div id="gp_container" style="width: 344px;">
<h4>{_search_group}</h4>
<span>{_search_group_desc}</span>
<form action="/search">
<input name="type" type="hidden" value="groups">
<input name="query" class="header_search_input" value="" style="background: none; width: 155px; padding-left: 3px;">
<button class="button">{_search_by_groups}</button>
</form>
</div>
</div>
{/if}
{/block}