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