Back to index

plone3  3.1.7
folder_copy_control.py
Go to the documentation of this file.
00001 ##parameters=ids, **kw
00002 ##title=Copy objects from a folder to the clipboard
00003 ##
00004 from Products.CMFDefault.exceptions import CopyError
00005 from Products.CMFDefault.utils import Message as _
00006 
00007 try:
00008     context.manage_copyObjects(ids, context.REQUEST)
00009     if len(ids) == 1:
00010         return context.setStatus(True, _(u'Item copied.'))
00011     else:
00012         return context.setStatus(True, _(u'Items copied.'))
00013 except CopyError:
00014     return context.setStatus(False, _(u'CopyError: Copy failed.'))