From b058481c5c86f3165e290de0cc97e828be1bd169 Mon Sep 17 00:00:00 2001 From: makar0nny Date: Sun, 23 Apr 2023 19:32:45 +0300 Subject: [PATCH] Changing avatar like in old VK --- Web/Presenters/templates/Group/View.xml | 45 ++++++++++++++-- Web/Presenters/templates/User/View.xml | 51 ++++++++++++++++-- Web/Presenters/templates/_includeCSS.xml | 7 +-- Web/static/css/avataredit.css | 63 +++++++++++++++++++++++ Web/static/img/delete.png | Bin 0 -> 238 bytes Web/static/img/miniature.png | Bin 0 -> 178 bytes Web/static/img/upload.png | Bin 0 -> 211 bytes Web/static/js/openvk.cls.js | 62 +++++++++++++++++++++- locales/en.strings | 18 ++++++- locales/ru.strings | 19 ++++++- 10 files changed, 251 insertions(+), 14 deletions(-) create mode 100644 Web/static/css/avataredit.css create mode 100644 Web/static/img/delete.png create mode 100644 Web/static/img/miniature.png create mode 100644 Web/static/img/upload.png diff --git a/Web/Presenters/templates/Group/View.xml b/Web/Presenters/templates/Group/View.xml index e09e3f5f..bc10caba 100644 --- a/Web/Presenters/templates/Group/View.xml +++ b/Web/Presenters/templates/Group/View.xml @@ -96,9 +96,48 @@
{var $avatarPhoto = $club->getAvatarPhoto()} {var $avatarLink = ((is_null($avatarPhoto) ? FALSE : $avatarPhoto->isAnonymous()) ? "/photo" . ("s/" . base_convert((string) $avatarPhoto->getId(), 10, 32)) : $club->getAvatarLink())} - - - +
+ {if !is_null($thisUser) && $club->canBeModifiedBy($thisUser)} + {if is_null($avatarPhoto) == true} + {_add_photo} + {else} + + + + {/if} + {/if} + {if is_null($avatarPhoto) == false} + + +