Author: jmorliaguet Date: Sun Jul 2 17:26:35 2006 New Revision: 3587 Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/views.py cpsskins/branches/paris-sprint-2006/browser/tree/slot.py cpsskins/branches/paris-sprint-2006/locations/sources.py cpsskins/branches/paris-sprint-2006/standard/negotiation/page.py cpsskins/branches/paris-sprint-2006/standard/negotiation/perspective.py
Log: - fixed the setting of the negotiation strategy Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/views.py ============================================================================== --- cpsskins/branches/paris-sprint-2006/browser/negotiation/views.py (original) +++ cpsskins/branches/paris-sprint-2006/browser/negotiation/views.py Sun Jul 2 17:26:35 2006 @@ -32,6 +32,9 @@ def __init__(self, context, request): self.context = context self.request = request + strategy = self.strategy + if strategy is None: + self.strategy = u'default' def negotiate(self, name): context = self.context @@ -51,7 +54,7 @@ self.request.annotations['cpsskins.strategy'] = name def getStrategy(self): - return self.request.annotations.get('cpsskins.strategy', u'default') + return self.request.annotations.get('cpsskins.strategy') strategy = property(getStrategy, setStrategy) Modified: cpsskins/branches/paris-sprint-2006/browser/tree/slot.py ============================================================================== --- cpsskins/branches/paris-sprint-2006/browser/tree/slot.py (original) +++ cpsskins/branches/paris-sprint-2006/browser/tree/slot.py Sun Jul 2 17:26:35 2006 @@ -60,8 +60,6 @@ else: negotiation = getMultiAdapter((context, request), INegotiation, name='negotiation') - # FIXME: hardcoded negotiation strategy - negotiation.strategy = u'content-author' perspective = negotiation.getPerspective() if perspective is None: Modified: cpsskins/branches/paris-sprint-2006/locations/sources.py ============================================================================== --- cpsskins/branches/paris-sprint-2006/locations/sources.py (original) +++ cpsskins/branches/paris-sprint-2006/locations/sources.py Sun Jul 2 17:26:35 2006 @@ -65,7 +65,7 @@ choices = {} # allow for empty string values - choices[''] = u'(no value)' + choices[u''] = u'(no value)' if root == u'pages': for theme in tmutil.getThemes(): Modified: cpsskins/branches/paris-sprint-2006/standard/negotiation/page.py ============================================================================== --- cpsskins/branches/paris-sprint-2006/standard/negotiation/page.py (original) +++ cpsskins/branches/paris-sprint-2006/standard/negotiation/page.py Sun Jul 2 17:26:35 2006 @@ -89,7 +89,7 @@ def __call__(self): path = guessPath(self.context, self.request) - location = self.manager.getLocation(path, root=u'pages') + location = self.manager.getLocationStorage().find(path, u'pages') if location is not None: page_name = location() return self.manager.getPageByName(page_name) Modified: cpsskins/branches/paris-sprint-2006/standard/negotiation/perspective.py ============================================================================== --- cpsskins/branches/paris-sprint-2006/standard/negotiation/perspective.py (original) +++ cpsskins/branches/paris-sprint-2006/standard/negotiation/perspective.py Sun Jul 2 17:26:35 2006 @@ -36,7 +36,7 @@ def __call__(self): path = guessPath(self.context, self.request) - location = self.manager.getLocation(path, root=u'perspectives') + location = self.manager.getLocationStorage().find(path, u'perspectives') if location is not None: return location() -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins