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
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=3,\n
title= getTitle(uri),\n
title=getTitle(uri),\n
form_id=\'\')\n
)\n
result.append(\n
......@@ -146,7 +146,7 @@ for section in section_list:\n
listbox_display_mode=\'FlatListMode\')\n
)\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
class_name = child_uri.getClassName()\n
result += context.DocumentationHelper_getDocumentationSectionListParams(class_name, child_uri.uri_list)\n
......
......@@ -65,21 +65,16 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
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
<value> <string>from ZTUtils import make_query\n
portal_url = context.getPortalObject().portal_url()\n
uri = context.getPortalObject().getUrl()\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
if portal_skin == \'ODT\':\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
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?uri=%s&class_name=ERP5SiteDocumentationHelper\' % (portal_url, uri))\n
]]></string> </value>
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>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -95,7 +90,7 @@ else:\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>portal_skin=\'\'</string> </value>
<value> <string>portal_skin=\'\', business_template_list=[]</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -115,22 +110,21 @@ else:\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>portal_skin</string>
<string>business_template_list</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</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>uri</string>
<string>query</string>
</tuple>
</value>
</item>
......@@ -144,6 +138,7 @@ else:\n
<value>
<tuple>
<string></string>
<list/>
</tuple>
</value>
</item>
......
......@@ -109,7 +109,9 @@
<item>
<key> <string>right</string> </key>
<value>
<list/>
<list>
<string>your_business_template_list</string>
</list>
</value>
</item>
</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