From 6e863134f27ae38afc8847baf01a2705fc11dde8 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko <50026114+maksalees@users.noreply.github.com> Date: Mon, 24 Jan 2022 17:55:43 +0200 Subject: [PATCH 1/4] Photos: Fix code style in AlbumList.xml --- Web/Presenters/templates/Photos/AlbumList.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/Presenters/templates/Photos/AlbumList.xml b/Web/Presenters/templates/Photos/AlbumList.xml index 4c7510b2..40e8b22d 100644 --- a/Web/Presenters/templates/Photos/AlbumList.xml +++ b/Web/Presenters/templates/Photos/AlbumList.xml @@ -38,8 +38,8 @@ {/block} {block description} - {$x->getDescription() ?? $x->getName()}
- {$x->getPhotosCount()} фотографий
- Обновлен {$x->getEditTime() ?? $x->getCreationTime()} - Создан {$x->getCreationTime()}
+ {$x->getDescription() ?? $x->getName()}
+ {$x->getPhotosCount()} фотографий
+ Обновлен {$x->getEditTime() ?? $x->getCreationTime()}
+ Создан {$x->getCreationTime()}
{/block} From 71186631f3cc80726e8f6e915657f3d0635607c3 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Tue, 25 Jan 2022 00:21:58 +0200 Subject: [PATCH 2/4] Global: Fix lists display and CSS formatting fixes --- Web/Presenters/templates/@listView.xml | 2 +- Web/Presenters/templates/Photos/AlbumList.xml | 6 +- Web/static/css/style.css | 60 +++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index 3fd8f26f..35c9a2f0 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -11,7 +11,7 @@ {if sizeof($data) > 0}
- +
diff --git a/Web/Presenters/templates/Photos/AlbumList.xml b/Web/Presenters/templates/Photos/AlbumList.xml index 40e8b22d..7db097d0 100644 --- a/Web/Presenters/templates/Photos/AlbumList.xml +++ b/Web/Presenters/templates/Photos/AlbumList.xml @@ -28,9 +28,9 @@ {var cover = $x->getCoverPhoto()} {var preview = is_null($cover) ? "/assets/packages/static/openvk/img/camera_200.png" : $cover->getURL()} - - {$x->getName()} - + + {$x->getName()} + {/block} {block name} diff --git a/Web/static/css/style.css b/Web/static/css/style.css index add49c26..ff04619b 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -794,9 +794,9 @@ table.User { } .tabs { - border-bottom: 1px solid #707070; - margin-right: -12px; - margin-left: -12px; + border-bottom: 1px solid #707070; + margin-right: -12px; + margin-left: -12px; } #activetabs { @@ -1581,10 +1581,10 @@ body.scrolled .toTop:hover { } .postFeedWrapper { - padding: 4px 8px; - background-color: rgb(240, 240, 240); - border-bottom: 1px solid #ccc; - border-top: 1px solid #ccc; + padding: 4px 8px; + background-color: rgb(240, 240, 240); + border-bottom: 1px solid #ccc; + border-top: 1px solid #ccc; } .user-alert { @@ -1787,36 +1787,36 @@ body.scrolled .toTop:hover { } .summaryBar { - border-bottom: 1px solid #DAE2E8; - clear: both; - padding: 11px 10px; - color: black; - font-weight: normal; - line-height: normal; - margin-left: -12px; - margin-right: -12px; + border-bottom: 1px solid #DAE2E8; + clear: both; + padding: 11px 10px; + color: black; + font-weight: normal; + line-height: normal; + margin-left: -12px; + margin-right: -12px; } .summaryBar .summary { - color: #45688E; - font-weight: bold; - padding-top: 3px; - padding-bottom: 4px; - display: inline-block; + color: #45688E; + font-weight: bold; + padding-top: 3px; + padding-bottom: 4px; + display: inline-block; } .note_header { - background: #f7f7f7; - border-bottom: solid 1px #DAE1E8; - border-top: solid 1px #45688E; - padding: 4px 6px 5px 6px; + background: #f7f7f7; + border-bottom: solid 1px #DAE1E8; + border-top: solid 1px #45688E; + padding: 4px 6px 5px 6px; } .note_header .note_title { - color: #45688E; - font-size: 13px; - font-weight: bold; - line-height: 15px; - margin: 0; - padding: 0 0 1px 0; + color: #45688E; + font-size: 13px; + font-weight: bold; + line-height: 15px; + margin: 0; + padding: 0 0 1px 0; } From eca0f057ca09179023eb4322a0704a5513ab89ff Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Tue, 25 Jan 2022 14:22:33 +0200 Subject: [PATCH 3/4] About: Hide list of most popular groups if there are no groups --- Web/Presenters/AboutPresenter.php | 2 +- .../templates/About/AboutInstance.xml | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Web/Presenters/AboutPresenter.php b/Web/Presenters/AboutPresenter.php index f7131772..bd84efbc 100644 --- a/Web/Presenters/AboutPresenter.php +++ b/Web/Presenters/AboutPresenter.php @@ -63,7 +63,7 @@ final class AboutPresenter extends OpenVKPresenter $this->template->usersStats = (new Users)->getStatistics(); $this->template->clubsCount = (new Clubs)->getCount(); $this->template->postsCount = (new Posts)->getCount(); - $this->template->popularClubs = (new Clubs)->getPopularClubs(); + $this->template->popularClubs = iterator_to_array((new Clubs)->getPopularClubs()); $this->template->admins = iterator_to_array((new Users)->getInstanceAdmins()); } diff --git a/Web/Presenters/templates/About/AboutInstance.xml b/Web/Presenters/templates/About/AboutInstance.xml index 61bd9d2f..af63d9ee 100644 --- a/Web/Presenters/templates/About/AboutInstance.xml +++ b/Web/Presenters/templates/About/AboutInstance.xml @@ -42,15 +42,17 @@
-

{_most_popular_groups}

-
    -
  1. - {$entry->club->getName()} -
    - {tr("participants", $entry->subscriptions)} -
    -
  2. -
+ {if sizeof($popularClubs) !== 0} +

{_most_popular_groups}

+
    +
  1. + {$entry->club->getName()} +
    + {tr("participants", $entry->subscriptions)} +
    +
  2. +
+ {/if}

{_rules}

From 11cd1234362132c8ad599162e097ba2899821444 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko <50026114+maksalees@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:25:49 +0200 Subject: [PATCH 4/4] Discussions: Fix the checkbox "Everyone can create topics" This line was accidentally removed in one of the commits. I return it back. --- Web/Presenters/GroupPresenter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index 4ad9f849..65d3640f 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -207,6 +207,7 @@ final class GroupPresenter extends OpenVKPresenter $club->setShortcode(empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode")); $club->setWall(empty($this->postParam("wall")) ? 0 : 1); $club->setAdministrators_List_Display(empty($this->postParam("administrators_list_display")) ? 0 : $this->postParam("administrators_list_display")); + $club->setEveryone_Can_Create_Topics(empty($this->postParam("everyone_can_create_topics")) ? 0 : 1); $club->setDisplay_Topics_Above_Wall(empty($this->postParam("display_topics_above_wall")) ? 0 : 1); $club->setHide_From_Global_Feed(empty($this->postParam("hide_from_global_feed")) ? 0 : 1);