first commit
This commit is contained in:
38
templates_user/site/pager.php
Normal file
38
templates_user/site/pager.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
global $lang;
|
||||
$this -> page['language']['seo_link'] ? $link = $this -> page['language']['seo_link'] : $link = 's-' . $this -> page['id'] . '-' . \S::seo( $this -> page['language']['title'] );
|
||||
$range = 2;
|
||||
$start = max(1, $this->bs - $range);
|
||||
$end = min($this->ls, $this->bs + $range);
|
||||
?>
|
||||
<? if ($this->ls > 1): ?>
|
||||
<ul class="pager">
|
||||
<?php if ($this->bs > 1): ?>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $this->bs - 1;?>"><img alt="Poprzednia strona" src="/upload/filemanager/icons/previous.svg" /></a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><img alt="Poprzednia strona" src="/upload/filemanager/icons/previous.svg" /></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php for ($i = $start; $i <= $end; $i++): ?>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $i;?>" <?php if ($i == $this->bs) echo 'class="active"'; ?>>
|
||||
<?= $i; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
|
||||
<?php if ($this->bs < $this->ls): ?>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $this->bs + 1;?>"><img alt="Następna strona" src="/upload/filemanager/icons/next.svg" /></a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><img alt="Następna strona" src="/upload/filemanager/icons/next.svg" /></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user