provide new query for retrieving work items independently of task or user

This commit is contained in:
Helmut Merz 2011-08-24 15:17:04 +02:00
parent 7e7ba9680e
commit 50816e22b2
2 changed files with 19 additions and 0 deletions

View file

@ -249,6 +249,17 @@ class BaseWorkItemsView(object):
for wi in self.workItems.query(**criteria)]
class AllWorkItems(BaseWorkItemsView, ConceptView):
""" Standard view for showing work items independently of task and user.
"""
columns = set(['Task', 'User', 'Title', 'Day', 'Start', 'End', 'Duration', 'Info'])
def listWorkItems(self):
criteria = self.baseCriteria
return sorted(self.query(**criteria), key=lambda x: x.track.timeStamp)
class TaskWorkItems(BaseWorkItemsView, ConceptView):
""" Standard view for showing work items for a node's target.
"""

View file

@ -22,6 +22,14 @@
<!-- application views -->
<zope:adapter
name="allworkitems.html"
for="loops.interfaces.IConcept
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.interface.Interface"
factory="loops.organize.work.browser.AllWorkItems"
permission="zope.View" />
<zope:adapter
name="taskworkitems.html"
for="loops.interfaces.IConcept