2020-06-07 19:04:43 +03:00
|
|
|
{extends "../@listView.xml"}
|
2021-11-12 16:31:23 +03:00
|
|
|
{var $Manager = openvk\Web\Models\Entities\Manager::class}
|
|
|
|
{var iterator = $onlyShowManagers ? $managers : $followers}
|
2020-06-07 19:04:43 +03:00
|
|
|
{var count = $paginatorConf->count}
|
|
|
|
{var page = $paginatorConf->page}
|
2021-01-07 19:50:26 +03:00
|
|
|
{var perPage = 6}
|
2020-06-07 19:04:43 +03:00
|
|
|
|
|
|
|
{block title}{_followers} {$club->getCanonicalName()}{/block}
|
|
|
|
|
|
|
|
{block header}
|
|
|
|
<a href="{$club->getURL()}">{$club->getCanonicalName()}</a>
|
|
|
|
» {_followers}
|
2021-11-12 16:31:23 +03:00
|
|
|
<a n:if="!$onlyShowManagers" href="/club{$club->getId()}/followers?onlyAdmins=1" style="float: right;">{_all_followers}</a>
|
|
|
|
<a n:if="$onlyShowManagers" href="/club{$club->getId()}/followers" style="float: right;">{_only_administrators}</a>
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{* BEGIN ELEMENTS DESCRIPTION *}
|
|
|
|
|
2021-11-06 22:25:11 +03:00
|
|
|
{block tabs}
|
|
|
|
{if $club->canBeModifiedBy($thisUser)}
|
|
|
|
<div class="tab">
|
|
|
|
<a href="/club{$club->getId()}/edit">
|
|
|
|
{_main}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div id="activetabs" class="tab">
|
|
|
|
<a id="act_tab_a" href="/club{$club->getId()}/followers">
|
|
|
|
{_followers}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="tab">
|
|
|
|
<a href="/club{$club->getId()}/stats">
|
|
|
|
{_statistics}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{/block}
|
|
|
|
|
2020-06-07 19:04:43 +03:00
|
|
|
{block link|strip|stripHtml}
|
2021-11-12 16:31:23 +03:00
|
|
|
/id{$x instanceof $Manager ? $x->getUserId() : $x->getId()}
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{block preview}
|
2022-04-05 14:39:13 +03:00
|
|
|
<img src="{$x instanceof $Manager ? $x->getUser()->getAvatarURL() : $x->getAvatarURL('miniscule')}" alt="{$x instanceof $Manager ? $x->getUser()->getCanonicalName() : $x->getCanonicalName()}" width=75 />
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{block name}
|
2021-11-12 16:31:23 +03:00
|
|
|
{$x instanceof $Manager ? $x->getUser()->getCanonicalName() : $x->getCanonicalName()}
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{block description}
|
2021-11-12 16:31:23 +03:00
|
|
|
{var user = $x instanceof $Manager ? $x->getUser() : $x}
|
|
|
|
{var manager = $x instanceof $Manager ? $x : $club->getManager($user, !$club->canBeModifiedBy($thisUser))}
|
2020-06-07 19:04:43 +03:00
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td width="120" valign="top"><span class="nobold">{_"gender"}: </span></td>
|
2021-11-12 16:31:23 +03:00
|
|
|
<td>{$user->isFemale() ? "женский" : "мужской"}</td>
|
2020-06-07 19:04:43 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="120" valign="top"><span class="nobold">{_"registration_date"}: </span></td>
|
2021-11-12 16:31:23 +03:00
|
|
|
<td>{$user->getRegistrationTime()}</td>
|
2020-06-07 19:04:43 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="120" valign="top"><span class="nobold">{_role}: </span></td>
|
|
|
|
<td>
|
2021-11-12 16:31:23 +03:00
|
|
|
{$club->getOwner()->getId() == $user->getId() ? !$club->isOwnerHidden() || $club->canBeModifiedBy($thisUser) : !is_null($manager) ? tr("administrator") : tr("follower")}
|
2020-06-07 19:04:43 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
2021-11-12 16:31:23 +03:00
|
|
|
<tr n:if="$manager && !empty($manager->getComment()) || $club->getOwner()->getId() === $user->getId() && !empty($club->getOwnerComment()) && (!$club->isOwnerHidden() || $club->canBeModifiedBy($thisUser))">
|
2021-11-06 14:06:57 +03:00
|
|
|
<td width="120" valign="top"><span class="nobold">{_comment}: </span></td>
|
|
|
|
<td>
|
2021-11-12 16:31:23 +03:00
|
|
|
{if $club->getOwner()->getId() === $user->getId()}
|
2021-11-06 14:06:57 +03:00
|
|
|
{$club->getOwnerComment()}
|
|
|
|
{else}
|
|
|
|
{$manager->getComment()}
|
|
|
|
{/if}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-12-22 16:26:49 +03:00
|
|
|
|
2020-06-07 19:04:43 +03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-12-16 21:40:34 +03:00
|
|
|
|
2021-12-16 22:23:28 +03:00
|
|
|
<script n:if="$club->getOwner()->getId() != $user->getId() && $manager && $thisUser->getId() == $club->getOwner()->getId()">
|
2021-12-22 16:26:49 +03:00
|
|
|
console.log("gayshit");
|
|
|
|
console.log("сам такой");
|
2021-12-16 21:40:34 +03:00
|
|
|
function changeOwner(club, newOwner) {
|
2021-12-16 22:23:28 +03:00
|
|
|
const action = "/groups/" + club + "/setNewOwner/" + newOwner;
|
2021-12-16 21:40:34 +03:00
|
|
|
|
2021-12-16 22:23:28 +03:00
|
|
|
MessageBox({_group_changeowner_modal_title}, `
|
|
|
|
{tr("group_changeowner_modal_text", htmlentities($user->getFullName()))|noescape}
|
2021-12-16 21:40:34 +03:00
|
|
|
<br/><br/>
|
|
|
|
<form id="transfer-owner-permissions-form" method="post">
|
2021-12-16 22:23:28 +03:00
|
|
|
<label for="password">{_password|noescape}</label>
|
2021-12-16 21:40:34 +03:00
|
|
|
<input type="password" id="password" name="password" required />
|
|
|
|
<input type="hidden" name="hash" value={$csrfToken} />
|
|
|
|
</form>
|
2021-12-16 22:23:28 +03:00
|
|
|
`, [{_transfer}, {_cancel}], [
|
2021-12-16 21:40:34 +03:00
|
|
|
() => {
|
2021-12-16 22:23:28 +03:00
|
|
|
$("#transfer-owner-permissions-form").attr("action", action);
|
2021-12-16 21:40:34 +03:00
|
|
|
document.querySelector("#transfer-owner-permissions-form").submit();
|
|
|
|
}, Function.noop
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
</script>
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
2021-12-22 16:26:49 +03:00
|
|
|
|
|
|
|
{block actions}
|
|
|
|
{var user = $x instanceof $Manager ? $x->getUser() : $x}
|
|
|
|
{var manager = $x instanceof $Manager ? $x : $club->getManager($user, !$club->canBeModifiedBy($thisUser))}
|
|
|
|
{if $club->canBeModifiedBy($thisUser ?? NULL)}
|
2021-12-31 07:28:57 +03:00
|
|
|
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hash={rawurlencode($csrfToken)}" n:if="$club->getOwner()->getId() !== $user->getId()">
|
2021-12-22 16:26:49 +03:00
|
|
|
{if $manager}
|
|
|
|
{_devote}
|
|
|
|
{else}
|
|
|
|
{_promote_to_admin}
|
|
|
|
{/if}
|
|
|
|
</a>
|
|
|
|
{if $club->getOwner()->getId() != $user->getId() && $manager && $thisUser->getId() == $club->getOwner()->getId()}
|
|
|
|
<a class="profile_link" href="javascript:changeOwner({$club->getId()}, {$user->getId()})">
|
|
|
|
{_promote_to_owner}
|
|
|
|
</a>
|
|
|
|
{/if}
|
|
|
|
{if $manager}
|
|
|
|
<a class="profile_link" href="javascript:setClubAdminComment('{$club->getId()}', '{$manager->getUserId()}', '{rawurlencode($csrfToken)}')">
|
|
|
|
{_set_comment}
|
|
|
|
</a>
|
|
|
|
{/if}
|
|
|
|
<a class="profile_link" n:if="$club->getOwner()->getId() === $user->getId()" href="javascript:setClubAdminComment('{$club->getId()}', '{$club->getOwner()->getId()}', '{rawurlencode($csrfToken)}')">
|
|
|
|
{_set_comment}
|
|
|
|
</a>
|
|
|
|
{if $manager}
|
2021-12-31 07:28:57 +03:00
|
|
|
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hidden={(int) !$manager->isHidden()}&hash={rawurlencode($csrfToken)}">
|
2021-12-22 16:26:49 +03:00
|
|
|
{if $manager->isHidden()}{_hidden_yes}{else}{_hidden_no}{/if}
|
|
|
|
</a>
|
|
|
|
{/if}
|
|
|
|
{if $club->getOwner()->getId() == $user->getId()}
|
2021-12-31 07:28:57 +03:00
|
|
|
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hidden={(int) !$club->isOwnerHidden()}&hash={rawurlencode($csrfToken)}">
|
2021-12-22 16:26:49 +03:00
|
|
|
{if $club->isOwnerHidden()}{_hidden_yes}{else}{_hidden_no}{/if}
|
|
|
|
</a>
|
|
|
|
{/if}
|
|
|
|
{/if}
|
2022-04-05 14:39:13 +03:00
|
|
|
{/block}
|