openvk/Web/Presenters/templates/User/Groups.xml
Ilya Prokopenko 42f862eaec
Groups: Fix tabs and div block
I have SO many questions...
2022-01-31 04:45:56 +03:00

90 lines
2.8 KiB
XML

{extends "../@listView.xml"}
{var iterator = $user->getClubs($page, $admin)}
{var count = $user->getClubCount($admin)}
{block title}
{_groups}
{/block}
{block header}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
{_my_groups}
{else}
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a> » {_groups}
{/if}
{/block}
{* BEGIN ELEMENTS DESCRIPTION *}
{block tabs}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
<div {if !$admin}id="activetabs"{/if} class="tab">
<a {if !$admin}id="act_tab_a"{/if} href="/groups{$user->getId()}">
{_groups}
</a>
</div>
<div {if $admin}id="activetabs"{/if} class="tab">
<a {if $admin}id="act_tab_a"{/if} href="/groups{$user->getId()}?act=managed">
{_managed}
</a>
</div>
{/if}
{/block}
{block size}
<div style="padding-bottom: 0px;border-bottom: 0;" class="summaryBar">
<div class="summary">Найдено групп ({$thisUser->getClubCount()})</div>
</div>
{/block}
{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()}
{/block}
{block actions}
{var clubPinned = $thisUser->isClubPinned($x)}
{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()}">
{if $clubPinned}
{_remove_from_left_menu}
{else}
{_add_to_left_menu}
{/if}
</a>
{/if}
{/block}
{block bottom}
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
<div class="groups_options">
<div id="gp_container" style="width: 200px;margin-right: 40px;">
<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}