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 de8e6efc19c20060aa5161ad64b0035b96987a4a..049682a61320cc7d270be612e04cd944ab281130 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 @@ -36,10 +36,14 @@ <key> <string>_text</string> </key> <value> <unicode encoding="cdata"><![CDATA[ -<tal:block\n - tal:repeat="box_id python: options[\'section_layout\']"\n - tal:define="real_context python: options.get(\'real_context\', None);\n - cancel_url python: options.get(\'cancel_url\', None);">\n +<tal:block tal:define="layout python: options[\'section_layout\'];\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 + visibility_css_dict python: {\'visible\': \'block\',\n + \'invisible\': \'none\'};">\n +\n +<tal:block tal:repeat="box_id layout">\n <tal:block \n tal:condition="python: getattr(here, box_id, None) is not None"\n tal:define="box python: getattr(here, box_id);\n @@ -47,11 +51,9 @@ view_form_dom_id python: \'%s_content\' %box_dom_id;\n edit_form_dom_id python: \'%s_edit_form\' %box_dom_id;\n gadget python: box.getSpecialiseValue();\n + gadget_state python: gadget.getValidationState();\n dummy python: request.set(\'is_gadget_mode\', \'1\');\n dummy python: request.set(\'box_relative_url\', box.getRelativeUrl());\n - visibility_css_dict python: {\'visible\': \'block\',\n - \'invisible\': \'none\'};\n - isAnon python: here.portal_membership.isAnonymousUser();\n edit_form_id gadget/getEditFormId;\n view_form_id gadget/getViewFormId;\n render_type gadget/getRenderType;\n @@ -69,8 +71,17 @@ isAnonymousKnowledgePadUsed python:\n request.get(\'is_anonymous_knowledge_pad_used\', 0);">\n \n +\n +\n + <div class="block" \n + tal:condition="python: gadget is not None and gadget_state==\'invisible\'"\n + tal:attributes="id box_dom_id"\n + style="display:none;"></div>\n +\n +\n + <!-- Show only public gadgets -->\n <div class="block" \n - tal:condition="python: gadget is not None"\n + tal:condition="python: gadget is not None and gadget_state!=\'invisible\'"\n tal:attributes="id box_dom_id">\n \n <h3 class="handle">\n @@ -204,6 +215,7 @@ </div>\n </tal:block>\n </tal:block>\n +</tal:block>\n ]]></unicode> </value> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePag_getPadAsJSON.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePag_getPadAsJSON.xml index c727376e5dee4bfc6b475c4213068f7b4ebd0b5e..3886316faa876846aa7e2e8aa486045eed648db9 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePag_getPadAsJSON.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePag_getPadAsJSON.xml @@ -68,7 +68,7 @@ for box in pad.objectValues():\n gadget = box.getSpecialiseValue()\n gadget_type = gadget.getRenderType()\n if box.getValidationState() in [\'visible\', \'invisible\'] \\\n - and gadget_type==\'asynchronous\':\n + and gadget_type==\'asynchronous\' and gadget.getValidationState()!=\'invisible\':\n edit_form_id=gadget.getEditFormId()\n view_form_id=gadget.getViewFormId()\n base_url = \'%s/%s\' %(context.absolute_url(), view_form_id) \n diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 0905ea78aba8dbc76598cb3610907683a1cb4525..837f72e62aada6de3f28d3e73245f0f786b5418c 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -642 \ No newline at end of file +643 \ No newline at end of file