[hg] galaxy 3690: Added missing templates
details: http://www.bx.psu.edu/hg/galaxy/rev/7ae394334e5c changeset: 3690:7ae394334e5c user: Nate Coraor <nate@bx.psu.edu> date: Fri Apr 23 16:32:40 2010 -0400 description: Added missing templates diffstat: templates/webapps/community/admin/category/category_create.mako | 35 ++ templates/webapps/community/admin/category/category_rename.mako | 44 +++ templates/webapps/community/admin/category/grid.mako | 1 + templates/webapps/community/admin/category/role.mako | 118 ++++++++++ 4 files changed, 198 insertions(+), 0 deletions(-) diffs (214 lines): diff -r a66d849924d2 -r 7ae394334e5c templates/webapps/community/admin/category/category_create.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/webapps/community/admin/category/category_create.mako Fri Apr 23 16:32:40 2010 -0400 @@ -0,0 +1,35 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +<%def name="javascripts()"> + ${parent.javascripts()} + <script type="text/javascript"> + $(function(){ + $("input:text:first").focus(); + }) + </script> +</%def> + +%if message: + ${render_msg( message, status )} +%endif + +<div class="toolForm"> + <div class="toolFormTitle">Create Role</div> + <div class="toolFormBody"> + <form name="create_category_form" id="create_category_form" action="${h.url_for( action='create_category' )}" method="post" > + <div class="form-row"> + <input name="webapp" type="hidden" value="${webapp}" size=40"/> + <label>Name:</label> + <input name="name" type="textfield" value="" size=40"/> + </div> + <div class="form-row"> + <label>Description:</label> + <input name="description" type="textfield" value="" size=40"/> + </div> + <div class="form-row"> + <input type="submit" name="create_category_button" value="Save"/> + </div> + </form> + </div> +</div> diff -r a66d849924d2 -r 7ae394334e5c templates/webapps/community/admin/category/category_rename.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/webapps/community/admin/category/category_rename.mako Fri Apr 23 16:32:40 2010 -0400 @@ -0,0 +1,44 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +%if message: + ${render_msg( message, status )} +%endif + +<div class="toolForm"> + <div class="toolFormTitle">Change category name and description</div> + <div class="toolFormBody"> + <form name="library" action="${h.url_for( controller='admin', action='rename_category' )}" method="post" > + <div class="form-row"> + <input name="webapp" type="hidden" value="${webapp}" size=40"/> + <label>Name:</label> + <div style="float: left; width: 250px; margin-right: 10px;"> + <input type="text" name="name" value="${category.name}" size="40"/> + </div> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <label>Description:</label> + <div style="float: left; width: 250px; margin-right: 10px;"> + <input name="description" type="textfield" value="${category.description}" size=40"/> + </div> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <div style="float: left; width: 250px; margin-right: 10px;"> + <input type="hidden" name="rename" value="submitted"/> + </div> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <div style="float: left; width: 250px; margin-right: 10px;"> + <input type="hidden" name="id" value="${trans.security.encode_id( category.id )}"/> + </div> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <input type="submit" name="rename_category_button" value="Save"/> + </div> + </form> + </div> +</div> diff -r a66d849924d2 -r 7ae394334e5c templates/webapps/community/admin/category/grid.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/webapps/community/admin/category/grid.mako Fri Apr 23 16:32:40 2010 -0400 @@ -0,0 +1,1 @@ +<%inherit file="/grid_base.mako"/> diff -r a66d849924d2 -r 7ae394334e5c templates/webapps/community/admin/category/role.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/webapps/community/admin/category/role.mako Fri Apr 23 16:32:40 2010 -0400 @@ -0,0 +1,118 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +<%def name="javascripts()"> + ${parent.javascripts()} + <script type="text/javascript"> + $(function(){ + $("input:text:first").focus(); + }) + </script> +</%def> + +<%def name="render_select( name, options )"> + <select name="${name}" id="${name}" style="min-width: 250px; height: 150px;" multiple> + %for option in options: + <option value="${option[0]}">${option[1]}</option> + %endfor + </select> +</%def> + +<script type="text/javascript"> +$().ready(function() { + $('#users_add_button').click(function() { + return !$('#out_users option:selected').remove().appendTo('#in_users'); + }); + $('#users_remove_button').click(function() { + return !$('#in_users option:selected').remove().appendTo('#out_users'); + }); + $('#groups_add_button').click(function() { + return !$('#out_groups option:selected').remove().appendTo('#in_groups'); + }); + $('#groups_remove_button').click(function() { + return !$('#in_groups option:selected').remove().appendTo('#out_groups'); + }); + $('form#associate_role_user_group').submit(function() { + $('#in_users option').each(function(i) { + $(this).attr("selected", "selected"); + }); + $('#in_groups option').each(function(i) { + $(this).attr("selected", "selected"); + }); + }); +}); +</script> + +%if message: + ${render_msg( message, status )} +%endif + +<div class="toolForm"> + <div class="toolFormTitle">Role '${role.name}'</div> + <div class="toolFormBody"> + <form name="associate_role_user_group" id="associate_role_user_group" action="${h.url_for( action='manage_users_and_groups_for_role', id=trans.security.encode_id( role.id ) )}" method="post" > + <input name="webapp" type="hidden" value="${webapp}" size=40"/> + <div class="form-row"> + <div style="float: left; margin-right: 10px;"> + <label>Users associated with '${role.name}'</label> + ${render_select( "in_users", in_users )}<br/> + <input type="submit" id="users_remove_button" value=">>"/> + </div> + <div> + <label>Users not associated with '${role.name}'</label> + ${render_select( "out_users", out_users )}<br/> + <input type="submit" id="users_add_button" value="<<"/> + </div> + </div> + <div class="form-row"> + <div style="float: left; margin-right: 10px;"> + <label>Groups associated with '${role.name}'</label> + ${render_select( "in_groups", in_groups )}<br/> + <input type="submit" id="groups_remove_button" value=">>"/> + </div> + <div> + <label>Groups not associated with '${role.name}'</label> + ${render_select( "out_groups", out_groups )}<br/> + <input type="submit" id="groups_add_button" value="<<"/> + </div> + </div> + <div class="form-row"> + <input type="submit" name="role_members_edit_button" value="Save"/> + </div> + </form> + </div> +</div> +<br clear="left"/> +<br/> +%if len( library_dataset_actions ) > 0: + <h3>Data library datasets associated with role '${role.name}'</h3> + <table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr> + <td> + <ul> + %for ctr, library, in enumerate( library_dataset_actions.keys() ): + <li> + <img src="${h.url_for( '/static/images/silk/book_open.png' )}" class="rowIcon"/> + ${library.name} + <ul> + %for folder_path, permissions in library_dataset_actions[ library ].items(): + <li> + <img src="/static/images/silk/folder_page.png" class="rowIcon"/> + ${folder_path} + <ul> + % for permission in permissions: + <ul> + <li>${permission}</li> + </ul> + %endfor + </ul> + </li> + %endfor + </ul> + </li> + %endfor + </ul> + </td> + </tr> + </table> +%endif
participants (1)
-
Nate Coraor