# HG changeset patch # User Thierry Florac # Date 1444233160 -7200 # Node ID 25cf058f7e1dd93c17db525ed38e5ef5a35808ef # Parent e7386933c1843903167beee2da9ff0ef6f197b57 Set custom layouts without ZCML diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/__init__.py --- a/src/pyams_skin/interfaces/__init__.py Wed Sep 09 11:53:09 2015 +0200 +++ b/src/pyams_skin/interfaces/__init__.py Wed Oct 07 17:52:40 2015 +0200 @@ -15,9 +15,11 @@ # import standard library # import interfaces +from pyams_skin.layer import IPyAMSLayer from zope.component.interfaces import IObjectEvent, ObjectEvent # import packages +from pyams_template.template import layout_config from zope.interface import implementer, Interface, Attribute from zope.configuration.fields import GlobalInterface from zope.schema import Text, TextLine, Choice, Int @@ -63,24 +65,29 @@ vocabulary='PyAMS skins') +@layout_config(template='templates/fullpage-layout.pt', layer=IPyAMSLayer) class IFullPage(Interface): """Full page marker interface""" +@layout_config(template='templates/fullpage-modal-layout.pt', layer=IPyAMSLayer) class IModalFullPage(IFullPage): """Full page modal dialog marker interface""" dialog_class = Attribute("Default dialog CSS class") +@layout_config(template='templates/inner-layout.pt', layer=IPyAMSLayer) class IInnerPage(Interface): """Inner page marker interface""" +@layout_config(template='templates/widget-layout.pt', layer=IPyAMSLayer) class IWidgetInnerPage(IInnerPage): """Inner page with widget marker interface""" +@layout_config(template='templates/modal-layout.pt', layer=IPyAMSLayer) class IModalPage(Interface): """Modal page marker interface""" diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/templates/fullpage-layout.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/interfaces/templates/fullpage-layout.pt Wed Oct 07 17:52:40 2015 +0200 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/templates/fullpage-modal-layout.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/interfaces/templates/fullpage-modal-layout.pt Wed Oct 07 17:52:40 2015 +0200 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/templates/inner-layout.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/interfaces/templates/inner-layout.pt Wed Oct 07 17:52:40 2015 +0200 @@ -0,0 +1,3 @@ + + + diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/templates/modal-layout.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/interfaces/templates/modal-layout.pt Wed Oct 07 17:52:40 2015 +0200 @@ -0,0 +1,4 @@ + diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/interfaces/templates/widget-layout.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/interfaces/templates/widget-layout.pt Wed Oct 07 17:52:40 2015 +0200 @@ -0,0 +1,16 @@ + + +
+
+ + +

Title

+ + +
+
+ +
+
diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/templates/fullpage-layout.pt --- a/src/pyams_skin/templates/fullpage-layout.pt Wed Sep 09 11:53:09 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/templates/fullpage-modal-layout.pt --- a/src/pyams_skin/templates/fullpage-modal-layout.pt Wed Sep 09 11:53:09 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/templates/inner-layout.pt --- a/src/pyams_skin/templates/inner-layout.pt Wed Sep 09 11:53:09 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - - diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/templates/modal-layout.pt --- a/src/pyams_skin/templates/modal-layout.pt Wed Sep 09 11:53:09 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - diff -r e7386933c184 -r 25cf058f7e1d src/pyams_skin/templates/widget-layout.pt --- a/src/pyams_skin/templates/widget-layout.pt Wed Sep 09 11:53:09 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - -
-
- - -

Title

- - -
-
- -
-