xref: /webtrees/resources/views/modules/media-list/pagination.phtml (revision afc2d1902ecd3bf5ad093d4f0c848f540e3f1cc8)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Module\ModuleListInterface;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string              $filter
9 * @var string              $folder
10 * @var string              $format
11 * @var int                 $max
12 * @var ModuleListInterface $module
13 * @var int                 $page
14 * @var int                 $pages
15 * @var string              $subdirs
16 * @var Tree                $tree
17 */
18
19?>
20
21<div class="row text-center">
22    <div class="col">
23        <?php if ($page > 1) : ?>
24            <a class="btn btn-outline-secondary" href="<?= e($module->listUrl($tree, ['go' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'format' => $format, 'max' => $max, 'page' => 1])) ?>">
25                <?= I18N::translate('first') ?>
26            </a>
27        <?php endif ?>
28    </div>
29
30    <div class="col">
31        <?php if ($page > 1) : ?>
32            <a class="btn btn-outline-secondary" href="<?= e($module->listUrl($tree, ['go' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'format' => $format, 'max' => $max, 'page' => $page - 1])) ?>">
33                <?= I18N::translate('previous') ?>
34            </a>
35        <?php endif ?>
36    </div>
37
38    <div class="col">
39        <?= I18N::translate('Page %s of %s', I18N::number($page), I18N::number($pages)) ?>
40    </div>
41
42    <div class="col">
43        <?php if ($page < $pages) : ?>
44            <a class="btn btn-outline-secondary" href="<?= e($module->listUrl($tree, ['go' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'format' => $format, 'max' => $max, 'page' => $page + 1])) ?>">
45                <?= I18N::translate('next') ?>
46            </a>
47        <?php endif ?>
48    </div>
49
50    <div class="col">
51        <?php if ($page < $pages) : ?>
52            <a class="btn btn-outline-secondary" href="<?= e($module->listUrl($tree, ['go' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'format' => $format, 'max' => $max, 'page' => $pages])) ?>">
53                <?= I18N::translate('last') ?>
54            </a>
55        <?php endif ?>
56    </div>
57</div>
58