source: WAeUP_SRP/trunk/skins/waeup_pins/archive.py @ 3863

Last change on this file since 3863 was 3077, checked in by Henrik Bettermann, 17 years ago

archiveBatch fixed (Joachim, wie konnte das bei dir funktionieren??)

archive file reorganized

pins_view and psm beautified

  • Property svn:keywords set to Id
File size: 793 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 3077 2008-01-31 22:05:11Z henrik $
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=Select at least one batch to archive!'
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.