mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +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/>
|
{tr("user_banned", htmlentities($user->getFirstName()))|noescape}<br/>
|
||||||
{_"user_banned_comment"} <b>{$user->getBanReason()}</b>.
|
{_"user_banned_comment"} <b>{$user->getBanReason()}</b>.
|
||||||
</p>
|
</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 />
|
<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('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">
|
<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}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
{/if}
|
||||||
</center>
|
</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() {
|
function unbanUser() {
|
||||||
uUnbanMsgTxt = "Вы собираетесь разбанить пользователя " + {$user->getCanonicalName()} + ".";
|
uUnbanMsgTxt = "Вы собираетесь разбанить пользователя " + {$user->getCanonicalName()} + ".";
|
||||||
uUnbanMsgTxt += "<br/>Сейчас он заблокирован по причине: <strong>" + {$user->getBanReason()} + "</strong>.";
|
uUnbanMsgTxt += "<br/>Сейчас он заблокирован по причине: <strong>" + {$user->getBanReason()} + "</strong>.";
|
||||||
|
@ -39,7 +42,7 @@
|
||||||
}
|
}
|
||||||
</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()}
|
{if $user->isBannedInSupport()}
|
||||||
function toggleBanInSupport() {
|
function toggleBanInSupport() {
|
||||||
uBanMsgTxt = "Вы собираетесь разблокировать в поддержке пользователя " + {$user->getCanonicalName()} + ".";
|
uBanMsgTxt = "Вы собираетесь разблокировать в поддержке пользователя " + {$user->getCanonicalName()} + ".";
|
||||||
|
@ -83,3 +86,4 @@
|
||||||
}
|
}
|
||||||
{/if}
|
{/if}
|
||||||
</script>
|
</script>
|
||||||
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue