From 4048f21f59ab40875011030c1101af40f263032e Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Sat, 4 Dec 2021 13:25:57 +0200 Subject: [PATCH] Global: Fix paginator display in lists It's probably a crutch, but oh well. Just continued an existing crutch --- Web/Presenters/templates/@listView.xml | 9 +++++---- Web/Presenters/templates/Gifts/Pick.xml | 9 +++++---- Web/Presenters/templates/components/paginator.xml | 2 +- Web/static/css/style.css | 4 ++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index 7aac1fa1..58d51dff 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -36,10 +36,11 @@
{include "components/paginator.xml", conf => (object) [ - "page" => $page, - "count" => $count, - "amount" => sizeof($data), - "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => true, ]}
{else} diff --git a/Web/Presenters/templates/Gifts/Pick.xml b/Web/Presenters/templates/Gifts/Pick.xml index c2240d2b..9f6164ae 100644 --- a/Web/Presenters/templates/Gifts/Pick.xml +++ b/Web/Presenters/templates/Gifts/Pick.xml @@ -34,10 +34,11 @@
{include "../components/paginator.xml", conf => (object) [ - "page" => $page, - "count" => $count, - "amount" => sizeof($gifts), - "perPage" => OPENVK_DEFAULT_PER_PAGE, + "page" => $page, + "count" => $count, + "amount" => sizeof($gifts), + "perPage" => OPENVK_DEFAULT_PER_PAGE, + "atBottom" => true, ]}
{/block} diff --git a/Web/Presenters/templates/components/paginator.xml b/Web/Presenters/templates/components/paginator.xml index 8d1fec43..607c0e08 100644 --- a/Web/Presenters/templates/components/paginator.xml +++ b/Web/Presenters/templates/components/paginator.xml @@ -1,7 +1,7 @@ {var $space = 2} {var $pageCount = ceil($conf->count / $conf->perPage)} -
+
{if $conf->page > $space} « {/if} diff --git a/Web/static/css/style.css b/Web/static/css/style.css index c80861de..ed5be910 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -1560,6 +1560,10 @@ body.scrolled .toTop:hover { margin-top: -1px; } +.paginator-at-bottom { + margin-top: -6px; +} + .paginator a { border-top: 3px solid transparent; display: inline-block;