add a (hidden) ./svg URL on workflows (fix #1663)

This commit is contained in:
Thomas NOËL 2012-09-15 18:03:11 +02:00
parent f705d652f5
commit ab7f7619e2
1 changed files with 6 additions and 1 deletions

View File

@ -527,7 +527,7 @@ class WorkflowStatusDirectory(Directory):
class WorkflowPage(Directory):
_q_exports = ['', 'edit', 'delete', 'newstatus', ('status', 'status_dir'), 'update_order',
'duplicate', 'export']
'duplicate', 'export', 'svg']
def __init__(self, component):
try:
@ -588,6 +588,11 @@ class WorkflowPage(Directory):
if not str(self.workflow.id).startswith(str('_')):
self.get_new_status_form()
def svg(self):
response = get_response()
response.set_content_type('image/svg+xml')
return graphviz(self.workflow, include=False)
def export(self):
x = self.workflow.export_to_xml()
indent(x)