Skip to content
Snippets Groups Projects
Commit 4d0554ad authored by Chris Hallberg's avatar Chris Hallberg Committed by Robert Lange
Browse files

Pagination roles.

parent 8927b3d7
No related merge requests found
<?php if ($this->pageCount): ?> <?php if ($this->pageCount): ?>
<ul class="pagination" aria-label="<?=$this->transEsc('pagination_label')?>"> <ul class="pagination">
<?php if (isset($this->previous)): ?> <?php if (isset($this->previous)): ?>
<?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> <?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?>
<li role="none"> <li><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage(1)?>">[1]</a></li>
<a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage(1)?>" aria-label="<?=$this->transEsc('page_first')?>">[1]</a>
</li>
<?php endif; ?> <?php endif; ?>
<li role="none"> <li><a class="page-prev" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>"><span aria-hidden="true">&laquo;</span> <?=$this->transEsc('Prev')?></a></li>
<a class="page-prev" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>" aria-label="<?=$this->transEsc('page_prev')?>">
<i class="fa fa-angle-left" aria-hidden="true"></i>
<?=$this->transEsc('Prev')?>
</a>
</li>
<?php endif; ?> <?php endif; ?>
<?php if (count($this->pagesInRange) > 1): ?> <?php if (count($this->pagesInRange) > 1): ?>
<?php foreach ($this->pagesInRange as $page): ?> <?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): ?> <?php if ($page != $this->current): ?>
<li role="none"> <li><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>"><?=$page?></a></li>
<a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>" aria-label="<?=$this->transEsc('page_no', ['%%page%%' => $page])?>"><?=$page?></a>
</li>
<?php else: ?> <?php else: ?>
<li role="none" class="active" aria-current="page"><span><?=$page?></span></li> <li class="active" aria-current="page"><span><?=$page?></span></li>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
<?php if (isset($this->next)): ?> <?php if (isset($this->next)): ?>
<li role="none"> <li><a class="page-next" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>"><?=$this->transEsc('Next');?> <span aria-hidden="true">&raquo;</span></a></li>
<a class="page-next" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>" aria-label="<?=$this->transEsc('page_next')?>">
<?=$this->transEsc('Next');?>
<i class="fa fa-angle-right" aria-hidden="true"></i>
</a>
</li>
<?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> <?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?>
<li role="none"> <li><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>">[<?=$this->pageCount?>]</a></li>
<a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>" aria-label="<?=$this->transEsc('page_last')?>">[<?=$this->pageCount?>]</a>
</li>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment