source: WAeUP_SRP/base/skins/waeup_pins/archive.py @ 3076

Last change on this file since 3076 was 3076, checked in by joachim, 18 years ago

add archive and archive_delete, show all batches in pins_view

  • Property svn:keywords set to Id
File size: 787 bytes
Line 
1## Script (Python) "archive"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=ids=[], REQUEST=None
8##title=
9##
10# $Id: archive.py 3076 2008-01-31 18:29:58Z joachim $
11"""
12FIXME: add docstring.
13"""
14try:
15    from Products.zdb import set_trace
16except:
17    def set_trace():
18        pass
19
20import logging
21logger = logging.getLogger('Skins.archive')
22member_id = str(context.portal_membership.getAuthenticatedMember())
23if ids:
24    for id in ids:
25        ob = getattr(context, id)
26        ob['archiveBatch']()
27    message = 'portal_status_message=%s archived' % ' '.join(ids)
28else:
29    message = 'portal_status_message=psm_select_at_least_one_document'
30
31if REQUEST is not None:
32    return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message))
Note: See TracBrowser for help on using the repository browser.