completely flarched it
This commit is contained in:
@@ -1,25 +1,65 @@
|
||||
<form class="form-floating">
|
||||
<div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-2 me-auto ms-auto g-2 btn-group">
|
||||
<button class="btn btn-outline-primary"><span class="bi bi-chevron-double-left"</button>
|
||||
<button class="btn btn-outline-primary"><span class="bi bi-chevron-left"</button>
|
||||
<button class="btn btn-outline-primary" disabled>...</button>
|
||||
<button class="btn btn-outline-primary">1</button>
|
||||
<button class="btn btn-outline-primary">2</button>
|
||||
<button class="btn btn-outline-primary">3</button>
|
||||
<button class="btn btn-outline-primary"><span class="bi bi-chevron-right"</button>
|
||||
<button class="btn btn-outline-primary"><span class="bi bi-chevron-double-right"</button>
|
||||
</div>
|
||||
<!-- Form for Pagination -->
|
||||
<form class="col-auto m-auto" method="POST" action="">
|
||||
<div class="btn-group">
|
||||
<!-- Start Button -->
|
||||
<button type="submit" name="pageButtons" value="0"
|
||||
class="btn btn-outline-primary"
|
||||
<?= $view->pageNumber <= 0 ? 'disabled' : '' ?>>
|
||||
<i class="bi bi-chevron-double-left"></i> Start
|
||||
</button>
|
||||
|
||||
<!-- Back Button -->
|
||||
<button type="submit" name="pageButtons" value="<?= max($view->pageNumber - 1, 0) ?>"
|
||||
class="btn btn-outline-primary"
|
||||
<?= $view->pageNumber <= 0 ? 'disabled' : '' ?>>
|
||||
<i class="bi bi-chevron-left"></i> Back
|
||||
</button>
|
||||
|
||||
<!-- Dynamic Page Buttons -->
|
||||
<?php
|
||||
$totalPages = $view->paginator->getTotalPages();
|
||||
for ($i = $view->pageNumber - 2; $i <= $view->pageNumber + 2; $i++) {
|
||||
if ($i >= 0 && $i < $totalPages): ?>
|
||||
<button type="submit" name="pageButtons" value="<?= $i ?>"
|
||||
class="btn <?= $i === $view->pageNumber ? 'btn-dark' : 'btn-outline-primary' ?>"
|
||||
<?= $i === $view->pageNumber ? 'disabled' : '' ?>>
|
||||
<?= $i + 1 ?>
|
||||
</button>
|
||||
<?php endif;
|
||||
} ?>
|
||||
|
||||
<!-- Forward Button -->
|
||||
<button type="submit" name="pageButtons" value="<?= min($view->pageNumber + 1, $totalPages - 1) ?>"
|
||||
class="btn btn-outline-primary"
|
||||
<?= $view->pageNumber >= $totalPages - 1 ? 'disabled' : '' ?>>
|
||||
Forward <i class="bi bi-chevron-right"></i>
|
||||
</button>
|
||||
|
||||
<!-- End Button -->
|
||||
<button type="submit" name="pageButtons" value="<?= $totalPages - 1 ?>"
|
||||
class="btn btn-outline-primary"
|
||||
<?= $view->pageNumber >= $totalPages - 1 ? 'disabled' : '' ?>>
|
||||
End <i class="bi bi-chevron-double-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-1 me-auto ms-auto form-floating">
|
||||
<select id="pagedown" class="form-select">
|
||||
<option value="current" selected>1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
</select>
|
||||
<label for="pagedown">Page</label>
|
||||
<!-- div class="row">
|
||||
<div class="col-1 me-auto ms-auto">
|
||||
<form class="form-floating" method="POST" action="">
|
||||
<select name='pageDown' class="form-select" onchange="this.form.submit()">
|
||||
<?php for($i=0; $i<=$view->paginator->getTotalPages()-1; $i++): ?>
|
||||
<?php if($i == $view->paginator->getPageFromUri()): ?>
|
||||
<?= "<option selected value='" . $i . "'>" . ($i+1) . "</option>" ?>
|
||||
<?php else : ?>
|
||||
<?= "<option value='" . $i . "'>" . ($i+1) . "</option>" ?>
|
||||
<?php endif; ?>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<label for="pageDown">Page</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div -->
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user