668bf1f6d559832729ad9086ab8700896cefbcdb
1 ##parameters=ids, delta, **kw
4 #TODO : translate messages
5 #from Products.PlacelessTranslationService.MessageID import MessageIDFactory
6 #_ = MessageIDFactory('default', as_unicode=True)
7 _
= lambda x
: lambda : x
10 subset_ids
= [ obj
.getId() for obj
in context
.listFolderContents() ]
13 attempt
= context
.moveObjectsDown(ids
, delta
, subset_ids
=subset_ids
)
16 attempt
= context
.moveObjectsDown(ids
, delta
)
18 msg
= _(attempt
== 1 and \
19 '%d item moved down.' or \
20 '%d items moved down.')().encode('utf-8') % attempt
21 return context
.setStatus( True, msg
)
23 return context
.setStatus(False, 'Nothing to change.')
24 except ValueError, errmsg
:
25 return context
.setStatus(False, 'ValueError: %s' % errmsg
)