[gen] Fixed groups with style 'tabs'; reused the same tabs for representing phases; pages and phases are now outside the portlet, rendered horizontally below the breadcrumb; methods getSupBreadCrumb and getSubBreadCrumb can now be defined on every gen-class to customize what is shown above and below the breadcrumb (=title with a prefix) on view layouts (those methods are similar to getSubTitle and getSupTitle when displaying lists of objects).
This commit is contained in:
parent
cee7b49e3c
commit
7adbc7e4bc
15 changed files with 143 additions and 75 deletions
|
@ -749,6 +749,14 @@ class ToolMixin(BaseMixin):
|
|||
# advanced search.
|
||||
return klass.searchAdvanced.isShowable(klass, self.appy())
|
||||
|
||||
def portletBottom(self, klass):
|
||||
'''Is there a custom zone to display at the bottom of the portlet zone
|
||||
for p_klass?'''
|
||||
if not hasattr(klass, 'getPortletBottom'): return ''
|
||||
res = klass.getPortletBottom(self.appy())
|
||||
if not res: return ''
|
||||
return res
|
||||
|
||||
def getQueryUrl(self, contentType, searchName, startNumber=None):
|
||||
'''This method creates the URL that allows to perform a (non-Ajax)
|
||||
request for getting queried objects from a search named p_searchName
|
||||
|
|
|
@ -896,14 +896,28 @@ class BaseMixin:
|
|||
def getSupTitle(self, navInfo=''):
|
||||
'''Gets the html code (icons,...) that can be shown besides the title
|
||||
of an object.'''
|
||||
appyObj = self.appy()
|
||||
if hasattr(appyObj, 'getSupTitle'): return appyObj.getSupTitle(navInfo)
|
||||
obj = self.appy()
|
||||
if hasattr(obj, 'getSupTitle'): return obj.getSupTitle(navInfo)
|
||||
return ''
|
||||
|
||||
def getSubTitle(self):
|
||||
'''Gets the content that must appear below the title of an object.'''
|
||||
appyObj = self.appy()
|
||||
if hasattr(appyObj, 'getSubTitle'): return appyObj.getSubTitle()
|
||||
obj = self.appy()
|
||||
if hasattr(obj, 'getSubTitle'): return obj.getSubTitle()
|
||||
return ''
|
||||
|
||||
def getSupBreadCrumb(self):
|
||||
'''Gets the html code that can be shown besides the title of an object
|
||||
in the breadcrumb.'''
|
||||
obj = self.appy()
|
||||
if hasattr(obj, 'getSupBreadCrumb'): return obj.getSupBreadCrumb()
|
||||
return ''
|
||||
|
||||
def getSubBreadCrumb(self):
|
||||
'''Gets the content that must appear below the title of an object in the
|
||||
breadcrumb.'''
|
||||
obj = self.appy()
|
||||
if hasattr(obj, 'getSubBreadCrumb'): return obj.getSubBreadCrumb()
|
||||
return ''
|
||||
|
||||
# Workflow methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue