8589de6b832f07803b0aa372456f9553adcb37fb
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
9 subset_ids
= [ obj
.getId() for obj
in context
.listFolderContents() ]
12 attempt
= context
.moveObjectsUp(ids
, delta
, subset_ids
=subset_ids
)
15 attempt
= context
.moveObjectsUp(ids
, delta
)
17 msg
= _(attempt
== 1 and \
18 '%d item moved up.' or \
19 '%d items moved up.')().encode('utf-8') % attempt
20 return context
.setStatus( True, msg
)
22 return context
.setStatus(False, 'Nothing to change.')
23 except ValueError, errmsg
:
24 return context
.setStatus(False, 'ValueError: %s' % errmsg
)