changeset 307:3126b6ff38fa

macro.Image: linebreak for description line when width exceeded
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 27 Nov 2008 00:53:06 +0100
parents 2f1b790d9746
children 81a4a9a1f497
files data/plugin/macro/Image.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/Image.py	Thu Nov 27 00:12:00 2008 +0100
+++ b/data/plugin/macro/Image.py	Thu Nov 27 00:53:06 2008 +0100
@@ -247,10 +247,10 @@
     if '/' not in itemname:
         itemname = macro.formatter.page.page_name + '/' + itemname
     img = Image(macro.request, itemname, caption=alt)
-    return "%s%s%s%s%s%s" % ('<div class="thumbnail">', 
-                             macro.formatter.image(src=img.url((width, height)), alt=img.caption),
-                             '<div class="decription">',
-                             macro.formatter.text(description),
-                             '</div>',
-                             '</div>')
+    return "%s%s%s%s%s%s%s%s" % ('<div class="thumbnail">', 
+                                 macro.formatter.image(src=img.url((width, height)), alt=img.caption),
+                                 '<div class="decription">',
+                                 '<div style="width:%spx">' % (width),
+                                 macro.formatter.text(description),
+                                '</div>', '</div>', '</div>', )