openvk/Web/Presenters/templates/Group/Followers.xml
Maxim Leshchenko 989cd8952b Allow adding comments to group admins
This commit allows you to add a comment to group administrators, which will be displayed in the list of administrators
2021-11-06 13:06:57 +02:00

83 lines
3.1 KiB
XML

{extends "../@listView.xml"}
{var iterator = $followers}
{var count = $paginatorConf->count}
{var page = $paginatorConf->page}
{var perPage = 6}
{block title}{_followers} {$club->getCanonicalName()}{/block}
{block header}
<a href="{$club->getURL()}">{$club->getCanonicalName()}</a>
» {_followers}
{/block}
{block actions}
{/block}
{* BEGIN ELEMENTS DESCRIPTION *}
{block link|strip|stripHtml}
/id{$x->getId()}
{/block}
{block preview}
<img src="{$x->getAvatarURL()}" alt="{$x->getCanonicalName()}" width=75 />
{/block}
{block name}
{$x->getCanonicalName()}
{/block}
{block description}
<table>
<tbody>
<tr>
<td width="120" valign="top"><span class="nobold">{_"gender"}: </span></td>
<td>{$x->isFemale() ? "женский" : "мужской"}</td>
</tr>
<tr>
<td width="120" valign="top"><span class="nobold">{_"registration_date"}: </span></td>
<td>{$x->getRegistrationTime()}</td>
</tr>
<tr>
<td width="120" valign="top"><span class="nobold">{_role}: </span></td>
<td>
{$club->canBeModifiedBy($x) ? tr("administrator") : tr("follower")}
</td>
</tr>
{var manager = $club->getManager($x)}
<tr n:if="$manager && !empty($manager->getComment()) || $club->getOwner()->getId() === $x->getId() && !empty($club->getOwnerComment())">
<td width="120" valign="top"><span class="nobold">{_comment}: </span></td>
<td>
{if $club->getOwner()->getId() === $x->getId()}
{$club->getOwnerComment()}
{else}
{$manager->getComment()}
{/if}
</td>
</tr>
<tr n:if="$club->canBeModifiedBy($thisUser ?? NULL) && $club->getOwner()->getId() !== $x->getId() || $club->getOwner()->getId() == $x->getId()">
<td width="120" valign="top"><span class="nobold">{_actions}: </span></td>
<td>
<a href="/club{$club->getId()}/setAdmin.jsp?user={$x->getId()}&hash={rawurlencode($csrfToken)}" n:if="$club->getOwner()->getId() !== $x->getId()">
{if $manager}
{_devote}
{else}
{_promote_to_admin}
{/if}
</a>
{if $manager}
|
<a href="javascript:setClubAdminComment('{$club->getId()}', '{$manager->getUserId()}', '{rawurlencode($csrfToken)}')">
{_set_comment}
</a>
{/if}
<a n:if="$club->getOwner()->getId() === $x->getId()" href="javascript:setClubAdminComment('{$club->getId()}', '{$club->getOwner()->getId()}', '{rawurlencode($csrfToken)}')">
{_set_comment}
</a>
</td>
</tr>
</tbody>
</table>
{/block}