appy.gen: added Ref.navigable: if True, referenced objects can appear within the portlet.

This commit is contained in:
Gaetan Delannay 2012-03-27 10:37:41 +02:00
parent 1e9e4df5a6
commit 5928996730
6 changed files with 67 additions and 47 deletions

View file

@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
from appy.gen.wrappers import AbstractWrapper
# ------------------------------------------------------------------------------
class PageWrapper(AbstractWrapper):
def validate(self, new, errors):
'''Inter-field validation.'''
return self._callCustom('validate', new, errors)
def showSubPages(self):
'''Show the sub-pages.'''
if self.user.has_role('Manager'): return 'view'
def onEdit(self, created):
return self._callCustom('onEdit', created)
# ------------------------------------------------------------------------------