more fixes for dupcheck

This commit is contained in:
Stian Lund 2024-03-30 17:55:38 +01:00
parent 5532df49aa
commit e8bfe42b3d
2 changed files with 15 additions and 10 deletions

View File

@ -74,15 +74,17 @@ class dupcheck_Controller extends Controller {
->find_all($page_size, $offset);
// Set up the previous and next page buttons.
if ($page > 1) {
$previous_page = $page - 1;
$view->previous_page_link = url::site("dupcheck/dupes?page={$previous_page}");
}
if ($page < $max_pages) {
$next_page = $page + 1;
$view->next_page_link = url::site("dupcheck/dupes?page={$next_page}");
}
// Commented out for causing crash with null assigns
/**
* if ($page > 1) {
* $previous_page = $page - 1;
* $view->previous_page_link = url::site("dupcheck/dupes?page={$previous_page}");
* }
* if ($page < $max_pages) {
* $next_page = $page + 1;
* $view->next_page_link = url::site("dupcheck/dupes?page={$next_page}");
* }
**/
// Set up and display the actual page.
$template = new Theme_View("page.html", "collection", "DuplicatePhotos");
$template->page_title = t("Gallery :: Duplicate Photos");

View File

@ -6,6 +6,8 @@
<h1><?= html::clean($title) ?></h1>
</div>
<?= $theme->paginator() ?>
<ul id="g-album-grid" class="ui-helper-clearfix">
<? foreach ($children as $i => $child): ?>
<li class="g-item <?= $child->is_album() ? "g-album" : "" ?>">
@ -49,6 +51,7 @@ foreach( db::build()
</li>
<? endforeach ?>
</ul>
<?= $theme->dynamic_bottom() ?>
<?= $theme->paginator() ?>
<?= $theme->dynamic_bottom() ?>