Added shortcut to access management interface
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 May 2014 17:57:28 +0200
changeset 9 f5fda123ea09
parent 8 81038d891303
child 10 f368f6dfd92d
Added shortcut to access management interface
src/ztfy/myams/viewlet/shortcuts/__init__.py
src/ztfy/myams/viewlet/shortcuts/configure.zcml
--- a/src/ztfy/myams/viewlet/shortcuts/__init__.py	Wed May 07 17:56:55 2014 +0200
+++ b/src/ztfy/myams/viewlet/shortcuts/__init__.py	Wed May 07 17:57:28 2014 +0200
@@ -18,6 +18,8 @@
 # import local packages
 from ztfy.baseskin.viewlet import WeightViewletManagerBase, ViewletBase
 
+from ztfy.myams import _
+
 
 class ShortcutsViewletManager(WeightViewletManagerBase):
     """Shortcuts viewlet manager"""
@@ -38,3 +40,14 @@
 
     def getURL(self):
         return self.href
+
+
+class ManagementInterfaceShortcut(Shortcut):
+    """Access to management interface"""
+
+    bg_color_class = 'bg-color-orangeDark'
+    icon_class = 'fa-gears'
+    label = _("Management interface")
+    href = '@@properties.html'
+    modal_target = False
+    checked = False
--- a/src/ztfy/myams/viewlet/shortcuts/configure.zcml	Wed May 07 17:56:55 2014 +0200
+++ b/src/ztfy/myams/viewlet/shortcuts/configure.zcml	Wed May 07 17:57:28 2014 +0200
@@ -19,4 +19,13 @@
 		for=".interfaces.IShortcutViewlet"
 		layer="ztfy.myams.layer.MyAMSLayer" />
 
+	<viewlet
+		name="zmi-access"
+		class=".ManagementInterfaceShortcut"
+		for="*"
+		manager=".interfaces.IShortcutsViewletManager"
+		permission="ztfy.ViewManagementScreens"
+		layer="ztfy.myams.layer.MyAMSLayer"
+		weight="9999" />
+
 </configure>