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:
helmutm 2011-01-19 16:58:20 +00:00
parent 0801daf562
commit 832eddcd9b

View file

@ -197,6 +197,7 @@ class RecentChanges(TrackingStats):
sizeOption = self.options('size')
size = int(self.request.form.get('size') or
(sizeOption and sizeOption[0]) or 15)
newOnly = self.options.new_only
new = {}
changed = {}
result = []
@ -214,11 +215,12 @@ class RecentChanges(TrackingStats):
continue
if track.data['action'] == 'modify' and track.taskId not in changed:
changed[track.taskId] = track
if not newOnly:
result.append(track)
continue
return dict(data=[TrackDetails(self, tr) for tr in result],
macro=self.macros['recent_changes'],
showNewColumn=True)
showNewColumn=not newOnly)
class TrackDetails(BaseView):