Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show pagination always
Browse files Browse the repository at this point in the history
alexander-schranz committed Sep 29, 2024
1 parent a318844 commit b184056
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions packages/seal-ui/templates/view/engines.inc.php
Original file line number Diff line number Diff line change
@@ -154,17 +154,13 @@
<?php $limit = $parameters['limit']; ?>
<?php $lastPage = \ceil($result->total() / $limit); ?>

<?php if ($page > 0) { ?>
<button form="search" type="submit" name="page" value="<?php echo $page - 1; ?>" style="cursor: pointer; padding: 4px 12px; width: auto; height: 40px; text-align: center; border: none; background: #fff; border: 2px solid #ccc; font-weight: bold; border-radius: 4px;">
Previous
</button>
<?php } ?>
<button <?php if ($page <= 1) { ?> disabled <?php } ?> form="search" type="submit" name="page" value="<?php echo $page - 1; ?>" style="cursor: pointer; padding: 4px 12px; width: auto; height: 40px; text-align: center; border: none; background: #fff; border: 2px solid #ccc; font-weight: bold; border-radius: 4px;">
Previous
</button>

<?php if ($page < $lastPage) { ?>
<button form="search" type="submit" name="page" value="<?php echo $page + 1; ?>" style="cursor: pointer; padding: 4px 12px; width: auto; height: 40px; text-align: center; border: none; background: #fff; border: 2px solid #ccc; font-weight: bold; border-radius: 4px;">
Next
</button>
<?php } ?>
<button <?php if ($page >= $lastPage) { ?> disabled <?php } ?> form="search" type="submit" name="page" value="<?php echo $page + 1; ?>" style="cursor: pointer; padding: 4px 12px; width: auto; height: 40px; text-align: center; border: none; background: #fff; border: 2px solid #ccc; font-weight: bold; border-radius: 4px;">
Next
</button>
</div>
</main>
<?php } ?>

0 comments on commit b184056

Please sign in to comment.