Commit 2f21c8e3 authored by Jérome Perrin's avatar Jérome Perrin

use make_query to produce correct link when filepath contains %20

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37279 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c1f2753
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
from ZTUtils import make_query\n
\n
modified=context.REQUEST["modified"]\n modified=context.REQUEST["modified"]\n
added=context.REQUEST["added"]\n added=context.REQUEST["added"]\n
removed=context.REQUEST["removed"]\n removed=context.REQUEST["removed"]\n
...@@ -67,8 +69,10 @@ tab_Removed=removed.split(\',\')\n ...@@ -67,8 +69,10 @@ tab_Removed=removed.split(\',\')\n
if modified != \'none\':\n if modified != \'none\':\n
for f in tab_Modified:\n for f in tab_Modified:\n
print \'<input name="modified" value="%s" type="checkbox" checked="checked" />\'%f\n print \'<input name="modified" value="%s" type="checkbox" checked="checked" />\'%f\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context)\n
print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n print "<span style=\'font-weight: bold; color: black;\'>Index: "\\\n
"<a href=\'BusinessTemplate_viewSvnShowFile?%s\'>%s</a></span>" %(\n
make_query(file=f), f)\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n
...@@ -79,8 +83,10 @@ if modified != \'none\':\n ...@@ -79,8 +83,10 @@ if modified != \'none\':\n
if added != \'none\':\n if added != \'none\':\n
for f in tab_Added:\n for f in tab_Added:\n
print \'<input name="added" value="%s" type="checkbox" checked="checked" />\'%f\n print \'<input name="added" value="%s" type="checkbox" checked="checked" />\'%f\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context)\n
print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n print "<span style=\'font-weight: bold; color: black;\'>Index: "\\\n
"<a href=\'BusinessTemplate_viewSvnShowFile?%s\'>%s</a></span>" %(\n
make_query(file=f), f)\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n
...@@ -90,8 +96,10 @@ if added != \'none\':\n ...@@ -90,8 +96,10 @@ if added != \'none\':\n
if removed != \'none\':\n if removed != \'none\':\n
for f in tab_Removed:\n for f in tab_Removed:\n
print \'<input name="removed" value="%s" type="checkbox" checked="checked" />\'%f\n print \'<input name="removed" value="%s" type="checkbox" checked="checked" />\'%f\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context)\n
print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n print "<span style=\'font-weight: bold; color: black;\'>Index: "\\\n
"<a href=\'BusinessTemplate_viewSvnShowFile?%s\'>%s</a></span>" %(\n
make_query(file=f), f)\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n print "<a href=\'"+edit_path+"\'><img src=\'ERP5Subversion_imgs/edit.png\' alt=\'Edit\' style=\'border: 0\' /></a>"\n
...@@ -140,6 +148,8 @@ return printed\n ...@@ -140,6 +148,8 @@ return printed\n
<tuple> <tuple>
<string>_print_</string> <string>_print_</string>
<string>_print</string> <string>_print</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
......
602 603
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment