Commit f4d0e4c0 authored by Łukasz Nowak's avatar Łukasz Nowak

- add getIconURL on Folder class, as type icon resolution for ERP5 types is...

 - add getIconURL on Folder class, as type icon resolution for ERP5 types is static, and CMF 2.2 works by default with dynamic, but there is no need to make it so complex

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38928 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd4183ad
......@@ -1584,6 +1584,17 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
Folder.inheritedAttribute(
'_verifyObjectPaste')(self, object, validate_src)
security.declarePublic('getIconURL')
def getIconURL(self):
""" Get the absolute URL of the icon for the object.
Patched, as ERP5 Type does not provide getExprContext which is used in
CMF 2.2
"""
ti = self.getTypeInfo()
utool = getToolByName(self, 'portal_url')
if ti is None:
return '%s/misc_/OFSP/dtmldoc.gif' % utool()
return '%s/%s' % (utool(), ti.getTypeIcon())
# We browse all used class from btree and hbtree and set not implemented
# class if one method defined on a class is not defined on other, thus if
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment