Commit e41c0437 authored by Ivan Tyagov's avatar Ivan Tyagov

Improve prodile gadget and make it use standard "gadget_view" form renderer....

Improve prodile gadget and make it use standard "gadget_view" form renderer. i.e. replace custom "gadget_tab_view"

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39595 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb49dd04
<?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>_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>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block 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="is_gadget_mode python: int(request.get(\'is_gadget_mode\', 0));\n
dummy python: context.REQUEST.RESPONSE.setHeader(\n
\'Content-Type\', \n
\'text/html;; charset=utf-8\');">\n
\n
<tal:block tal:define="ignore_layout request/ignore_layout | nothing;\n
layout_form_id request/layout_form_id | here/getApplicableLayout | nothing;\n
layout_form python: layout_form_id and getattr(here, layout_form_id, None) \n
or None;\n
is_web_mode python: (layout_form is not None) and (not ignore_layout);\n
dummy python: request.set(\'editable_mode_\', True);\n
dummy python: request.set(\'is_web_mode\', is_web_mode);\n
dummy python: here.Base_setRequestEnvironmentVariableList(\n
options = options);">\n
\n
<tal:block tal:define="global preferred_html_style_developper_mode python: 0;\n
global preferred_html_style_translator_mode preferred_html_style_developper_mode ">\n
\n
<tal:block\n
tal:define="dummy python: request.set(\'here\', here);\n
group_list form/Form_getGroupTitleAndId;\n
field_render nocall: here/field_render/macros/field_render">\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/form" />\n
</tal:block>\n
<tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid;">\n
<fieldset tal:condition="python: gid.find(\'hidden\') &lt; 0"\n
tal:attributes="class python:gid + \n
(\' editable\' * request.get(\'editable_mode\', 0) or \' viewable\');">\n
\n
<div class="inner">\n
<h4 i18n:translate="" i18n:domain="ui" tal:condition="group/gtitle" tal:content="group/gtitle" class="group_title"></h4>\n
<table class="table-b">\n
<tbody>\n
<tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n
<tal:block tal:condition="python: field.meta_type != \'HiddenStringField\'"\n
tal:define="field_id field/id;\n
value python: request.get(field_id, None);\n
render_prefix render_prefix | nothing;\n
field_errors python: request.get(\'field_errors\', {});\n
field_has_error python: field_errors.has_key(field_id);\n
global form_id form_id | form/id | nothing;\n
field_description field/Field_getDescription;\n
is_web_mode is_web_mode | nothing;\n
html_render python: field.render_htmlgrid(value, request, render_prefix=render_prefix)">\n
<tr tal:repeat="html_tuple html_render">\n
<td>\n
<strong>\n
<tal:block tal:content="structure python: html_tuple[0]"\n
i18n:translate="" i18n:domain="ui" />\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />\n
</tal:block>\n
<tal:block tal:condition="preferred_html_style_translator_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/field_translator" />\n
</tal:block>\n
</strong>\n
</td>\n
<td><div class="input" tal:content="structure python: html_tuple[1]" /></td>\n
</tr>\n
</tal:block>\n
</tal:block>\n
</tbody>\n
</table>\n
</div>\n
</fieldset>\n
</tal:block>\n
</tal:block>\n
<p class="clear"></p>\n
</tal:block>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>\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>gadget_tab_view</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
......@@ -62,7 +59,7 @@
<key> <string>group_list</string> </key>
<value>
<list>
<string>gadget</string>
<string>gadget-profile</string>
</list>
</value>
</item>
......@@ -71,7 +68,7 @@
<value>
<dictionary>
<item>
<key> <string>gadget</string> </key>
<key> <string>gadget-profile</string> </key>
<value>
<list>
<string>document_profile_title</string>
......@@ -106,7 +103,7 @@
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>gadget_tab_view</string> </value>
<value> <string>gadget_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
......@@ -266,10 +263,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
......@@ -282,16 +276,13 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not context.portal_membership.isAnonymousUser() and request.get(\'current_web_document\', here).isDocument()</string> </value>
<value> <string>python: not context.portal_membership.isAnonymousUser() and request.get(\'current_web_document\', here).isDocument() and request.get(\'current_web_document\', here).getPublicationSection() is not None</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
......@@ -266,10 +263,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
......@@ -282,16 +276,13 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: request.get(\'current_web_document\', here).isDocument()</string> </value>
<value> <string>python: request.get(\'current_web_document\', here).isDocument() and request.get(\'current_web_document\', here).getReference() is not None</string> </value>
</item>
</dictionary>
</pickle>
......
1644
\ No newline at end of file
1645
\ 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