provide 'new_only' option for recent changes query to list only object that have been created recently
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4151 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									0801daf562
								
							
						
					
					
						commit
						832eddcd9b
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -197,6 +197,7 @@ class RecentChanges(TrackingStats): | ||||||
|         sizeOption = self.options('size') |         sizeOption = self.options('size') | ||||||
|         size = int(self.request.form.get('size') or |         size = int(self.request.form.get('size') or | ||||||
|                    (sizeOption and sizeOption[0]) or 15) |                    (sizeOption and sizeOption[0]) or 15) | ||||||
|  |         newOnly = self.options.new_only | ||||||
|         new = {} |         new = {} | ||||||
|         changed = {} |         changed = {} | ||||||
|         result = [] |         result = [] | ||||||
|  | @ -214,11 +215,12 @@ class RecentChanges(TrackingStats): | ||||||
|                 continue |                 continue | ||||||
|             if track.data['action'] == 'modify' and track.taskId not in changed: |             if track.data['action'] == 'modify' and track.taskId not in changed: | ||||||
|                 changed[track.taskId] = track |                 changed[track.taskId] = track | ||||||
|                 result.append(track) |                 if not newOnly: | ||||||
|  |                     result.append(track) | ||||||
|                 continue |                 continue | ||||||
|         return dict(data=[TrackDetails(self, tr) for tr in result], |         return dict(data=[TrackDetails(self, tr) for tr in result], | ||||||
|                     macro=self.macros['recent_changes'], |                     macro=self.macros['recent_changes'], | ||||||
|                     showNewColumn=True) |                     showNewColumn=not newOnly) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TrackDetails(BaseView): | class TrackDetails(BaseView): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm