changeset 15:46267a5a1451

text_x_arnica: involved arnica_slides to show thumbnails
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 22 May 2008 18:17:31 +0200
parents 87d11a4031e3
children 22e4dacd1d37
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 5 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Wed May 21 13:49:31 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Thu May 22 18:17:31 2008 +0200
@@ -287,7 +287,7 @@
                 <input type="hidden" name="alias" value='%(description)s'>
                 <input type="hidden" name="exif_date" value='%(exif_date)s'>
                 <input type="hidden" name="target" value='%(target)s'>
-                <input type="image" value="submit" src="%(thumbnail)s">
+                <input type="image" value="submit" src="?action=arnica_slides&do=view&target=%(thumbnail)s">
             </td>
         </form>
             %(alias_html)s 
@@ -300,7 +300,7 @@
      "description": self.description[idx] + '!,!' + '!,!'.join(self.description),
      "exif_date": self.exif_date[idx] + ',' + ','.join(self.exif_date),
      "target": self.webimg[idx] + ',' + ','.join(self.webimg),
-     "thumbnail": "%s%s" % (AttachFile.getAttachUrl(self.pagename, '', self.request), self.thumb[idx]),
+     "thumbnail": self.thumb[idx],
      "tools_html": self.show_tools_mode2(idx),
      "date_html": self.show_date_mode2(idx),
      "alias_html": self.show_alias_mode2(idx)
@@ -345,18 +345,6 @@
 
     def mode1_html(self, idx):
         """ html code of mode 1 (default)"""
-        
-        print AttachFile.attachUrl(self.request, self.pagename, self.thumb[idx], target=self.web[idx])
-        page = Page(self.request, self.pagename)
-        arena_dir = caching.get_arena_dir(self.request, page, 'item')
-        print  arena_dir
-        print self.thumb[idx]
-        webf = os.path.join(arena_dir,  self.web[idx])
-        thumbf = os.path.join(arena_dir, self.thumb[idx])
-        print thumbf
-        
-        #cache_thumb= caching.CacheEntry(self.request, page, self.thumb[idx], scope='item', use_pickle=True) 
-        
         text = '''
     <table width="%(thumbnail_width)s" align="center" valign="center"%(style)s>
     <TR align="center" valign="center">
@@ -368,7 +356,7 @@
                 <input type="hidden" name="alias" value='%(description)s'>
                 <input type="hidden" name="exif_date" value='%(exif_date)s'>
                 <input type="hidden" name="target" value='%(target)s'>
-                <input type="image" value="submit" type="button" src="file://%(thumbnail)s" >
+                <input type="image" value="submit" type="button" src="?action=arnica_slides&do=view&target=%(thumbnail)s" >
             </td>
         </form>
     </TR>
@@ -383,12 +371,13 @@
      "description": self.description[idx] + '!,!' + '!,!'.join(self.description),
      "exif_date": self.exif_date[idx] + ',' + ','.join(self.exif_date),
      "target": self.webimg[idx] + ',' + ','.join(self.webimg),
-     "thumbnail":"%s" % thumbf,
+     "thumbnail": self.thumb[idx],
      "thumbnail_width": self.thumbnail_width,
      "tools_html": self.show_tools_mode1(idx),
      "date_html": self.show_date_mode1(idx),
      "alias_html": self.show_alias_mode1(idx)
      }
+        #self.request.write(data)
 
         return text