-class SourcePackageRecipeSet:
- """A simple class from SourcePackageRecipeSet.
-
- This class is only used for making breadcrumbs.
+class RecipesForPersonBreadcrumb(Breadcrumb):
+ """A Breadcrumb that will handle the "Recipes" link for recipe breadcrumbs.
"""
All fixed! Here's the incremental.
=== modified file 'configs/ development/ build-from- branch. zcml' development/ build-from- branch. zcml 2010-04-23 01:23:47 +0000 development/ build-from- branch. zcml 2010-04-23 03:10:20 +0000
permissio n="zope. Public" />
provides= "canonical. launchpad. webapp. interfaces. IBreadcrumb" code.browser. sourcepackagere cipe.ISourcePac kageRecipeSet" "lp.code. browser. sourcepackagere cipe.SourcePack ageRecipeSetBre adcrumb" code.browser. sourcepackagere cipe.IRecipesFo rPerson" "lp.code. browser. sourcepackagere cipe.RecipesFor PersonBreadcrum b"
permissio n="zope. Public" />
--- configs/
+++ configs/
@@ -103,8 +103,8 @@
<adapter
- for="lp.
- factory=
+ for="lp.
+ factory=
</facet>
<securedutility
=== modified file 'lib/lp/ code/browser/ sourcepackagere cipe.py' code/browser/ sourcepackagere cipe.py 2010-04-23 01:23:47 +0000 code/browser/ sourcepackagere cipe.py 2010-04-23 03:08:40 +0000 interfaces. pocket import PackagePublishi ngPocket
--- lib/lp/
+++ lib/lp/
@@ -47,29 +47,24 @@
from lp.registry.
-class ISourcePackageR ecipeSet( Interface) : on(Interface) :
+class IRecipesForPers
"""A marker interface for source package recipe sets."""
-class SourcePackageRe cipeSet: cipeSet. nBreadcrumb( Breadcrumb) :
- """A simple class from SourcePackageRe
-
- This class is only used for making breadcrumbs.
+class RecipesForPerso
+ """A Breadcrumb that will handle the "Recipes" link for recipe breadcrumbs.
"""
- implements( ISourcePackageR ecipeSet) cipeSetBreadcru mb(Breadcrumb) :
-
- def __init__(self, recipe):
- self.recipe = recipe
-
-
-class SourcePackageRe
rootsite = 'code'
text = 'Recipes'
+ implements( IRecipesForPers on) url(self. context. recipe. owner) + '/+recipes' url(self. context. context) + '/+recipes'
+
@property
def url(self):
- return canonical_
+ # Yes, this looks odd, but basically, the breadcrumb code wraps this
+ # class in an instance of itself (because it's doing double duty).
+ return canonical_
class SourcePackageRe cipeHierarchy( Hierarchy) :
@@ -91,7 +86,7 @@
recipe = traversed.pop(0)
# Pop in the "Recipes" link to recipe listings. cipeSet( recipe) nBreadcrumb( recipe. owner)
- yield SourcePackageRe
+ yield RecipesForPerso
yield recipe
for item in traversed: