From 9afebf7d020d65a10ad7a6c423bfd53d5cf4eccb Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:22:12 +0300 Subject: [PATCH] add ignore button to blacklisted users --- Web/Presenters/UserPresenter.php | 4 ++++ Web/Presenters/templates/User/View.xml | 4 +++- Web/Presenters/templates/User/blacklisted.xml | 3 +++ Web/Presenters/templates/User/blacklisted_pov.xml | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index e253f4bb..42fc8c47 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -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"; diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index b4625f68..cbcb1f1f 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -165,8 +165,10 @@ {/if} + {_bl_add} + {* 4 admins *} + {_bl_remove} {_report} - {_bl_add} {if !$ignore_status}{_ignore_user}{else}{_unignore_user}{/if} diff --git a/Web/Presenters/templates/User/blacklisted.xml b/Web/Presenters/templates/User/blacklisted.xml index c88a24dc..bb00bcbb 100644 --- a/Web/Presenters/templates/User/blacklisted.xml +++ b/Web/Presenters/templates/User/blacklisted.xml @@ -18,6 +18,9 @@
diff --git a/Web/Presenters/templates/User/blacklisted_pov.xml b/Web/Presenters/templates/User/blacklisted_pov.xml index 1fcd2fca..1bf85653 100644 --- a/Web/Presenters/templates/User/blacklisted_pov.xml +++ b/Web/Presenters/templates/User/blacklisted_pov.xml @@ -18,6 +18,9 @@