Commits

Anonymous committed 5025efa

updated setup.py; conditioned the use of document_actions macro if it exists to avoid making changes to this package that would make it work only on plone4 and not plone3 as well; conditioned the search for IBrowserView for the same reason

Comments (0)

Files changed (5)

 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version = '1.4.4'
+version = '1.4.5dev'
 
 long_description = (
     read('README.txt')

src/slc/seminarportal/browser/interfaces.py

-from zope.publisher.interfaces.browser import IBrowserView
+try:
+    from zope.publisher.interfaces.browser import IBrowserView
+except ImportError: # plone 3
+    from zope.app.publisher.interfaces.browser import IBrowserView
+
 from zope.viewlet.interfaces import IViewletManager
 
 class IAboveSeminarListing(IViewletManager):

src/slc/seminarportal/browser/templates/seminar_view.pt

     </metal:block>
 
     <metal:fill fill-slot="header">
-        <!--<div metal:use-macro="here/document_actions/macros/document_actions">-->
-        <!--    Document actions (print, sendto etc)-->
-        <!--</div>-->
+        <tal:cond tal:condition="exists:here/document_macros">
+            <div metal:use-macro="here/document_actions/macros/document_actions">
+                Document actions (print, sendto etc)
+            </div>
+        </tal:cond>
         <h1>
         <tal:block replace="structure python:getattr(here, here.getIcon(1))"/>
         <span tal:replace="here/Title"/>

src/slc/seminarportal/browser/templates/speaker_view.pt

 
 <head>
     <metal:fill fill-slot="header">
-        <!--<div metal:use-macro="here/document_actions/macros/document_actions">-->
-        <!--    Document actions (print, sendto etc)-->
-        <!--</div>-->
+        <tal:cond tal:condition="exists:here/document_macros">
+            <div metal:use-macro="here/document_actions/macros/document_actions">
+                Document actions (print, sendto etc)
+            </div>
+        </tal:cond>
         <h1>
             <tal:block replace="structure python:getattr(here, here.getIcon(1))"/>
             <span tal:replace="here/Title"/>

src/slc/seminarportal/browser/templates/speech_view.pt

 
 <head>
     <metal:fill fill-slot="header">
-        <!--<div metal:use-macro="here/document_actions/macros/document_actions">-->
-        <!--    Document actions (print, sendto etc)-->
-        <!--</div>-->
+        <tal:cond tal:condition="exists:here/document_macros">
+            <div metal:use-macro="here/document_actions/macros/document_actions">
+                Document actions (print, sendto etc)
+            </div>
+        </tal:cond>
         <h1>
             <tal:block replace="structure python:getattr(here, here.getIcon(1))"/>
             <span tal:replace="here/Title"/>