mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Don't show error 500 when accessing a blocked user
This commit is contained in:
parent
ba6b8d0ed6
commit
e161a25e0a
1 changed files with 69 additions and 65 deletions
|
@ -4,7 +4,8 @@
|
|||
{tr("user_banned", htmlentities($user->getFirstName()))|noescape}<br/>
|
||||
{_"user_banned_comment"} <b>{$user->getBanReason()}</b>.
|
||||
</p>
|
||||
<p n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) || $thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
||||
{if isset($thisUser)}
|
||||
<p n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) || $thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
||||
<br />
|
||||
<a n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL)" href="javascript:unbanUser()" class="button">{_unban_user_action}</a>
|
||||
<a n:if="$thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)" href="javascript:toggleBanInSupport()" class="button">
|
||||
|
@ -15,9 +16,11 @@
|
|||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
{/if}
|
||||
</center>
|
||||
|
||||
<script n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL)">
|
||||
{if isset($thisUser)}
|
||||
<script n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL)">
|
||||
function unbanUser() {
|
||||
uUnbanMsgTxt = "Вы собираетесь разбанить пользователя " + {$user->getCanonicalName()} + ".";
|
||||
uUnbanMsgTxt += "<br/>Сейчас он заблокирован по причине: <strong>" + {$user->getBanReason()} + "</strong>.";
|
||||
|
@ -37,9 +40,9 @@
|
|||
Function.noop
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
||||
<script n:if="$thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
||||
{if $user->isBannedInSupport()}
|
||||
function toggleBanInSupport() {
|
||||
uBanMsgTxt = "Вы собираетесь разблокировать в поддержке пользователя " + {$user->getCanonicalName()} + ".";
|
||||
|
@ -82,4 +85,5 @@
|
|||
]);
|
||||
}
|
||||
{/if}
|
||||
</script>
|
||||
</script>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in a new issue