From 2fbbd5523381d92d751d9930ccd2993449a508da Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Thu, 5 Apr 2007 05:08:56 +0000 Subject: [PATCH] Always used the "paged" template for multiple photo display. Fixes #19. git-svn-id: http://svn.simon-cozens.org/memories/trunk@57 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Memories/Photo.pm | 4 ++-- templates/photo/paged | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Memories/Photo.pm b/Memories/Photo.pm index 9e922f3..5ce8d95 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -65,7 +65,7 @@ sub do_upload :Exported { } $r->objects(\@photos); if (@photos == 0) { $r->template("upload"); return } - if (@photos > 1) { $r->template("list") } + if (@photos > 1) { $r->template_args->{title} = "This upload"; $r->template("paged") } else { $r->template("view"); } $r->message("Thanks for the upload!"); } @@ -84,7 +84,7 @@ sub quarantine :Exported { } $r->{session}{quarantined} = join ",", sort keys %q; if (!$r->{session}{quarantined}) { - $r->template("list"); + $r->template_args->{title} = "This upload"; $r->template("paged"); $r->objects([ map { $self->retrieve($_) } @quarantined ]); } else { $r->objects([ map { $self->retrieve($_) } sort keys %q ]); diff --git a/templates/photo/paged b/templates/photo/paged index 8009fe8..549682d 100644 --- a/templates/photo/paged +++ b/templates/photo/paged @@ -1,6 +1,6 @@ [% INCLUDE header %] [% PROCESS macros %] -

Most [% request.action %] photos

+

[% IF title; title | html; ELSE %] Most [% request.action %] photos [% END %]

[% WHILE photos.size > 0 %] [% SET triple = photos.splice(0,3) %] -- 2.39.2