add pagination to admin->content

This commit is contained in:
Diego Najar 2018-07-18 23:16:30 +02:00
parent 91b8bb1097
commit 9712cd20f6
2 changed files with 26 additions and 2 deletions

View File

@ -158,7 +158,31 @@ function table($type) {
<div class="tab-content"> <div class="tab-content">
<!-- TABS PAGES --> <!-- TABS PAGES -->
<div class="tab-pane show active" id="pages" role="tabpanel"> <div class="tab-pane show active" id="pages" role="tabpanel">
<?php table('published'); ?> <?php table('published'); ?>
<!-- Paginator -->
<nav class="paginator">
<ul class="pagination flex-wrap justify-content-center">
<!-- Previous button -->
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1"><?php echo $Language->get('Previous'); ?></a>
</li>
<!-- List of pages -->
<?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?>
<li class="page-item <?php if ($i==Paginator::currentPage()) echo 'active' ?>">
<a class="page-link" href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a>
</li>
<?php endfor ?>
<!-- Next button -->
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $Language->get('Next'); ?></a>
</li>
</ul>
</nav>
</div> </div>
<!-- TABS STATIC --> <!-- TABS STATIC -->

View File

@ -45,7 +45,7 @@
<!-- Pagination --> <!-- Pagination -->
<?php if (Paginator::amountOfPages()>1): ?> <?php if (Paginator::amountOfPages()>1): ?>
<nav class="paginator" aria-label="Page navigation"> <nav class="paginator">
<ul class="pagination flex-wrap justify-content-center"> <ul class="pagination flex-wrap justify-content-center">
<!-- Previous button --> <!-- Previous button -->