Arc-hive-omeka-theme/view/common/pagination.phtml

35 lines
1.5 KiB
PHTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$translate = $this->plugin('translate');
?>
<nav class="omeka-pagination" role="navigation">
<?php if ($totalCount): ?>
<form method="GET" action="">
<?php echo $this->queryToHiddenInputs(['page']); ?>
<input type="text" name="page" class="page-input-top" value="<?php echo $currentPage; ?>" size="4" <?php echo ($pageCount == 1) ? 'readonly' : ''; ?> aria-label="<?php echo $translate('Page'); ?>">
<span class="page-count"><?php echo sprintf($translate('of %s'), $pageCount); ?></span>
</form>
<div class="button-group">
<?php if ($currentPage != 1): ?>
<?php echo $this->hyperlink('', $previousPageUrl, ['class' => 'previous o-icon-prev button', 'title' => $translate('Previous'), 'aria-label' => $translate('Previous')]); ?>
<?php else: ?>
<span class="previous o-icon-prev button inactive"></span>
<?php endif; ?>
<?php if ($currentPage < $pageCount): ?>
<?php echo $this->hyperlink('', $nextPageUrl, ['class' => 'next o-icon-next button', 'title' => $translate('Next'), 'aria-label' => $translate('Next')]); ?>
<?php else: ?>
<span class="next o-icon-next button inactive"></span>
<?php endif; ?>
</div>
<?php
$from = $offset + 1;
$to = ($currentPage < $pageCount) ? $offset + $perPage : $totalCount;
?>
<span class="row-count"><?php echo sprintf($translate('%1$s%2$s of %3$s'), $from, $to, $totalCount); ?></span>
<?php else: ?>
<?php echo $translate('0 results'); ?>
<?php endif; ?>
</nav>