1f0b54c0fcd813e0ed489190db679d0eefaac209
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
.moveObjectsToTop(ids
, subset_ids
=subset_ids
)
15 attempt
= context
.moveObjectsToTop(ids
)
17 msg
= _(attempt
== 1 and \
18 '%d item moved to top.' or \
19 '%d items moved to top.')().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
)