From: Simon Cozens Date: Thu, 5 Apr 2007 05:08:56 +0000 (+0000) Subject: Always used the "paged" template for multiple photo display. Fixes #19. X-Git-Tag: 1.2+svn20070808~11 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2fbbd5523381d92d751d9930ccd2993449a508da;p=memories.git 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 --- 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) %]