changeset 68:f0fed03fd6f7

fixed target_page for thumbnails and slide show
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 06 Jun 2008 12:35:36 +0200
parents e22ac6902d90
children 6e6ba41483f6
files data/plugin/action/arnica_slides.py data/plugin/parser/text_x_arnica.py
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Wed Jun 04 20:27:23 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Fri Jun 06 12:35:36 2008 +0200
@@ -30,7 +30,7 @@
 action_name = __name__.split('.')[-1]
 
 def send_cache_file(request, pagename, arena_dir, target):
-    """ sends a cached thumbnail or webnail to the browser 
+    """ sends a cached thumbnail or webnail to the browser
     @param request: request object
     @param pagenam:  the name of the page
     @param arena_dir: the name of the cache arena
@@ -380,7 +380,7 @@
         """ does execute the commands of the form data """
         _ = self.request.getText
         request = self.request
-        pagename = self.pagename
+        pagename = request.form.get('pagename', [self.pagename])[0]
         page = Page(request, pagename)
         arena_dir = caching.get_arena_dir(request, page, 'item')
         msg = None
--- a/data/plugin/parser/text_x_arnica.py	Wed Jun 04 20:27:23 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Fri Jun 06 12:35:36 2008 +0200
@@ -189,6 +189,7 @@
                             <input type="hidden" name="do" value="VS">
                             <input type="hidden" name="alias" value='%(description)s'>
                             <input type="hidden" name="target" value='%(target)s'>
+                            <input type="hidden" name="pagename" value='%(pagename)s'>
                             <input type="hidden" name="images" value='%(images)s'>
                             <input type="hidden" name="exif_date" value='%(exif_date)s'>
                             <input type="image" value="submit" src="%(htdocs)s/common/arnica/arnica_to_slide.png" title="slide_show" >
@@ -254,9 +255,10 @@
                 <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="hidden" name="pagename" value='%(pagename)s'>
                 <input type="hidden" name="images" value='%(images)s'>
                 <input type="hidden" name="image_for_webnail" value='%(image_for_webnail)s'>
-                <input type="image" value="submit" src="?action=arnica_slides&do=view&target=%(thumbnail)s">
+                <input type="image" value="submit" src=""%(baseurl)s/%(pagename)s?action=arnica_slides&do=view&target=%(thumbnail)s">
         </form>
             %(alias_html)s
     <tr>%(tools_html)s%(date_html)s</tr>''' % {
@@ -331,9 +333,10 @@
                 <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="hidden" name="pagename" value='%(pagename)s'>
                 <input type="hidden" name="images" value='%(images)s'>
                 <input type="hidden" name="image_for_webnail" value='%(image_for_webnail)s'>
-                <input type="image" value="submit" type="button" src="?action=arnica_slides&do=view&target=%(thumbnail)s" >
+                <input type="image" value="submit" type="button" src="%(baseurl)s/%(pagename)s?action=arnica_slides&do=view&target=%(thumbnail)s" >
             </td>
         </form>
     </tr>