diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_viewHomeAreaRenderer.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_viewHomeAreaRenderer.xml index 577420cbe7b12c11a82760619d23f85d5e9bab10..d867413a3895c673257fcd3f9416b2fe9ad919b4 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_viewHomeAreaRenderer.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_viewHomeAreaRenderer.xml @@ -56,7 +56,7 @@ <!-- Render active Knowledge pad -->\n <div id="pad-body-wrapper"\n tal:condition="active_knowledge_pad">\n - <tal:block tal:replace="structure python: active_knowledge_pad.KnowledgePad_viewDashboardWidget(\n + <tal:block tal:replace="structure python: active_knowledge_pad.KnowledgePad_viewDashboardWidget(\n columns=columns,\n real_context=here,\n cancel_url=cancel_url)"/>\n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_isEmpty.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_isEmpty.xml new file mode 100644 index 0000000000000000000000000000000000000000..94274b6dfd9423455230ea6487bc0868f9e01a88 --- /dev/null +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_isEmpty.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>"""\n +Is Knowledge Pad empty (i.e. no gadgets inside).\n +Use current Pad\'s layout.\n +"""\n +layout = context.KnowledgePad_getBoxColumnLayout()\n +return not sum([len(x) for x in layout])\n +</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>KnowledgePad_isEmpty</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml index 8a57bf2ef219a43ca5664e30c6a0d440f7a36bfa..57f36562043561e851386885e48faecf7b3e5f05 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml @@ -38,36 +38,33 @@ <div id="page_wrapper"\n tal:define="layout here/KnowledgePad_getBoxColumnLayout;\n - real_context python: options.get(\'real_context\', None);\n - cancel_url python: options.get(\'cancel_url\', None);\n - isAnon python: here.portal_membership.isAnonymousUser();\n - is_tab_empty python: (len(layout)==1 and len(layout[0])==0) or\n - (len(layout)==3 and len(layout[0]+layout[1]+layout[2])==0);\n - columns python: options.get(\'columns\', 3);\n - column_css_class python: test(isAnon, \n - \'portal-column portal-column-undraggable\', \n - \'portal-column\');">\n + real_context python: options.get(\'real_context\', None);\n + cancel_url python: options.get(\'cancel_url\', None);\n + isAnon python: here.portal_membership.isAnonymousUser();\n + is_tab_empty here/KnowledgePad_isEmpty;\n + columns python: options.get(\'columns\', 3);\n + column_css_class python: test(isAnon, \n + \'portal-column portal-column-undraggable\', \n + \'portal-column\');">\n \n <!-- No gadgets message -->\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget_message"/> \n \n <!-- Render pad columns -->\n <tal:block tal:repeat="column_index python: range(0, columns)">\n - <div tal:attributes="class column_css_class;\n - id string:portal-column-${column_index}"\n - tal:condition="python: columns>=1+column_index">\n + <div tal:condition="python: columns>=1+column_index"\n + tal:attributes="class column_css_class;\n + id string:portal-column-${column_index}">\n \n <tal:block tal:condition="python: len(layout)>=1+column_index"\n tal:replace="structure python:\n here.KnowledgePad_viewColumnWidget(section_layout=layout[column_index],\n - real_context=real_context,\n - cancel_url=cancel_url)"/>\n -\n + real_context=real_context,\n + cancel_url=cancel_url)"/>\n </div>\n </tal:block>\n \n -</div>\n - +</div> ]]></unicode> </value> </item> @@ -85,7 +82,7 @@ </item> <item> <key> <string>output_encoding</string> </key> - <value> <string>utf-8</string> </value> + <value> <string>iso-8859-15</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 8a2602231b523baf9bcc6d35eb763d81015c25f4..01b67236d1db8c71f501afae086d7dcf09b0f193 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -686 \ No newline at end of file +688 \ No newline at end of file