| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
die('Access denied.'); |
| 4 |
} |
| 5 |
?> |
| 6 |
<div class="tablenav-pages e2pdf-tablenav-pages"><span class="displaying-num"> |
| 7 |
<?php echo esc_html(sprintf(__("Templates: %d", 'e2pdf'), $this->tpl_args->get('total'))); ?></span> |
| 8 |
<span class="pagination-links"> |
| 9 |
<?php if (($this->tpl_args->get('paged')) > 2) { ?> |
| 10 |
<a class="first-page button" href="<?php echo esc_url($this->helper->get_url($this->tpl_args->get('url'))); ?>"><span class="screen-reader-text"><?php _e('First page', 'e2pdf') ?></span><span aria-hidden="true">«</span></a> |
| 11 |
<?php } else { ?> |
| 12 |
<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span> |
| 13 |
<?php } ?> |
| 14 |
|
| 15 |
<?php if (($this->tpl_args->get('paged')) > 1) { ?> |
| 16 |
<a class="prev-page button" href="<?php echo esc_url($this->helper->get_url($this->tpl_args->get('paged') > 2 ? array_merge($this->tpl_args->get('url'), array('paged' => $this->tpl_args->get('paged') - 1)) : $this->tpl_args->get('url'))); ?>"><span class="screen-reader-text"><?php _e('Prev page', 'e2pdf') ?></span><span aria-hidden="true">‹</span></a> |
| 17 |
<?php } else { ?> |
| 18 |
<span class="tablenav-pages-navspan button disabled" aria-hidden="true">‹</span> |
| 19 |
<?php } ?> |
| 20 |
<span class="screen-reader-text"><?php _e('Current Page', 'e2pdf') ?></span> |
| 21 |
<span id="table-paging" class="paging-input"> |
| 22 |
<span class="tablenav-paging-text"> |
| 23 |
<?php |
| 24 |
echo sprintf( |
| 25 |
esc_html__('%d of ', 'e2pdf'), |
| 26 |
(int) $this->tpl_args->get('paged') |
| 27 |
); |
| 28 |
?> |
| 29 |
<span class="total-pages"> |
| 30 |
<?php echo (int) ($this->tpl_args->get('total') ? ceil((int) $this->tpl_args->get('total') / (int) $this->tpl_args->get('limit')) : 1); ?> |
| 31 |
</span> |
| 32 |
</span> |
| 33 |
</span> |
| 34 |
<?php if ((ceil($this->tpl_args->get('total') / $this->tpl_args->get('limit')) - $this->tpl_args->get('paged')) >= 1) { ?> |
| 35 |
<a class="next-page button" href="<?php echo esc_url($this->helper->get_url(array_merge($this->tpl_args->get('url'), array('paged' => $this->tpl_args->get('paged') + 1)))); ?>"><span class="screen-reader-text"><?php _e('Next page', 'e2pdf') ?></span><span aria-hidden="true">›</span></a> |
| 36 |
<?php } else { ?> |
| 37 |
<span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span> |
| 38 |
<?php } ?> |
| 39 |
|
| 40 |
<?php if ((ceil($this->tpl_args->get('total') / $this->tpl_args->get('limit')) - $this->tpl_args->get('paged')) >= 2) { ?> |
| 41 |
<a class="last-page button" href="<?php echo esc_url($this->helper->get_url(array_merge($this->tpl_args->get('url'), array('paged' => ceil($this->tpl_args->get('total') / $this->tpl_args->get('limit')))))); ?>"><span class="screen-reader-text"><?php _e('Last page', 'e2pdf') ?></span><span aria-hidden="true">»</span></a> |
| 42 |
<?php } else { ?> |
| 43 |
<span class="tablenav-pages-navspan button disabled" aria-hidden="true">»</span> |
| 44 |
<?php } ?> |
| 45 |
</span> |
| 46 |
</div> |