Clean up (unify) workflow sharing UI a bit

This commit is contained in:
James Taylor
2009-04-22 12:36:17 -04:00
parent 90463df531
commit d1918fa4c9
3 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class WorkflowController( BaseController ):
session.save_or_update( share )
session.flush()
trans.set_message( "Workflow '%s' shared with user '%s'" % ( stored.name, other.email ) )
return self.list( trans )
return trans.response.send_redirect( url_for( controller='workflow', action='sharing', id=id ) )
return trans.fill_template( "workflow/share.mako",
message = msg,
messagetype = mtype,
+1 -2
View File
@@ -47,8 +47,7 @@
<a class="action-button" href="${h.url_for( action='editor', id=trans.security.encode_id(workflow.id) )}" target="_parent">Edit</a>
<a class="action-button" href="${h.url_for( controller='root', action='index', workflow_id=trans.security.encode_id(workflow.id) )}" target="_parent">Run</a>
<a class="action-button" href="${h.url_for( action='rename', id=trans.security.encode_id(workflow.id) )}">Rename</a>
<a class="action-button" href="${h.url_for( action='share', id=trans.security.encode_id(workflow.id) )}">Share</a>
<a class="action-button" href="${h.url_for( action='sharing', id=trans.security.encode_id(workflow.id) )}">Manage sharing</a>
<a class="action-button" href="${h.url_for( action='sharing', id=trans.security.encode_id(workflow.id) )}">Sharing</a>
<a class="action-button" confirm="Are you sure you want to delete workflow '${workflow.name}'?" href="${h.url_for( action='delete', id=trans.security.encode_id(workflow.id) )}">Delete</a>
</div>
</td>
+16 -3
View File
@@ -39,7 +39,15 @@
The following users will see this workflow in thier workflow list, and be
able to run it or create their own copy of it:
</p>
<ul class="manage-table-actions">
<li>
<a class="action-button" href="${h.url_for( action='share', id=trans.security.encode_id(stored.id) )}">
<span>Share with another user</span>
</a>
</li>
</ul>
<table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr class="header">
<th>Email</th>
@@ -60,8 +68,13 @@
</tr>
%endfor
</table>
%else:
You have not shared this workflow with any users.
<p>You have not shared this workflow with any users.</p>
<a class="action-button" href="${h.url_for( action='share', id=trans.security.encode_id(stored.id) )}">
<span>Share with another user</span>
</a>
%endif