From 8e6d396f936fe2d5e53a14bd4f3c1e15820310cd Mon Sep 17 00:00:00 2001 From: lalka2016 <99399973+lalka2016@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:24:26 +0300 Subject: [PATCH] It works --- Web/Presenters/templates/Messenger/Index.xml | 4 +- Web/Presenters/templates/Notes/List.xml | 10 ++++- Web/Presenters/templates/Notes/View.xml | 3 +- Web/Presenters/templates/Photos/Album.xml | 4 +- Web/Presenters/templates/Photos/Photo.xml | 2 +- Web/Presenters/templates/Search/Index.xml | 40 ++++++++++++------- Web/Presenters/templates/Support/Index.xml | 4 +- Web/Presenters/templates/Videos/View.xml | 3 +- Web/Presenters/templates/Wall/Feed.xml | 10 +++-- Web/Presenters/templates/Wall/Post.xml | 3 +- .../templates/components/comment.xml | 2 +- .../templates/components/comments.xml | 2 + Web/Presenters/templates/components/post.xml | 2 - Web/Presenters/templates/components/wall.xml | 8 ++-- Web/static/js/al_wall.js | 4 +- Web/static/js/openvk.cls.js | 12 ++++-- 16 files changed, 74 insertions(+), 39 deletions(-) diff --git a/Web/Presenters/templates/Messenger/Index.xml b/Web/Presenters/templates/Messenger/Index.xml index ff7ccfd1..85464d26 100644 --- a/Web/Presenters/templates/Messenger/Index.xml +++ b/Web/Presenters/templates/Messenger/Index.xml @@ -17,9 +17,9 @@ {if sizeof($corresps) > 0} -
+
{var $recipient = $coresp->getCorrespondents()[1]} {var $lastMsg = $coresp->getPreviewMessage()} diff --git a/Web/Presenters/templates/Notes/List.xml b/Web/Presenters/templates/Notes/List.xml index 03ac2df2..b9f71790 100644 --- a/Web/Presenters/templates/Notes/List.xml +++ b/Web/Presenters/templates/Notes/List.xml @@ -105,7 +105,15 @@
-
+ + + {include "../components/paginator.xml", conf => (object) [ + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => true, + ]} {else} {if isset($thisUser) && $thisUser->getId() == $owner->getId()} diff --git a/Web/Presenters/templates/Notes/View.xml b/Web/Presenters/templates/Notes/View.xml index e168c237..2494ce8a 100644 --- a/Web/Presenters/templates/Notes/View.xml +++ b/Web/Presenters/templates/Notes/View.xml @@ -77,6 +77,7 @@ page => $cPage, model => "notes", parent => $note, - showTitle => false} + showTitle => false, + fromPost => true} {/block} diff --git a/Web/Presenters/templates/Photos/Album.xml b/Web/Presenters/templates/Photos/Album.xml index 6f22c490..eec210e8 100644 --- a/Web/Presenters/templates/Photos/Album.xml +++ b/Web/Presenters/templates/Photos/Album.xml @@ -29,10 +29,10 @@ {/if}

{if $album->getPhotosCount() > 0} -
+
{foreach $photos as $photo} {php if($photo->isDeleted()) continue; } -
+
diff --git a/Web/Presenters/templates/Photos/Photo.xml b/Web/Presenters/templates/Photos/Photo.xml index ad9f9efd..1d387867 100644 --- a/Web/Presenters/templates/Photos/Photo.xml +++ b/Web/Presenters/templates/Photos/Photo.xml @@ -28,7 +28,7 @@
- {include "../components/comments.xml", comments => $comments, count => $cCount, page => $cPage, model => "photos", parent => $photo} + {include "../components/comments.xml", comments => $comments, count => $cCount, page => $cPage, model => "photos", parent => $photo, fromPost => true}
diff --git a/Web/Presenters/templates/Search/Index.xml b/Web/Presenters/templates/Search/Index.xml index 4d629890..f6aee47c 100644 --- a/Web/Presenters/templates/Search/Index.xml +++ b/Web/Presenters/templates/Search/Index.xml @@ -139,13 +139,15 @@ }
- {include "../components/paginator.xml", conf => (object) [ - "page" => $page, - "count" => $count, - "amount" => sizeof($data), - "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, - "atBottom" => false, - ]} + {if isset($thisUser) && $thisUser->getPaginatorType() == 0} + {include "../components/paginator.xml", conf => (object) [ + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => false, + ]} + {/if}

{tr("results", $count)} @@ -154,10 +156,10 @@ {include searchOptions} {var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} -

+
{if sizeof($data) > 0} {if $type == "users" || $type == "groups" || $type == "apps"} -
+
@@ -187,7 +189,7 @@
{elseif $type == "posts"} -
+
{if !$dat || $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()} {_closed_group_post}. {else} @@ -195,7 +197,7 @@ {/if}
{elseif $type == "comments"} -
+
{if !$dat->getTarget() || $dat->getTarget()->isDeleted()} {_deleted_target_comment}. {else} @@ -204,9 +206,9 @@
{elseif $type == "videos"} {foreach $data as $dat} -
- {include "../components/video.xml", video => $dat} -
+
+ {include "../components/video.xml", video => $dat} +
{/foreach} {elseif $type == "audios"} хуй @@ -218,6 +220,16 @@ {include "../components/nothing.xml"} {/ifset} {/if} + + {if isset($thisUser) && $thisUser->getPaginatorType() == 1} + {include "../components/paginator.xml", conf => (object) [ + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => false, + ]} + {/if}