From 0771d77e2ce46bafa1c0045ce3bdb726bcda9b03 Mon Sep 17 00:00:00 2001 From: Knut Forkalsrud Date: Mon, 12 Jan 2009 00:35:12 -0800 Subject: [PATCH] Fixed missing $thmb for .photo. Enlarged photo display to 640px --- src/org/forkalsrud/album/web/AlbumServlet.java | 1 + webapp/WEB-INF/velocity.properties | 5 +++++ webapp/WEB-INF/velocity/photo.vm | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 webapp/WEB-INF/velocity.properties diff --git a/src/org/forkalsrud/album/web/AlbumServlet.java b/src/org/forkalsrud/album/web/AlbumServlet.java index 16f538c..1657ec3 100644 --- a/src/org/forkalsrud/album/web/AlbumServlet.java +++ b/src/org/forkalsrud/album/web/AlbumServlet.java @@ -93,6 +93,7 @@ public class AlbumServlet try { res.setContentType("text/html"); req.setAttribute("entry", entry); + req.setAttribute("thmb", new Integer(640)); RequestDispatcher rd = req.getRequestDispatcher("/WEB-INF/velocity/photo.vm"); rd.forward(req, res); } catch (Exception ex) { diff --git a/webapp/WEB-INF/velocity.properties b/webapp/WEB-INF/velocity.properties new file mode 100644 index 0000000..8392748 --- /dev/null +++ b/webapp/WEB-INF/velocity.properties @@ -0,0 +1,5 @@ +velocimacro.permissions.allow.inline=true +velocimacro.permissions.allow.inline.to.replace.global=false +velocimacro.permissions.allow.inline.local.scope=true +velocimacro.context.localscope=false +velocimacro.library.autoreload=true diff --git a/webapp/WEB-INF/velocity/photo.vm b/webapp/WEB-INF/velocity/photo.vm index a5bcbd9..710c283 100644 --- a/webapp/WEB-INF/velocity/photo.vm +++ b/webapp/WEB-INF/velocity/photo.vm @@ -53,7 +53,6 @@
#if($entry.isFile()) -#set($thmb = 480) #set($dim = $entry.thumbnail.size.scaled($thmb)) #set($thpath = $mapper.map(${entry.thumbnail.getPath()})) #set($enpath = $mapper.map(${entry.getPath()}))