Updated shortcuts bar
authorThierry Florac <thierry.florac@onf.fr>
Mon, 18 Jan 2016 18:38:35 +0100
changeset 112 542aebb75317
parent 111 6afd6d3ad000
child 113 58bdb727258a
Updated shortcuts bar
src/pyams_skin/viewlet/shortcuts/__init__.py
--- a/src/pyams_skin/viewlet/shortcuts/__init__.py	Mon Jan 18 18:38:12 2016 +0100
+++ b/src/pyams_skin/viewlet/shortcuts/__init__.py	Mon Jan 18 18:38:35 2016 +0100
@@ -18,17 +18,14 @@
 # import interfaces
 from pyams_skin.interfaces.viewlet import IShortcutsViewletManager, IShortcut
 from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
 
 # import packages
 from pyams_template.template import template_config
 from pyams_viewlet.manager import WeightOrderedViewletManager, viewletmanager_config, TemplateBasedViewletManager
-from pyams_viewlet.viewlet import viewlet_config, Viewlet
+from pyams_viewlet.viewlet import Viewlet
 from zope.interface import implementer
 from zope.schema.fieldproperty import FieldProperty
 
-from pyams_skin import _
-
 
 @viewletmanager_config(name='pyams.shortcuts', layer=IPyAMSLayer, provides=IShortcutsViewletManager)
 @template_config(template='manager.pt', layer=IPyAMSLayer)
@@ -54,20 +51,26 @@
         return self.url
 
 
-try:
-    import pyams_zmi
-except ImportError:
-    pass
-else:
-    @viewlet_config(name='admin.shortcut', manager=IShortcutsViewletManager,
-                    layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION, weight=9999)
-    class ManagementInterfaceShortcut(Shortcut):
-        """Access to management interface"""
-
-        bg_color_class = 'bg-color-orangeDark'
-        icon_class = 'fa-gears'
-        label = _("Management interface")
-        url = 'admin.html'
-        target = '_blank'
-        modal_target = False
-        checked = False
+# try:
+#     import pyams_zmi
+# except ImportError:
+#     pass
+# else:
+#
+#     from pyams_content import _
+#
+#     from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
+#     from pyams_viewlet.viewlet import viewlet_config
+#
+#     @viewlet_config(name='admin.shortcut', manager=IShortcutsViewletManager,
+#                     layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION, weight=9999)
+#     class ManagementInterfaceShortcut(Shortcut):
+#         """Access to management interface"""
+#
+#         bg_color_class = 'bg-color-orangeDark'
+#         icon_class = 'fa-gears'
+#         label = _("Management interface")
+#         url = 'admin.html'
+#         target = '_blank'
+#         modal_target = False
+#         checked = False