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
|
@ -40,6 +40,7 @@
|
||||||
"count" => $count,
|
"count" => $count,
|
||||||
"amount" => sizeof($data),
|
"amount" => sizeof($data),
|
||||||
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
|
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
|
||||||
|
"atBottom" => true,
|
||||||
]}
|
]}
|
||||||
</div>
|
</div>
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"count" => $count,
|
"count" => $count,
|
||||||
"amount" => sizeof($gifts),
|
"amount" => sizeof($gifts),
|
||||||
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
||||||
|
"atBottom" => true,
|
||||||
]}
|
]}
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{var $space = 2}
|
{var $space = 2}
|
||||||
{var $pageCount = ceil($conf->count / $conf->perPage)}
|
{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}
|
{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>
|
<a n:attr="class => ($conf->page === 1 ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => 1]), 'k', '&', PHP_QUERY_RFC3986)}">«</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1560,6 +1560,10 @@ body.scrolled .toTop:hover {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paginator-at-bottom {
|
||||||
|
margin-top: -6px;
|
||||||
|
}
|
||||||
|
|
||||||
.paginator a {
|
.paginator a {
|
||||||
border-top: 3px solid transparent;
|
border-top: 3px solid transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
Loading…
Reference in a new issue