source: WAeUP_SRP/base/skins/waeup_pins/archive_delete.py @ 3392

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

forgotten

  • Property svn:keywords set to Id
File size: 800 bytes
RevLine 
[3076]1## Script (Python) "archive_delete"
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_delete.py 3078 2008-01-31 22:05:54Z henrik $
11"""
12archive and delte PIN batches
13"""
14
15import logging
16logger = logging.getLogger('Skins.archive_delete')
17member_id = str(context.portal_membership.getAuthenticatedMember())
18
19if ids:
20    for id in ids:
21        ob = getattr(context, id)
22        ob['archiveBatch'](delete=True)
[3078]23    message = 'portal_status_message=%s archived and deleted!' % ' '.join(ids)
[3076]24    context.manage_delObjects(ids)
25else:
[3077]26    message = 'portal_status_message=Select at least one batch to archive and delete!'
[3076]27
28if REQUEST is not None:
29    return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message))
[3077]30
Note: See TracBrowser for help on using the repository browser.