Updated PyAMSUserSkin
authorThierry Florac <thierry.florac@onf.fr>
Tue, 11 Oct 2016 16:12:49 +0200
changeset 160 6b3ffcd6dbb1
parent 159 8aa8cfb39f32
child 161 5a9d47904b7f
Updated PyAMSUserSkin
src/pyams_skin/layer.py
src/pyams_skin/skin.py
--- a/src/pyams_skin/layer.py	Tue Oct 11 16:11:55 2016 +0200
+++ b/src/pyams_skin/layer.py	Tue Oct 11 16:12:49 2016 +0200
@@ -32,4 +32,8 @@
 
 
 class IPyAMSUserLayer(IPyAMSLayer):
-    """PyAMS custom user layer"""
+    """PyAMS custom user layer
+
+    This layer is the base for all custom skins.
+    Any component should provide a look and feel for this layer.
+    """
--- a/src/pyams_skin/skin.py	Tue Oct 11 16:11:55 2016 +0200
+++ b/src/pyams_skin/skin.py	Tue Oct 11 16:12:49 2016 +0200
@@ -32,14 +32,6 @@
 from pyams_skin import _
 
 
-@utility_config(name='PyAMS default skin', provides=ISkin)
-class PyAMSSkin(object):
-    """PyAMS default skin"""
-
-    label = _("Default PyAMS skin")
-    layer = IPyAMSLayer
-
-
 @implementer(ISkinnable)
 class SkinnableContent(object):
     """Skinnable content base class"""
@@ -131,3 +123,15 @@
         apply_skin(event.request, PyAMSSkin)
     elif context.skin is None:
         apply_skin(event.request, PyAMSSkin)
+
+
+#
+# Base and default skins
+#
+
+@utility_config(name='PyAMS base skin', provides=ISkin)
+class PyAMSSkin(object):
+    """PyAMS base skin"""
+
+    label = _("PyAMS base skin")
+    layer = IPyAMSLayer