diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_createKnowledgePadListForUser.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_createKnowledgePadListForUser.xml index 0742cbae87b1918ec53939576a30a37bead3f0ea..9e1a509e0ecdc1b5be3dc5b306d599f9f35a4c7b 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_createKnowledgePadListForUser.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_createKnowledgePadListForUser.xml @@ -53,28 +53,37 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>"""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 - 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 + <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 + an interaction workflow on Assignment so when the first assignment for user is\n + opened this script will be called and everything will be created.\n +"""\n +portal = context.getPortalObject()\n \n -#erp5_site = context.getPortalObject()\n -web_site = getattr(context.web_site_module, \'yuna_kb\', None)\n # ERP5 front\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 # Web front\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_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_site.ERP5Site_createDefaultKnowledgePadListForUser(default_pad_group=\'default_content_pad\',\n - mode=\'web_section\', owner=owner)\n -print "OK"\n -return printed\n + mode=\'web_section\', \n + owner=owner)\n </string> </value> </item> <item> @@ -118,13 +127,13 @@ return printed\n <value> <tuple> <string>owner</string> - <string>_print_</string> - <string>_print</string> - <string>getattr</string> <string>_getattr_</string> <string>context</string> + <string>portal</string> <string>None</string> <string>web_site</string> + <string>default_website_id</string> + <string>getattr</string> </tuple> </value> </item> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Gadget_viewPrettyHTMLDescriptionRenderer.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Gadget_viewPrettyHTMLDescriptionRenderer.xml deleted file mode 100644 index e765ddd69e71756c7ba963fa73c49fed6cfaf119..0000000000000000000000000000000000000000 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Gadget_viewPrettyHTMLDescriptionRenderer.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?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> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDict.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDict.xml index 697981f249932d3200987da01e2343cd440cec37..f31b03a9c9560785f261a0ffb630ec5a368d8649 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDict.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDict.xml @@ -58,7 +58,7 @@ preferences = {}\n \n # get default properties from Gadget only if edit form is available\n gadget = box.getSpecialiseValue()\n -edit_form_id = getattr(gadget, \'edit_form_id\', None)\n +edit_form_id = gadget.getEditFormId()\n \n if edit_form_id is not None:\n edit_form = getattr(context, edit_form_id, None)\n @@ -114,9 +114,9 @@ return preferences\n <string>preferences</string> <string>_getattr_</string> <string>gadget</string> - <string>getattr</string> - <string>None</string> <string>edit_form_id</string> + <string>None</string> + <string>getattr</string> <string>edit_form</string> <string>filter</string> <string>fields</string> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewColumnWidget.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewColumnWidget.xml index 1c91461fa970a2d3803bb0cb9dba06f3444b0eec..145b9600685a89a566c45e5555fefd368d87e758 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewColumnWidget.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewColumnWidget.xml @@ -54,9 +54,9 @@ visibility_css_dict python: {\'visible\': \'block\',\n \'invisible\': \'none\'};\n isAnon python: here.portal_membership.isAnonymousUser();\n - edit_form_id python: getattr(gadget, \'edit_form_id\', None);\n - view_form_id python: getattr(gadget, \'view_form_id\', None);\n - render_type python: getattr(gadget, \'render_type\', None);\n + edit_form_id gadget/getEditFormId;\n + view_form_id gadget/getViewFormId;\n + render_type gadget/getRenderType;\n is_asynchronous_gadget python: render_type == \'asynchronous\';\n current_web_section python: context.REQUEST.get(\'current_web_section\',\n here);\n diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 6a5426c9b3432ec4b244774a543bc6ed9b0eb575..8cb9d84396bef2a990c7ffce27de7e99698e0c1a 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -474 \ No newline at end of file +475 \ No newline at end of file