[Checkins] SVN: zopeorg.theme/trunk/zopeorg/theme/browser/ Got rid
of the separate viewlets for Feature's blurb. The code has
been merged to view Feature view template directly.
Denis Mishunov
denis.mishunoff at gmail.com
Sun Feb 3 15:50:00 EST 2008
Log message for revision 83468:
Got rid of the separate viewlets for Feature's blurb. The code has been merged to view Feature view template directly.
Changed:
U zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml
U zopeorg.theme/trunk/zopeorg/theme/browser/feature.pt
U zopeorg.theme/trunk/zopeorg/theme/browser/feature.py
D zopeorg.theme/trunk/zopeorg/theme/browser/templates/divider.pt
D zopeorg.theme/trunk/zopeorg/theme/browser/templates/feature.pt
U zopeorg.theme/trunk/zopeorg/theme/browser/viewlets.py
-=-
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/configure.zcml 2008-02-03 20:49:59 UTC (rev 83468)
@@ -99,32 +99,5 @@
action="@@view"
description="Default view for Feature object"
/>
-
- <!-- New viewlet manager for Feature default view -->
- <browser:viewletManager
- name="zopeorg.featureview"
- provides=".interfaces.IFeatureView"
- permission="zope2.View"
- class="plone.app.viewletmanager.manager.OrderedViewletManager"
- />
-
- <!-- Feature's blurb viewlet -->
- <browser:viewlet
- name="zopeorg.feature"
- manager=".interfaces.IFeatureView"
- class=".viewlets.FeatureViewlet"
- layer=".interfaces.IThemeSpecific"
- permission="zope2.View"
- />
-
- <!-- The header divider viewlet -->
- <browser:viewlet
- name="zopeorg.header.divider"
- manager=".interfaces.IFeatureView"
- class=".viewlets.ZopeorgHeaderDividerViewlet"
- layer=".interfaces.IThemeSpecific"
- permission="zope2.View"
- />
-
</configure>
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/feature.pt
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/feature.pt 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/feature.pt 2008-02-03 20:49:59 UTC (rev 83468)
@@ -14,10 +14,22 @@
tal:define="kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
templateId template/getId;
- text here/getText;">
-
- <div tal:replace="structure provider:zopeorg.featureview" />
+ text here/getText;">
+ <div id="portal-feature"
+ i18n:domain="zopeorg.theme">
+
+ <img tal:replace="structure python:view.tag(scale='mini', css_class='featureImage')" src="" alt="" />
+
+ <div id="feature-blurb">
+ <tal:blurb replace="structure view/blurb" />
+ </div>
+ </div>
+
+ <div id="portal-header-divider">
+ <tal:divider replace="structure view/divider" />
+ </div>
+
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h1 class="documentFirstHeading">
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/feature.py
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/feature.py 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/feature.py 2008-02-03 20:49:59 UTC (rev 83468)
@@ -8,4 +8,11 @@
""" Default view for chain. This class contains all python that we need for
Feature objects.
"""
- pass
\ No newline at end of file
+ def tag(self, **kwargs):
+ return self.context.getField('image').tag(self.context, **kwargs)
+
+ def blurb(self):
+ return self.context.getBlurb()
+
+ def divider(self):
+ return self.context.getDivider()
\ No newline at end of file
Deleted: zopeorg.theme/trunk/zopeorg/theme/browser/templates/divider.pt
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/templates/divider.pt 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/templates/divider.pt 2008-02-03 20:49:59 UTC (rev 83468)
@@ -1,3 +0,0 @@
-<div id="portal-header-divider">
- <tal:divider replace="structure view/divider" />
-</div>
\ No newline at end of file
Deleted: zopeorg.theme/trunk/zopeorg/theme/browser/templates/feature.pt
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/templates/feature.pt 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/templates/feature.pt 2008-02-03 20:49:59 UTC (rev 83468)
@@ -1,9 +0,0 @@
-<div id="portal-feature"
- i18n:domain="zopeorg.theme">
-
- <img tal:replace="structure python:view.tag(scale='mini', css_class='featureImage')" src="" alt="" />
-
- <div id="feature-blurb">
- <tal:blurb replace="structure view/blurb" />
- </div>
-</div>
\ No newline at end of file
Modified: zopeorg.theme/trunk/zopeorg/theme/browser/viewlets.py
===================================================================
--- zopeorg.theme/trunk/zopeorg/theme/browser/viewlets.py 2008-02-03 20:22:55 UTC (rev 83467)
+++ zopeorg.theme/trunk/zopeorg/theme/browser/viewlets.py 2008-02-03 20:49:59 UTC (rev 83468)
@@ -1,25 +1,7 @@
-from zope.component import getMultiAdapter
-
-from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-from plone.app.layout.viewlets.common import ViewletBase, SearchBoxViewlet, PersonalBarViewlet
-
-class FeatureViewlet(ViewletBase):
- render = ViewPageTemplateFile('templates/feature.pt')
-
- def tag(self, **kwargs):
- return self.context.getField('image').tag(self.context, **kwargs)
+from plone.app.layout.viewlets.common import SearchBoxViewlet, PersonalBarViewlet
- def blurb(self):
- return self.context.getBlurb()
-
-class ZopeorgHeaderDividerViewlet(ViewletBase):
- render = ViewPageTemplateFile('templates/divider.pt')
-
- def divider(self):
- return self.context.getDivider()
-
class ZopeorgSearchBoxViewlet(SearchBoxViewlet):
render = ViewPageTemplateFile('templates/searchbox.pt')
More information about the Checkins
mailing list