Commit 462a60d5 authored by Fabien Morin's avatar Fabien Morin

* add a script getPrintFormUrl to get print url from portal_types actions

* change print link in header to correspond to the portal_type object displayed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23474 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6bdffe38
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if not context.portal_actions.listFilteredActionsFor(context).has_key(\'object_print\'):\n
return None\n
\n
new_print_action_list = context.Base_fixDialogActions(\n
context.Base_filterDuplicateActions(\n
context.portal_actions.listFilteredActionsFor(context)), \'object_print\')\n
if new_print_action_list:\n
return new_print_action_list[0][\'original_url\']\n
\n
return None\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
<string>new_print_action_list</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>getPrintFormUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
<span class="onright">\n <span class="onright">\n
<a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" href="./home" \n <a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" href="./home" \n
i18n:translate="" i18n:domain="ui">Home</a>\n i18n:translate="" i18n:domain="ui">Home</a>\n
<a class="print" href="DeclarationTVA_viewDeclarationTVAAsPdf" i18n:translate="" i18n:domain="ui">Print</a>\n <tal:block tal:condition="python: context.getPrintFormUrl() is not None">\n
<a class="print" href="DeclarationTVA_viewDeclarationTVAAsPdf"\n
tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n
</tal:block> \n
<a class="help" href="./help" i18n:translate="" i18n:domain="ui">Help</a>\n <a class="help" href="./help" i18n:translate="" i18n:domain="ui">Help</a>\n
</span>\n </span>\n
<div class="clear">\n <div class="clear">\n
...@@ -89,6 +92,12 @@ ...@@ -89,6 +92,12 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
<span class="onright">\n <span class="onright">\n
<a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" href="./home" \n <a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" href="./home" \n
i18n:translate="" i18n:domain="ui">Home</a>\n i18n:translate="" i18n:domain="ui">Home</a>\n
<a class="print" href="DeclarationTVA_viewDeclarationTVAAsPdf" i18n:translate="" i18n:domain="ui">Print</a>\n <tal:block tal:condition="python: context.getPrintFormUrl() is not None">\n
<a class="print" href="DeclarationTVA_viewDeclarationTVAAsPdf"\n
tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n
</tal:block>\n
<!--<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" i18n:translate="" i18n:domain="ui">Help</a>-->\n <!--<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" i18n:translate="" i18n:domain="ui">Help</a>-->\n
<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'safi_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n <a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'safi_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n
</span>\n </span>\n
...@@ -90,6 +93,12 @@ ...@@ -90,6 +93,12 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
264 266
\ 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