make favorites interface more complete; provide convenience properties for layout views
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3071 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
3d8f8f1ef5
commit
f093fd1b58
2 changed files with 13 additions and 1 deletions
|
@ -30,6 +30,10 @@ from loops.common import adapted
|
|||
|
||||
class LayoutNodeView(Page):
|
||||
|
||||
@Lazy
|
||||
def loopsRoot(self):
|
||||
return self.context.getLoopsRoot()
|
||||
|
||||
@Lazy
|
||||
def layoutName(self):
|
||||
return self.context.viewName or 'page'
|
||||
|
|
|
@ -32,10 +32,18 @@ class IFavorites(Interface):
|
|||
""" A collection of favorites.
|
||||
"""
|
||||
|
||||
def add(objectId, personId):
|
||||
def add(obj, person):
|
||||
""" Add an object to the person's favorites collection.
|
||||
"""
|
||||
|
||||
def remove(obj, person):
|
||||
""" Remove an object from the person's favorites collection.
|
||||
"""
|
||||
|
||||
def list(person, sortKey=None):
|
||||
""" Return a list of favorite objects for the person given.
|
||||
"""
|
||||
|
||||
|
||||
class IFavorite(ITrack):
|
||||
""" A favorite references a content object via the
|
||||
|
|
Loading…
Add table
Reference in a new issue