From c036ee2ea13f231d6afa6b452eeb672c3786046b Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Fri, 23 Apr 2010 06:20:09 +0000 Subject: [PATCH] Show "Add New Discussion Thread" only if user has needed permissions. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34733 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5Site_viewDiscussionThreadGadget.xml | 9 +------ .../your_add_new_thread_link.xml | 27 +++++++++++++++++++ bt5/erp5_discussion/bt/revision | 2 +- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget.xml b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget.xml index 4887cda7c6..447c43c39f 100644 --- a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget.xml +++ b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget.xml @@ -63,10 +63,9 @@ <value> <list> <string>left</string> - <string>right</string> <string>center</string> - <string>bottom</string> <string>hidden</string> + <string>bottom</string> </list> </value> </item> @@ -102,12 +101,6 @@ </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget/your_add_new_thread_link.xml b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget/your_add_new_thread_link.xml index eecf03443a..11ad9da48b 100644 --- a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget/your_add_new_thread_link.xml +++ b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ERP5Site_viewDiscussionThreadGadget/your_add_new_thread_link.xml @@ -16,6 +16,7 @@ <string>css_class</string> <string>default</string> <string>editable</string> + <string>enabled</string> <string>title</string> </list> </value> @@ -72,6 +73,12 @@ <key> <string>editable</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -107,6 +114,10 @@ <key> <string>editable</string> </key> <value> <int>0</int> </value> </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string>my_editor_field</string> </value> @@ -149,4 +160,20 @@ python: \'<a class="bt-small" style="width:250px;" href="%s/discussion_thread_mo </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.Base_checkPermission(\'discussion_thread_module\', \'Add portal content\')</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_discussion/bt/revision b/bt5/erp5_discussion/bt/revision index d2e1cefe89..7d37386284 100644 --- a/bt5/erp5_discussion/bt/revision +++ b/bt5/erp5_discussion/bt/revision @@ -1 +1 @@ -44 \ No newline at end of file +45 \ No newline at end of file -- 2.30.9