provide new query for retrieving work items independently of task or user
This commit is contained in:
		
							parent
							
								
									7e7ba9680e
								
							
						
					
					
						commit
						50816e22b2
					
				
					 2 changed files with 19 additions and 0 deletions
				
			
		|  | @ -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. | ||||
|     """ | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue