From: Andy M. <zo...@us...> - 2004-09-14 22:31:03
|
Update of /cvsroot/collective/ZopeZenPlone2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12069 Modified Files: patches.py Log Message: Remove the book from the slot. Copy base properties and news down. Fix EPOZ support - customcss not allowed? Fix Plone 2.0.4 support Add in i18n file. Index: patches.py =================================================================== RCS file: /cvsroot/collective/ZopeZenPlone2/patches.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- patches.py 21 Aug 2004 00:44:35 -0000 1.2 +++ patches.py 14 Sep 2004 22:30:53 -0000 1.3 @@ -69,9 +69,6 @@ p = PatchFile(file = pt, tag = 'div', id = 'wysiwyg') s.replaceNode(p) s.dump(zz) - - - ############################################################ # so this easier right? @@ -83,13 +80,23 @@ s.deleteNodeTal() s.dump(zz) -for file, id in [ - ["/plone_templates/global_pathbar.pt", "portal-breadcrumbs"], - ["/plone_templates/global_siteactions.pt", "portal-siteactions"], - ["/plone_templates/global_searchbox.pt", "portal-searchbox"], - ["/plone_templates/colophon.pt", "portal-colophon"], +for file, id, tags in [ + ["/plone_templates/global_pathbar.pt", "portal-breadcrumbs", ["div", ] ], + ["/plone_templates/global_siteactions.pt", "portal-siteactions", ["div", "ul"]], + ["/plone_templates/global_searchbox.pt", "portal-searchbox", ["div",] ], + ["/plone_templates/colophon.pt", "portal-colophon", ["div",] ], ]: - deleteNodeContents(file, id) + changed = 0 + for tag in tags: + try: + deleteNodeContents(file, id, tag) + changed = 1 + break + except ValueError: + pass + if not changed: + raise ValueError, "Couldn't find the element to change in %s" % file # peersonalbar is wierd -deleteNodeContents("/plone_templates/global_personalbar.pt", attributes={"metal:define-macro":"personal_bar"}) +deleteNodeContents("/plone_templates/global_personalbar.pt", + attributes={"metal:define-macro":"personal_bar"}) |