Commit 254f88be authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-095: mayoro

- adding possibility to select business templates in report mode (HTML and ODT)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23512 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ca82849
...@@ -124,7 +124,7 @@ for section in section_list:\n ...@@ -124,7 +124,7 @@ for section in section_list:\n
ReportSection(\n ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=3,\n level=3,\n
title= getTitle(uri),\n title=getTitle(uri),\n
form_id=\'\')\n form_id=\'\')\n
)\n )\n
result.append(\n result.append(\n
...@@ -146,7 +146,7 @@ for section in section_list:\n ...@@ -146,7 +146,7 @@ for section in section_list:\n
listbox_display_mode=\'FlatListMode\')\n listbox_display_mode=\'FlatListMode\')\n
)\n )\n
portal_skin = REQUEST.get(\'portal_skin\')\n portal_skin = REQUEST.get(\'portal_skin\')\n
if portal_skin is None:\n if portal_skin is None or portal_skin == \'View\':\n
for child_uri in uri_object.getSectionList():\n for child_uri in uri_object.getSectionList():\n
class_name = child_uri.getClassName()\n class_name = child_uri.getClassName()\n
result += context.DocumentationHelper_getDocumentationSectionListParams(class_name, child_uri.uri_list)\n result += context.DocumentationHelper_getDocumentationSectionListParams(class_name, child_uri.uri_list)\n
......
...@@ -65,21 +65,16 @@ ...@@ -65,21 +65,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>from ZTUtils import make_query\n
portal_url = context.getPortalObject().portal_url()\n
tab_url = context.absolute_url().split(\':\')\n
host = \'%s:%s\' % (tab_url[0],tab_url[1])\n
url = tab_url[2].split(\'/\')\n
new_url = \'/\'.join(url[:-1])\n
portal_url = \'%s:%s\' % (host,new_url)\n
uri = context.getPortalObject().getUrl()\n uri = context.getPortalObject().getUrl()\n
if portal_skin==\'ODT\':\n if portal_skin == \'ODT\':\n
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?uri=%s&class_name=ERP5SiteDocumentationHelper&portal_skin=ODT\' % (portal_url, uri))\n query = make_query(uri=uri, class_name="ERP5SiteDocumentationHelper", portal_skin="ODT", business_template_list=business_template_list)\n
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?%s\' % (portal_url, query) )\n
else:\n else:\n
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?uri=%s&class_name=ERP5SiteDocumentationHelper\' % (portal_url, uri))\n query = make_query(uri=uri, class_name="ERP5SiteDocumentationHelper", portal_skin="View", business_template_list=business_template_list)\n
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?%s\' % (portal_url, query) )\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -95,7 +90,7 @@ else:\n ...@@ -95,7 +90,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>portal_skin=\'\'</string> </value> <value> <string>portal_skin=\'\', business_template_list=[]</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -115,22 +110,21 @@ else:\n ...@@ -115,22 +110,21 @@ else:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>portal_skin</string> <string>portal_skin</string>
<string>business_template_list</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>tab_url</string>
<string>_getitem_</string>
<string>host</string>
<string>url</string>
<string>new_url</string>
<string>portal_url</string> <string>portal_url</string>
<string>uri</string> <string>uri</string>
<string>query</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -144,6 +138,7 @@ else:\n ...@@ -144,6 +138,7 @@ else:\n
<value> <value>
<tuple> <tuple>
<string></string> <string></string>
<list/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -109,7 +109,9 @@ ...@@ -109,7 +109,9 @@
<item> <item>
<key> <string>right</string> </key> <key> <string>right</string> </key>
<value> <value>
<list/> <list>
<string>your_business_template_list</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
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