[Checkins] SVN: zopeorg.theme/trunk/zopeorg/theme/ implemented
mechanism for keeping 2 themes (table-based and tableless) in
one package. No we can easily switch from tableless back to
table-based in case of any problem. Hurrah! :)
Denis Mishunov
denis.mishunoff at gmail.com
Wed Feb 6 06:26:36 EST 2008
Log message for revision 83588:
implemented mechanism for keeping 2 themes (table-based and tableless) in one package. No we can easily switch from tableless back to table-based in case of any problem. Hurrah! :)
Changed:
U zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml
U zopeorg.theme/trunk/zopeorg/theme/browser/interfaces.py
U zopeorg.theme/trunk/zopeorg/theme/profiles/default/skins.xml
A zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/
A zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/skins.xml
A zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/viewlets.xml
U zopeorg.theme/trunk/zopeorg/theme/profiles.zcml
-=-
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml 2008-02-06 10:40:52 UTC (rev 83587)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml 2008-02-06 11:26:35 UTC (rev 83588)
@@ -13,6 +13,13 @@
name="Zope.org Theme"
/>
+ <!-- 'Zope.org Tableless Theme' Zope 3 skin layer -->
+ <interface
+ interface=".interfaces.IThemeTablelessSpecific"
+ type="zope.publisher.interfaces.browser.IBrowserSkinType"
+ name="Zope.org Tableless Theme"
+ />
+
<browser:viewletManager
name="zopeorg.portalfooter"
provides=".interfaces.IZopeorgPortalFooter"
@@ -167,16 +174,16 @@
permission="plone.app.portlets.ManageOwnPortlets"
class="plone.app.layout.dashboard.dashboard.DashboardView"
template="templates/dashboard.pt"
- layer=".interfaces.IThemeSpecific"
+ layer=".interfaces.IThemeTablelessSpecific"
/>
<browser:page
- for="Products.CMFCore.interfaces.ISiteRoot"
- name="manage-dashboard"
- permission="plone.app.portlets.ManageOwnPortlets"
- class="plone.app.portlets.browser.manage.ManageDashboardPortlets"
- template="templates/manage-dashboard.pt"
- layer=".interfaces.IThemeSpecific"
- />
+ for="Products.CMFCore.interfaces.ISiteRoot"
+ name="manage-dashboard"
+ permission="plone.app.portlets.ManageOwnPortlets"
+ class="plone.app.portlets.browser.manage.ManageDashboardPortlets"
+ template="templates/manage-dashboard.pt"
+ layer=".interfaces.IThemeTablelessSpecific"
+ />
</configure>
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/interfaces.py
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/interfaces.py 2008-02-06 10:40:52 UTC (rev 83587)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/interfaces.py 2008-02-06 11:26:35 UTC (rev 83588)
@@ -4,8 +4,13 @@
from plone.theme.interfaces import IDefaultPloneLayer
class IThemeSpecific(IDefaultPloneLayer):
+ """This marks both - elements for table-based and for tableless
+ """
+
+class IThemeTablelessSpecific(IThemeSpecific):
"""Marker interface that defines a Zope 3 skin layer.
- """
+ This one is used for tableless version only of the skin
+ """
class IZopeorgPortalFooter(IViewletManager):
"""A viewlet manager that sits in the portal footer
Modified: zopeorg.theme/trunk/zopeorg/theme/profiles/default/skins.xml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/profiles/default/skins.xml 2008-02-06 10:40:52 UTC (rev 83587)
+++ zopeorg.theme/trunk/zopeorg/theme/profiles/default/skins.xml 2008-02-06 11:26:35 UTC (rev 83588)
@@ -10,9 +10,6 @@
<object name="zopeorg_theme_styles"
meta_type="Filesystem Directory View"
directory="zopeorg.theme:skins/zopeorg_theme_styles"/>
- <object name="zopeorg_theme_tableless"
- meta_type="Filesystem Directory View"
- directory="zopeorg.theme:skins/zopeorg_theme_tableless"/>
<skin-path name="Zope.org Theme" based-on="Plone Default">
<layer name="zopeorg_theme_custom_images"
@@ -21,8 +18,6 @@
insert-after="zopeorg_theme_custom_images"/>
<layer name="zopeorg_theme_styles"
insert-after="zopeorg_theme_custom_templates"/>
- <layer name="zopeorg_theme_tableless"
- insert-after="zopeorg_theme_styles"/>
</skin-path>
</object>
Added: zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/skins.xml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/skins.xml (rev 0)
+++ zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/skins.xml 2008-02-06 11:26:35 UTC (rev 83588)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<object default_skin="Zope.org Tableless Theme">
+
+ <object name="zopeorg_theme_custom_images"
+ meta_type="Filesystem Directory View"
+ directory="zopeorg.theme:skins/zopeorg_theme_custom_images"/>
+ <object name="zopeorg_theme_custom_templates"
+ meta_type="Filesystem Directory View"
+ directory="zopeorg.theme:skins/zopeorg_theme_custom_templates"/>
+ <object name="zopeorg_theme_styles"
+ meta_type="Filesystem Directory View"
+ directory="zopeorg.theme:skins/zopeorg_theme_styles"/>
+ <object name="zopeorg_theme_tableless"
+ meta_type="Filesystem Directory View"
+ directory="zopeorg.theme:skins/zopeorg_theme_tableless"/>
+
+ <skin-path name="Zope.org Tableless Theme" based-on="Plone Default">
+ <layer name="zopeorg_theme_custom_images"
+ insert-after="custom"/>
+ <layer name="zopeorg_theme_custom_templates"
+ insert-after="zopeorg_theme_custom_images"/>
+ <layer name="zopeorg_theme_styles"
+ insert-after="zopeorg_theme_custom_templates"/>
+ <layer name="zopeorg_theme_tableless"
+ insert-after="zopeorg_theme_styles"/>
+ </skin-path>
+
+</object>
Added: zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/viewlets.xml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/viewlets.xml (rev 0)
+++ zopeorg.theme/trunk/zopeorg/theme/profiles/tableless/viewlets.xml 2008-02-06 11:26:35 UTC (rev 83588)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<object>
+ <order manager="plone.portaltop" skinname="Zope.org Tableless Theme"
+ based-on="Zope.org Theme">
+ <viewlet name="zopeorg.feature.wrapper"
+ insert-after="*" />
+ <viewlet name="plone.contentviews"
+ insert-after="zopeorg.feature.wrapper" />
+ <viewlet name="plone.contentactions"
+ insert-after="plone.contentviews" />
+ </order>
+ <order manager="zopeorg.featureview" skinname="Zope.org Tableless Theme"
+ based-on="Zope.org Theme">
+ <viewlet name="zopeorg.feature"
+ insert-before="*" />
+ </order>
+ <order manager="plone.portalheader" skinname="Zope.org Tableless Theme"
+ based-on="Zope.org Theme">
+ <viewlet name="zopeorg.searchbox"
+ insert-after="plone.searchbox" />
+ <viewlet name="zopeorg.anon.personal_bar"
+ insert-before="plone.searchbox" />
+ </order>
+ <order manager="plone.portalfooter" skinname="Zope.org Tableless Theme"
+ based-on="Zope.org Theme">
+ <viewlet name="zopeorg.footer"
+ insert-before="*" />
+ </order>
+ <order manager="zopeorg.portalfooter" skinname="Zope.org Tableless Theme"
+ based-on="Zope.org Theme">
+ <viewlet name="plone.site_actions"
+ insert-before="*" />
+ <viewlet name="zopeorg.copyright"
+ insert-after="plone.site_actions" />
+ </order>
+
+ <hidden manager="plone.portaltop" skinname="Zope.org Tableless Theme">
+ <viewlet name="plone.path_bar" />
+ </hidden>
+ <hidden manager="plone.contentviews" skinname="Zope.org Tableless Theme">
+ <viewlet name="plone.contentviews" />
+ <viewlet name="plone.contentactions" />
+ </hidden>
+ <hidden manager="plone.portalheader" skinname="Zope.org Tableless Theme">
+ <viewlet name="plone.site_actions" />
+ <viewlet name="plone.siteactions" />
+ <viewlet name="plone.searchbox" />
+ </hidden>
+ <hidden manager="plone.portalfooter" skinname="Zope.org Tableless Theme">
+ <viewlet name="plone.colophon" />
+ <viewlet name="plone.footer" />
+ </hidden>
+
+</object>
Modified: zopeorg.theme/trunk/zopeorg/theme/profiles.zcml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/profiles.zcml 2008-02-06 10:40:52 UTC (rev 83587)
+++ zopeorg.theme/trunk/zopeorg/theme/profiles.zcml 2008-02-06 11:26:35 UTC (rev 83588)
@@ -10,5 +10,13 @@
description='Extension profile for the "Zope.org Theme" Plone theme.'
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
+
+ <genericsetup:registerProfile
+ name="tableless"
+ title="Zope.org Tableless Theme"
+ directory="profiles/tableless"
+ description='Extension profile for the "Zope.org Tableless Theme" Plone theme.'
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ />
</configure>
More information about the Checkins
mailing list