mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Compare commits
2 commits
c714cc4038
...
504f50af9a
Author | SHA1 | Date | |
---|---|---|---|
|
504f50af9a | ||
|
9afebf7d02 |
5 changed files with 27 additions and 1 deletions
|
@ -1418,6 +1418,20 @@ class User extends RowModel
|
|||
case 'real_id':
|
||||
$res->real_id = $this->getRealId();
|
||||
break;
|
||||
case "blacklisted_by_me":
|
||||
if(!$user) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$res->blacklisted_by_me = (int)$this->isBlacklistedBy($user);
|
||||
break;
|
||||
case "blacklisted":
|
||||
if(!$user) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$res->blacklisted = (int)$user->isBlacklistedBy($this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,13 @@ final class UserPresenter extends OpenVKPresenter
|
|||
$this->template->user = $user;
|
||||
} else if($user->isBlacklistedBy($this->user->identity)) {
|
||||
$this->template->_template = "User/blacklisted_pov.xml";
|
||||
|
||||
$this->template->ignore_status = $user->isIgnoredBy($this->user->identity);
|
||||
$this->template->user = $user;
|
||||
} else if($this->user->identity->isBlacklistedBy($user)) {
|
||||
$this->template->_template = "User/blacklisted.xml";
|
||||
|
||||
$this->template->ignore_status = $user->isIgnoredBy($this->user->identity);
|
||||
$this->template->user = $user;
|
||||
} else if(!is_null($user) && !$user->canBeViewedBy($this->user->identity)) {
|
||||
$this->template->_template = "User/private.xml";
|
||||
|
|
|
@ -165,8 +165,10 @@
|
|||
</form>
|
||||
{/if}
|
||||
|
||||
<a n:if="!$blacklist_status" id="_bl_toggler" data-name="{$user->getMorphedName('genitive', false)}" data-val="1" data-id="{$user->getRealId()}" class="profile_link" style="display:block;width:96%;">{_bl_add}</a>
|
||||
{* 4 admins *}
|
||||
<a n:if="$blacklist_status" id="_bl_toggler" data-val="0" data-id="{$user->getRealId()}" class="profile_link" style="display:block;width:96%;">{_bl_remove}</a>
|
||||
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportUser({$user->getId()})">{_report}</a>
|
||||
<a n:if="!$blacklist_status" id="_bl_toggler" data-name="{$user->getMorphedName('genitive', false)}" data-val="1" data-id="{$user->getRealId()}" class="profile_link" style="display:block;width:96%;">{_bl_add}</a>
|
||||
<a n:if="!$user->isHideFromGlobalFeedEnabled()" class="profile_link" style="display:block;width:96%;" id="__ignoreSomeone" data-val='{!$ignore_status ? 1 : 0}' data-id="{$user->getId()}">
|
||||
{if !$ignore_status}{_ignore_user}{else}{_unignore_user}{/if}
|
||||
</a>
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
</div>
|
||||
<div id="profile_links" n:if="isset($thisUser)">
|
||||
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportUser({$user->getId()})">{_report}</a>
|
||||
<a n:if="!$user->isHideFromGlobalFeedEnabled()" class="profile_link" style="display:block;width:96%;" id="__ignoreSomeone" data-val='{!$ignore_status ? 1 : 0}' data-id="{$user->getId()}">
|
||||
{if !$ignore_status}{_ignore_user}{else}{_unignore_user}{/if}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
</div>
|
||||
<div id="profile_links" n:if="isset($thisUser)">
|
||||
<a n:if="!$blacklist_status" id="_bl_toggler" data-val="0" data-id="{$user->getRealId()}" class="profile_link" style="display:block;width:96%;">{_bl_remove}</a>
|
||||
<a n:if="!$user->isHideFromGlobalFeedEnabled()" class="profile_link" style="display:block;width:96%;" id="__ignoreSomeone" data-val='{!$ignore_status ? 1 : 0}' data-id="{$user->getId()}">
|
||||
{if !$ignore_status}{_ignore_user}{else}{_unignore_user}{/if}
|
||||
</a>
|
||||
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportUser({$user->getId()})">{_report}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue