[CMF-checkins] CVS: CMF/CMFCore - ActionInformation.py:1.1.2.2 ActionProviderBase.py:1.1.2.2 ActionsTool.py:1.19.10.2
Andrew Sawyers
andrew@zope.com
Wed, 2 Jan 2002 19:13:56 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv1238/CMFCore
Modified Files:
Tag: andrew_ttw_actions-branch
ActionInformation.py ActionProviderBase.py ActionsTool.py
Log Message:
*Cleanup of changeActions in ActionProviderbase
*Removed tools from action_providers which do not have any
default actions
*Moved Join action to Registration Tool
*Moved Reconfigure Portal to ProtertiesTool
=== CMF/CMFCore/ActionInformation.py 1.1.2.1 => 1.1.2.2 ===
is visible in the UI
"""
- if self.visible:
- return self.visible
- else:
- return 1
+ return self.visible
security.declarePublic('getPriority')
def getPriority(self):
=== CMF/CMFCore/ActionProviderBase.py 1.1.2.1 => 1.1.2.2 ===
else:
a1['permission'] = ''
- if not a.getCategory():
- a1['category'] = 'object'
- else:
- a1['category'] = a.getCategory()
- if not a.getVisibility():
- a1['visible'] = 1
- else:
- a1['visible'] = a.getVisibility()
+ a1['category'] = a.getCategory() or 'object'
+ a1['visible'] = a.getVisibility()
if a._action:
a1['action'] = a._action.text
else:
@@ -145,7 +139,7 @@
'permissions':
(properties.get('permission_' + s_idx, ()),),
'category': str(properties.get('category_' + s_idx, 'object')),
- 'visible': not not properties.get('visible_' + s_idx, 0),
+ 'visible': properties.get('visible_' + s_idx, 0),
}
if not action['name']:
raise ValueError('A name is required.')
@@ -156,11 +150,10 @@
a._action = Expression(text=action['action'])
else:
a._action.text = action['action']
- if not a.condition:
+ if action['condition'] is not '':
a.condition = Expression(text=action['condition'])
else:
- del(a.condition)
- a.condition= Expression(text = action['condition'])
+ a.condition = ''
a.permissions = action['permissions']
a.category = action['category']
a.visible = action['visible']
=== CMF/CMFCore/ActionsTool.py 1.19.10.1 => 1.19.10.2 ===
action_providers = ('portal_membership'
- , 'portal_memberdata'
, 'portal_actions'
, 'portal_registration'
, 'portal_discussion'
, 'portal_undo'
, 'portal_syndication'
- , 'portal_workflow')
+ , 'portal_workflow'
+ , 'portal_properties')
security = ClassSecurityInfo()