mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Global: Fix paginator display in lists
It's probably a crutch, but oh well. Just continued an existing crutch
This commit is contained in:
parent
0cca615d2a
commit
4048f21f59
4 changed files with 15 additions and 9 deletions
|
@ -36,10 +36,11 @@
|
|||
|
||||
<div style="padding: 8px;">
|
||||
{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,
|
||||
]}
|
||||
</div>
|
||||
{else}
|
||||
|
|
|
@ -34,10 +34,11 @@
|
|||
|
||||
<div style="padding: 8px;">
|
||||
{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,
|
||||
]}
|
||||
</div>
|
||||
{/block}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{var $space = 2}
|
||||
{var $pageCount = ceil($conf->count / $conf->perPage)}
|
||||
|
||||
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" class="paginator">
|
||||
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" n:class="paginator, $conf->atBottom ? paginator-at-bottom">
|
||||
{if $conf->page > $space}
|
||||
<a n:attr="class => ($conf->page === 1 ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => 1]), 'k', '&', PHP_QUERY_RFC3986)}">«</a>
|
||||
{/if}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue