2021-11-27 15:19:17 +03:00
|
|
|
{var $space = 2}
|
|
|
|
{var $pageCount = ceil($conf->count / $conf->perPage)}
|
|
|
|
|
2021-12-04 14:25:57 +03:00
|
|
|
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" n:class="paginator, $conf->atBottom ? paginator-at-bottom">
|
2021-11-27 15:19:17 +03:00
|
|
|
{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}
|
|
|
|
{for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++}
|
|
|
|
{if $j > 0 && $j <= $pageCount}
|
|
|
|
<a n:attr="class => ($conf->page === $j ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => $j]), 'k', '&', PHP_QUERY_RFC3986)}">{$j}</a>
|
|
|
|
{/if}
|
|
|
|
{/for}
|
|
|
|
{if $conf->page <= $pageCount-$space}
|
|
|
|
<a n:attr="class => ($conf->page === $pageCount ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => $pageCount]), 'k', '&', PHP_QUERY_RFC3986)}">»</a>
|
|
|
|
{/if}
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|