Added "header" viewlet in map position or area selection dialog
authorThierry Florac <thierry.florac@onf.fr>
Fri, 26 Jan 2018 16:07:55 +0100
changeset 20 2bbc2c65d9d3
parent 19 31ec78bbd5d6
child 21 c37cd95ae7d0
Added "header" viewlet in map position or area selection dialog
src/pyams_gis/zmi/__init__.py
src/pyams_gis/zmi/interfaces.py
--- a/src/pyams_gis/zmi/__init__.py	Fri Jan 26 16:06:19 2018 +0100
+++ b/src/pyams_gis/zmi/__init__.py	Fri Jan 26 16:07:55 2018 +0100
@@ -16,5 +16,15 @@
 # import standard library
 
 # import interfaces
+from pyams_gis.zmi.interfaces import IMapHeaderViewletManager
+from pyams_skin.layer import IPyAMSLayer
 
 # import packages
+from pyams_viewlet.manager import viewletmanager_config, WeightOrderedViewletManager
+from zope.interface import Interface
+
+
+@viewletmanager_config(name='pyams_gis.map.header', view=Interface, layer=IPyAMSLayer,
+                       provides=IMapHeaderViewletManager)
+class MapheaderViewletManager(WeightOrderedViewletManager):
+    """Map header viewlet manager"""
--- a/src/pyams_gis/zmi/interfaces.py	Fri Jan 26 16:06:19 2018 +0100
+++ b/src/pyams_gis/zmi/interfaces.py	Fri Jan 26 16:07:55 2018 +0100
@@ -17,11 +17,16 @@
 
 # import interfaces
 from pyams_skin.interfaces.viewlet import IMenuItem
+from pyams_viewlet.interfaces import IViewletManager
 
 # import packages
 from zope.interface import Interface
 
 
+class IMapHeaderViewletManager(IViewletManager):
+    """Map header viewlet manager marker interface"""
+
+
 class IMapManagerMenu(IMenuItem):
     """Map manager menu interface"""