diff --git a/Web/Presenters/templates/Group/View.xml b/Web/Presenters/templates/Group/View.xml index 2fd92915..8ad540f7 100644 --- a/Web/Presenters/templates/Group/View.xml +++ b/Web/Presenters/templates/Group/View.xml @@ -129,13 +129,15 @@ {var $avatarLink = ((is_null($avatarPhoto) ? FALSE : $avatarPhoto->isAnonymous()) ? "/photo" . ("s/" . base_convert((string) $avatarPhoto->getId(), 10, 32)) : $club->getAvatarLink())}
{if $thisUser && $club->canBeModifiedBy($thisUser)} - {_add_image} -
-
- -
+
+
+ +
{/if} diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index 9c013dd1..5aa90fa0 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -73,11 +73,13 @@ {var $hasAvatar = !str_contains($user->getAvatarUrl('miniscule'), "/assets/packages/static/openvk/img/camera_200.png")} {if $thisUser && $user->getId() == $thisUser->getId()} - {_add_image} -
-
+ {/if} diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 7423c656..fd385b67 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -2179,9 +2179,11 @@ $(document).on("click", "#add_image", (e) => { document.querySelector("#bigAvatar").src = response.url document.querySelector("#bigAvatar").parentNode.href = "/photo" + response.new_photo - - document.querySelector(".add_image_text").style.display = "none" + document.querySelector(".avatar_controls").style.display = "block" + document.querySelector(".avatar_controls .set_image").style.display = "block" + document.querySelector(".avatar_controls .avatarDelete").style.display = "block" + document.querySelector(".avatar_controls .upload_image").style.display = "none" } }) }) @@ -2314,8 +2316,9 @@ $(document).on("click", ".avatarDelete", (e) => { document.querySelector("#bigAvatar").parentNode.href = response.new_photo ? ("/photo" + response.new_photo) : "javascript:void(0)" if(!response.has_new_photo) { - document.querySelector(".avatar_controls").style.display = "none" - document.querySelector(".add_image_text").style.display = "block" + document.querySelector(".avatar_controls .set_image").style.display = "none" + document.querySelector(".avatar_controls .avatarDelete").style.display = "none" + document.querySelector(".avatar_controls .upload_image").style.display = "block" } } })