Users: Fix page with list of user's groups

This commit is contained in:
Maxim Leshchenko 2022-02-07 14:06:47 +02:00
parent 16d41a7be7
commit b5524b6b7b
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
2 changed files with 7 additions and 28 deletions

View file

@ -27,8 +27,8 @@
</a> </a>
</td> </td>
<td valign="top" style="width: 100%"> <td valign="top" style="width: 100%">
{ifset infotable} {ifset infoTable}
{include infotable, x => $dat} {include infoTable, x => $dat}
{else} {else}
<a href="{include link, x => $dat}"> <a href="{include link, x => $dat}">
<b> <b>

View file

@ -32,7 +32,7 @@
{/block} {/block}
{block size} {block size}
<div style="padding-bottom: 0px;border-bottom: 0;" class="summaryBar"> <div n:if="!is_null($thisUser) && $user->getId() === $thisUser->getId()" style="padding-bottom: 0px; border-bottom: 0;" class="summaryBar">
<div class="summary"> <div class="summary">
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()} {if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
{tr("groups_list", $thisUser->getClubCount())} {tr("groups_list", $thisUser->getClubCount())}
@ -51,6 +51,8 @@
<img src="{$x->getAvatarUrl()}" width="75" alt="Фотография группы" /> <img src="{$x->getAvatarUrl()}" width="75" alt="Фотография группы" />
{/block} {/block}
{block name}{/block}
{block infoTable} {block infoTable}
<table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0"> <table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0">
<tbody> <tbody>
@ -73,11 +75,11 @@
{block actions} {block actions}
{var clubPinned = $thisUser->isClubPinned($x)} {var clubPinned = $thisUser->isClubPinned($x)}
{if $x->canBeModifiedBy($thisUser ?? NULL)} {if $x->canBeModifiedBy($thisUser ?? NULL)}
<a style="border-bottom: none; width: 140px;" class="profile_link" href="{$x->getURL()}"> <a style="width: 140px;" class="profile_link" href="{$x->getURL()}">
{_check_community} {_check_community}
</a> </a>
{if ($clubPinned || $thisUser->getPinnedClubCount() <= 10)} {if ($clubPinned || $thisUser->getPinnedClubCount() <= 10)}
<a style="border-bottom: none; width: 140px;" class="profile_link" href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}"> <a style="width: 140px;" 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}
{else} {else}
@ -116,26 +118,3 @@
</div> </div>
{/if} {/if}
{/block} {/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}