Commit ec0af29e authored by Ivan Tyagov's avatar Ivan Tyagov

Use respective getters.

Clean up.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32612 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cedbc97d
...@@ -53,28 +53,37 @@ ...@@ -53,28 +53,37 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""This script will create all knowledge pads user may need in using\n <value> <string>"""\n
This script will create all knowledge pads user may need in using\n
ERP5 and respective web sites. This script should be integrated through\n ERP5 and respective web sites. This script should be integrated through\n
an interaction workflow on Assignment so when the first assignment for user is\n an interaction workflow on Assignment so when the first assignment for user is\n
openned this script will be called and everything will be created."""\n opened this script will be called and everything will be created.\n
"""\n
portal = context.getPortalObject()\n
\n \n
#erp5_site = context.getPortalObject()\n
web_site = getattr(context.web_site_module, \'yuna_kb\', None)\n
# ERP5 front\n # ERP5 front\n
context.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=None, \n context.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=None, \n
mode=\'erp5_front\', owner=owner)\n mode=\'erp5_front\', \n
owner=owner)\n
web_site = None\n
# Customize this to respective needs\n
default_website_id = None\n
if default_website_id is not None:\n
web_site = getattr(portal.web_site_module, default_website_id, None)\n
\n
if web_site is not None:\n if web_site is not None:\n
# Web front\n # Web front\n
web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=None, \n web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=None, \n
mode=\'web_front\', owner=owner)\n mode=\'web_front\', \n
owner=owner)\n
# web section\n # web section\n
web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=\'default_section_pad\',\n web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=\'default_section_pad\',\n
mode=\'web_section\', owner=owner)\n mode=\'web_section\', \n
owner=owner)\n
# web section content\n # web section content\n
web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=\'default_content_pad\',\n web_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=\'default_content_pad\',\n
mode=\'web_section\', owner=owner)\n mode=\'web_section\', \n
print "OK"\n owner=owner)\n
return printed\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -118,13 +127,13 @@ return printed\n ...@@ -118,13 +127,13 @@ return printed\n
<value> <value>
<tuple> <tuple>
<string>owner</string> <string>owner</string>
<string>_print_</string>
<string>_print</string>
<string>getattr</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>None</string> <string>None</string>
<string>web_site</string> <string>web_site</string>
<string>default_website_id</string>
<string>getattr</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?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 i18n:domain="content"\n
tal:define="cell python: options[\'cell\'];"\n
tal:condition="python: hasattr(cell, \'getObject\')">\n
\n
<tal:block \n
tal:define="gadget cell/getObject;\n
image_id python: getattr(gadget, \'image_id\', None);">\n
\n
<h4 i18n:translate="" tal:content="cell/getTitle"/>\n
\n
<img tal:condition="image_id"\n
alt="gadget screenshot"\n
tal:attributes="src python:\'%s/%s\' \n
%(gadget.absolute_url(), image_id)"/>\n
<p i18n:translate="" tal:content="cell/getDescription"/>\n
</tal:block>\n
\n
</tal:block>
]]></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_viewPrettyHTMLDescriptionRenderer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -58,7 +58,7 @@ preferences = {}\n ...@@ -58,7 +58,7 @@ preferences = {}\n
\n \n
# get default properties from Gadget only if edit form is available\n # get default properties from Gadget only if edit form is available\n
gadget = box.getSpecialiseValue()\n gadget = box.getSpecialiseValue()\n
edit_form_id = getattr(gadget, \'edit_form_id\', None)\n edit_form_id = gadget.getEditFormId()\n
\n \n
if edit_form_id is not None:\n if edit_form_id is not None:\n
edit_form = getattr(context, edit_form_id, None)\n edit_form = getattr(context, edit_form_id, None)\n
...@@ -114,9 +114,9 @@ return preferences\n ...@@ -114,9 +114,9 @@ return preferences\n
<string>preferences</string> <string>preferences</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>gadget</string> <string>gadget</string>
<string>getattr</string>
<string>None</string>
<string>edit_form_id</string> <string>edit_form_id</string>
<string>None</string>
<string>getattr</string>
<string>edit_form</string> <string>edit_form</string>
<string>filter</string> <string>filter</string>
<string>fields</string> <string>fields</string>
......
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
visibility_css_dict python: {\'visible\': \'block\',\n visibility_css_dict python: {\'visible\': \'block\',\n
\'invisible\': \'none\'};\n \'invisible\': \'none\'};\n
isAnon python: here.portal_membership.isAnonymousUser();\n isAnon python: here.portal_membership.isAnonymousUser();\n
edit_form_id python: getattr(gadget, \'edit_form_id\', None);\n edit_form_id gadget/getEditFormId;\n
view_form_id python: getattr(gadget, \'view_form_id\', None);\n view_form_id gadget/getViewFormId;\n
render_type python: getattr(gadget, \'render_type\', None);\n render_type gadget/getRenderType;\n
is_asynchronous_gadget python: render_type == \'asynchronous\';\n is_asynchronous_gadget python: render_type == \'asynchronous\';\n
current_web_section python: context.REQUEST.get(\'current_web_section\',\n current_web_section python: context.REQUEST.get(\'current_web_section\',\n
here);\n here);\n
......
474 475
\ 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