Utilisation du workflow directement dans le listing des dossiers.
[Plinn.git] / Products / Plinn / skins / generic / folder_jsupload_snippet.py
index f932675..b6a082a 100644 (file)
@@ -1,6 +1,7 @@
 ##parameters=ob
 from Products.CMFCore.utils import getUtilityByInterfaceName
 utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
+wftool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IWorkflowTool')
 locale_date_fmt = context.locale_date_fmt()
 infos = {'checkbox' : True,
          'url' : ob.absolute_url(),
@@ -10,6 +11,7 @@ infos = {'checkbox' : True,
          'position' : context.getObjectPosition(ob.getId()),
          'type' : ob.Type() or None,
          'id' : ob.getId(),
-         'icon': '%s/%s' % (utool(), ob.getIcon())}
+         'icon': '%s/%s' % (utool(), ob.getIcon()),
+                'state' : wftool.getInfoFor(ob, 'review_state')}
 
 return context.folder_jsupload_snippet_template(listItemInfos=[infos])
\ No newline at end of file