Remove buttons from paginator when are not need it
This commit is contained in:
parent
d6f0073446
commit
5779635bd4
|
@ -84,22 +84,23 @@
|
||||||
<ul class="pagination flex-wrap justify-content-center">
|
<ul class="pagination flex-wrap justify-content-center">
|
||||||
|
|
||||||
<!-- Previous button -->
|
<!-- Previous button -->
|
||||||
<li class="page-item mr-2 <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
<?php if (Paginator::showPrev()): ?>
|
||||||
|
<li class="page-item mr-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Home button -->
|
<!-- Home button -->
|
||||||
<?php if (Paginator::currentPage() > 1): ?>
|
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
||||||
<li class="page-item">
|
<a class="page-link" href="<?php echo Theme::siteUrl() ?>"><?php echo $L->get('Home'); ?></a>
|
||||||
<a class="page-link" href="<?php echo Theme::siteUrl() ?>">Home</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<!-- Next button -->
|
<!-- Next button -->
|
||||||
<li class="page-item ml-2 <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
<?php if (Paginator::showNext()): ?>
|
||||||
|
<li class="page-item ml-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
||||||
</li>
|
</li>
|
||||||
|
<?php endif; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
Loading…
Reference in New Issue