Commit 2535e831 authored by Yusei Tahara's avatar Yusei Tahara

product: Set Zope4 ZMI icon for Folder, ZMySQLDA, Localizer.

parent dc9ffa12
...@@ -56,6 +56,7 @@ from Products.ERP5Type.Utils import sortValueList ...@@ -56,6 +56,7 @@ from Products.ERP5Type.Utils import sortValueList
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Accessor import Base as BaseAccessor from Products.ERP5Type.Accessor import Base as BaseAccessor
from Products.ERP5Type import IS_ZOPE2
try: try:
from Products.CMFCore.CMFBTreeFolder import CMFBTreeFolder from Products.CMFCore.CMFBTreeFolder import CMFBTreeFolder
except ImportError: except ImportError:
...@@ -718,6 +719,9 @@ class Folder(FolderMixIn, CopyContainer, ObjectManager, Base, OFSFolder2, CMFBTr ...@@ -718,6 +719,9 @@ class Folder(FolderMixIn, CopyContainer, ObjectManager, Base, OFSFolder2, CMFBTr
portal_type = 'Folder' portal_type = 'Folder'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
if not IS_ZOPE2:
zmi_icon = 'far fa-folder'
# Overload _properties define in OFS/Folder # Overload _properties define in OFS/Folder
# _properties=({'id':'title', 'type': 'string','mode':'wd'},) # _properties=({'id':'title', 'type': 'string','mode':'wd'},)
# because it conflicts with title accessor generation # because it conflicts with title accessor generation
......
...@@ -38,7 +38,7 @@ from .MessageCatalog import MessageCatalog, to_unicode ...@@ -38,7 +38,7 @@ from .MessageCatalog import MessageCatalog, to_unicode
from .utils import lang_negotiator from .utils import lang_negotiator
from .LanguageManager import LanguageManager from .LanguageManager import LanguageManager
from Products.ERP5Type import IS_ZOPE2
# Constructors # Constructors
manage_addLocalizerForm = LocalDTMLFile('ui/Localizer_add', globals()) manage_addLocalizerForm = LocalDTMLFile('ui/Localizer_add', globals())
...@@ -63,6 +63,9 @@ class Localizer(LanguageManager, Folder): ...@@ -63,6 +63,9 @@ class Localizer(LanguageManager, Folder):
id = 'Localizer' id = 'Localizer'
if not IS_ZOPE2:
zmi_icon = 'fas fa-language'
_properties = ({'id': 'title', 'type': 'string'}, _properties = ({'id': 'title', 'type': 'string'},
{'id': 'accept_methods', 'type': 'tokens'}, {'id': 'accept_methods', 'type': 'tokens'},
{'id': 'user_defined_languages', 'type': 'lines'},) {'id': 'user_defined_languages', 'type': 'lines'},)
......
...@@ -101,6 +101,7 @@ from DateTime import DateTime ...@@ -101,6 +101,7 @@ from DateTime import DateTime
from . import DABase from . import DABase
from .db import DB, DeferredDB from .db import DB, DeferredDB
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import IS_ZOPE2
SHARED_DC_ZRDB_LOCATION = os.path.dirname(Shared.DC.ZRDB.__file__) SHARED_DC_ZRDB_LOCATION = os.path.dirname(Shared.DC.ZRDB.__file__)
...@@ -140,6 +141,9 @@ class Connection(DABase.Connection): ...@@ -140,6 +141,9 @@ class Connection(DABase.Connection):
connect_on_load = False connect_on_load = False
if not IS_ZOPE2:
zmi_icon = 'fas fa-database'
def factory(self): return DB def factory(self): return DB
security.declarePrivate('manage_beforeDelete') security.declarePrivate('manage_beforeDelete')
......
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