2 from Products
.CMFCore
.utils
import getUtilityByInterfaceName
3 utool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
4 wftool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IWorkflowTool')
5 locale_date_fmt
= context
.locale_date_fmt()
6 infos
= {'checkbox' : True,
7 'url' : ob
.absolute_url(),
9 'modified' : ob
.modified().strftime(locale_date_fmt
),
10 'title_or_id' : ob
.title_or_id(),
11 'position' : context
.getObjectPosition(ob
.getId()),
12 'type' : ob
.Type() or None,
14 'icon': '%s/%s' % (utool(), ob
.getIcon()),
15 'state' : wftool
.getInfoFor(ob
, 'review_state')}
17 return context
.folder_jsupload_snippet_template(listItemInfos
=[infos
])