Commit 8e74452f authored by Fabien Morin's avatar Fabien Morin

report_section refactoring to be more generic and easier to customize with...

report_section refactoring to be more generic and easier to customize with more pdf : forget to commit things

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23529 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4c588e47
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>root_http_skin_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block replace="nothing"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"/>\n
\n
<tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
\n
/*========================================================================================\n
PDFDocumentListBox_asAttachedFile CSS.\n
\n
========================================================================================*/\n
\n
\n
.attachment_list_ListContent li a,\n
.attachment_list_ListContent li .attachment_list_getSourceReference,\n
.attachment_list_ListContent li .attachment_list_content_type,\n
.attachment_list_ListContent li .attachment_list_getOwner,\n
.attachment_list_ListContent li .attachment_list_creation_date{\n
padding:2px;\n
}\n
\n
.attachment_list_ListContent li a{\n
text-decoration:underline;\n
}\n
\n
.attachment_list_ListContent li .attachment_list_content_type{\n
display:none;\n
}\n
\n
.attachment_list_ListContent li .attachment_list_getSourceReference{\n
color:#0B850B;\n
}\n
\n
/*.attachment_list_ListContent li .attachment_list_getOwner,\n
.attachment_list_ListContent li .attachment_list_creation_date{\n
position:absolute;\n
margin-top:1.2em;\n
}*/\n
\n
.attachment_list_ListContent li .attachment_list_creation_date{\n
left:80px;\n
}\n
\n
.attachment_list_ListContent li .attachment_list_getOwner{\n
left:30px;\n
}\n
\n
.attachment_list_ListContent li{\n
margin-bottom: 1em;\n
}\n
\n
.attachment_list_ListContent .attachment_list_getOwner{\n
font-weight:bold;\n
}\n
\n
.attachment_list_ListContent .added_by,\n
.attachment_list_ListContent .attachment_list_getOwner,\n
.attachment_list_ListContent .at,\n
.attachment_list_ListContent .attachment_list_creation_date{\n
font-style: italic;\n
}\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PDFDocumentListBox_asAttachedFile.css</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="field_id here/getId;\n
form_id python: here.getForm().id;\n
selection_name here/getSelectionName;\n
requested_selection_name here/getRequestedSelectionName;\n
selection_index here/getSelectionIndex;\n
selection here/getSelection;\n
portal_url_string here/getPortalUrlString;\n
real_context here/getContext;\n
context_url real_context/absolute_url;\n
md5_string here/getMD5Checksum;\n
line_list here/query;\n
is_domain_tree_mode here/isDomainTreeMode;\n
is_report_tree_mode here/isReportTreeMode;\n
is_domain_tree_supported here/isDomainTreeSupported;\n
is_report_tree_supported here/isReportTreeSupported;\n
show_select_column here/showSelectColumn;\n
show_search_line here/showSearchLine;\n
">\n
<!-- ListBox starts here. -->\n
<tal:block tal:condition="python:len(line_list)">\n
<input type="hidden" name="list_selection_name" value="default" tal:attributes="value selection_name" />\n
<input type="hidden" name="list_selection_name" value="default"\n
tal:attributes="value selection_name;\n
name string:${field_id}_list_selection_name" />\n
<input tal:condition="md5_string" type="hidden" name="md5_object_uid_list" value="checksum" tal:attributes="value md5_string" />\n
\n
<tal:replace tal:content="nothing">\n
Because TAL cannot accept unbalanced tags, the support for a domain tree is realized by a macro.\n
The macro ListBoxContainer is a no-op, if not in domain tree mode. Otherwise, the macro constructs\n
a domain tree and extracts the body in an extra table.\n
</tal:replace>\n
\n
<tal:block tal:define="expand python: 0">\n
<tal:block metal:define-macro="ListBoxContainer">\n
<tal:block tal:condition="expand">\n
<tal:block tal:condition="not: is_domain_tree_mode">\n
<tal:block metal:define-slot="ListBoxBody" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="expand python: 1">\n
<tal:block metal:use-macro="template/macros/ListBoxContainer">\n
<tal:block metal:fill-slot="ListBoxBody">\n
<div class="attachment_list_ListContent">\n
<ul>\n
<tal:block tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n
<tal:block tal:define="object python: line.getObject()">\n
<li>\n
<tal:block tal:repeat="value line/render">\n
<tal:block tal:condition="python:line.renderer.getSelectedColumnList()[repeat[\'value\'].index][0] == \'getOwner\'">\n
<a href="lien" tal:attributes="href python: object.absolute_url()" i18n:translate="" i18n:domain="ui">See</a>\n
<a href="lien" tal:attributes="href python:\'PDFDocument_deleteAttachment?id_list=%s&form_id=PDFDocument_viewAttachmentList&file_name=%s\' % (object.getId(), object.getSourceReference())" i18n:translate="" i18n:domain="ui">Delete</a>\n
<br/>\n
<span class="added_by" i18n:translate="" i18n:domain="ui">added by</span>\n
</tal:block>\n
<tal:block tal:condition="python:line.renderer.getSelectedColumnList()[repeat[\'value\'].index][0] == \'creation_date\'">\n
<span class="at" i18n:translate="" i18n:domain="ui">at</span>\n
</tal:block>\n
<span tal:define="html python: value[0];\n
original_value python: value[1];\n
error python: value[2];\n
editable_field python: value[3];"\n
tal:attributes="class python: \'attachment_list_%s\' % line.renderer.getSelectedColumnList()[repeat[\'value\'].index][0]">\n
<input tal:condition="not: repeat/value/index"\n
type="hidden" value="1" name="listbox_uid:list"\n
tal:attributes="value python: line.getUid() or \'\';\n
name string:${field_id}_uid:list" />\n
<tal:block tal:condition="not: editable_field" tal:content="original_value" />\n
<tal:block tal:condition="editable_field" tal:content="structure python: editable_field.render(original_value)"/>\n
</span>\n
</tal:block>\n
</li>\n
</tal:block>\n
</tal:block>\n
</ul>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
<!-- ListBox ends here. -->\n
</tal:block>\n
</tal:block>\n
\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PDFDocumentListBox_asAttachedFile</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>request=context.REQUEST\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
if id_list == None:\n
message = N_("Please+select+one+or+more+items+to+delete+first.")\n
qs = \'?portal_status_message=%s\' % message\n
return request.RESPONSE.redirect( context.absolute_url() + \'/\' + form_id + qs )\n
\n
if not same_type(id_list, []):\n
id_list=[id_list,]\n
\n
context.manage_delObjects(id_list)\n
message = N_(\'Attachment ${file_name} has been deleted\', mapping = { \'file_name\': \'"%s"\' % file_name})\n
qs = \'?portal_status_message=%s\' % message\n
return request.RESPONSE.redirect( context.absolute_url() + \'/\' + form_id + qs )\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>id_list=None, form_id=\'view\', file_name=\'\'</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</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>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>id_list</string>
<string>form_id</string>
<string>file_name</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>portal</string>
<string>N_</string>
<string>None</string>
<string>message</string>
<string>qs</string>
<string>same_type</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<string>view</string>
<string></string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PDFDocument_deleteAttachment</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -442,7 +442,7 @@
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string>DeclarationTVA_ListBox_asAttachedFile</string> </value>
<value> <string>PDFDocumentListBox_asAttachedFile</string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
......@@ -509,6 +509,12 @@
<key> <string>title</string> </key>
<value> <string>Attachments</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......
279
\ No newline at end of file
280
\ 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