# HG changeset patch
# User casties
# Date 1372340384 -7200
# Node ID 670b3507509d30581fac38d8358a331b23307d2c
# Parent 9ce5816e89b223cbb43c3345e8524fd2efcbc673
fix breadcrumbs for features.
diff -r 9ce5816e89b2 -r 670b3507509d MPIWGFeature.py
--- a/MPIWGFeature.py Thu Jun 27 13:03:04 2013 +0200
+++ b/MPIWGFeature.py Thu Jun 27 15:39:44 2013 +0200
@@ -2,6 +2,7 @@
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from OFS.Folder import Folder
from Globals import package_home
+from Acquisition import aq_parent
import os
import logging
@@ -223,8 +224,10 @@
def getBreadcrumbs(self):
"""return list of breadcrumbs from here to the root"""
- crumbs = [{'text':self.getFullTitle(), 'url':self.absolute_url(), 'object':self}]
- parent = self.aq_parent
+ # get acquisition parent (skipping folder "features")
+ parent = aq_parent(aq_parent(self))
+ baseUrl = parent.absolute_url() + '/features'
+ crumbs = [{'text':self.getFullTitle(), 'url':self.getUrl(baseUrl=baseUrl), 'object':self}]
if hasattr(parent, 'getBreadcrumbs'):
if self.title:
return parent.getBreadcrumbs() + crumbs
diff -r 9ce5816e89b2 -r 670b3507509d MPIWGProjects.py
--- a/MPIWGProjects.py Thu Jun 27 13:03:04 2013 +0200
+++ b/MPIWGProjects.py Thu Jun 27 15:39:44 2013 +0200
@@ -10,6 +10,7 @@
from OFS.SimpleItem import SimpleItem
from OFS.Folder import Folder
from AccessControl import ClassSecurityInfo
+from Acquisition import aq_parent
from Globals import package_home
import urllib
import re
@@ -1109,7 +1110,7 @@
def copyObjectToArchive(self):
"""kopiere aktuelles objekt ins archiv"""
logging.info("copytoarchive 1")
- cb = self.aq_parent.manage_copyObjects(self.getId())
+ cb = aq_parent(self).manage_copyObjects(self.getId())
logging.info("copytoarchive 2")
self.manage_pasteObjects(cb)
logging.info("copytoarchive 3")
@@ -1341,7 +1342,7 @@
"""return list of breadcrumbs from here to the root"""
crumbs = []
# skip direct parent Folder /projects/
- parent = self.aq_parent.aq_parent
+ parent = aq_parent(aq_parent(self))
# get parents breadcrumbs
if hasattr(parent, 'getBreadcrumbs'):
crumbs = parent.getBreadcrumbs()
diff -r 9ce5816e89b2 -r 670b3507509d MPIWGStaff.py
--- a/MPIWGStaff.py Thu Jun 27 13:03:04 2013 +0200
+++ b/MPIWGStaff.py Thu Jun 27 15:39:44 2013 +0200
@@ -1,7 +1,5 @@
"""This file contains the classes for the organization of the staff"""
-from zExceptions import Redirect
-
from OFS.Folder import Folder
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
diff -r 9ce5816e89b2 -r 670b3507509d zpt/feature/feature_template.zpt
--- a/zpt/feature/feature_template.zpt Thu Jun 27 13:03:04 2013 +0200
+++ b/zpt/feature/feature_template.zpt Thu Jun 27 15:39:44 2013 +0200
@@ -24,42 +24,36 @@