Commit cccab458 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_hal_json_style: add links to access a document portal_workflow

parent 0041b42a
......@@ -1553,7 +1553,14 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
Base_translateString(traversed_document.getPortalType())
),
})
context.log(erp5_action_list)
if portal.portal_workflow.Base_getSourceVisibility():
for workflow in portal.portal_workflow.getWorkflowsFor(traversed_document):
erp5_action_list.append({
'href': "%s/manage_properties?ignore_layout:int=1" % workflow.absolute_url_path(),
'name': "jump_to_%s" % workflow.id,
'icon': None,
'title': workflow.title,
})
if erp5_action_list:
if len(erp5_action_list) == 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment