[hg] galaxy 3706: Eliminate pop-up menu items from grid columns ...
details: http://www.bx.psu.edu/hg/galaxy/rev/50a0d5223206 changeset: 3706:50a0d5223206 user: Greg Von Kuster <greg@bx.psu.edu> date: Tue Apr 27 15:00:38 2010 -0400 description: Eliminate pop-up menu items from grid columns that cannot be secured. diffstat: lib/galaxy/webapps/community/controllers/tool.py | 14 +------------- templates/webapps/community/tool/edit_tool.mako | 2 ++ templates/webapps/community/tool/manage_categories.mako | 10 +++++++++- templates/webapps/community/tool/view_tool.mako | 4 +++- 4 files changed, 15 insertions(+), 15 deletions(-) diffs (70 lines): diff -r 26f6936f59bf -r 50a0d5223206 lib/galaxy/webapps/community/controllers/tool.py --- a/lib/galaxy/webapps/community/controllers/tool.py Tue Apr 27 14:35:35 2010 -0400 +++ b/lib/galaxy/webapps/community/controllers/tool.py Tue Apr 27 15:00:38 2010 -0400 @@ -89,19 +89,7 @@ grids.GridOperation( "Download tool", condition=( lambda item: not item.deleted ), allow_multiple=False, - url_args=dict( controller="tool", action="download_tool", cntrller="tool", webapp="community" ) ), - grids.GridOperation( "Upload a new version", - condition=( lambda item: not item.deleted ), - allow_multiple=False, - url_args=dict( controller="common", action="upload_new_tool_version", cntrller="tool", webapp="community" ) ), - grids.GridOperation( "Edit information", - condition=( lambda item: not item.deleted ), - allow_multiple=False, - url_args=dict( controller="common", action="edit_tool", cntrller="tool", webapp="community" ) ), - grids.GridOperation( "Manage categories", - condition=( lambda item: not item.deleted ), - allow_multiple=False, - url_args=dict( controller="common", action="manage_categories", cntrller="tool", webapp="community" ) ) + url_args=dict( controller="tool", action="download_tool", cntrller="tool", webapp="community" ) ) ] standard_filters = [ grids.GridColumnFilter( "Deleted", args=dict( deleted=True ) ), diff -r 26f6936f59bf -r 50a0d5223206 templates/webapps/community/tool/edit_tool.mako --- a/templates/webapps/community/tool/edit_tool.mako Tue Apr 27 14:35:35 2010 -0400 +++ b/templates/webapps/community/tool/edit_tool.mako Tue Apr 27 15:00:38 2010 -0400 @@ -24,6 +24,8 @@ <div class="toolFormTitle">${tool.name} <a id="tool-${tool.id}-popup" class="popup-arrow" style="display: none;">▼</a> <div popupmenu="tool-${tool.id}-popup"> + <a class="action-button" href="${h.url_for( controller='common', action='manage_categories', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Manage categories</a> + <a class="action-button" href="${h.url_for( controller='common', action='upload_new_tool_version', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Upload a new version</a> <a class="action-button" href="${h.url_for( controller='tool', action='download_tool', id=trans.app.security.encode_id( tool.id ) )}">Download tool</a> </div> </div> diff -r 26f6936f59bf -r 50a0d5223206 templates/webapps/community/tool/manage_categories.mako --- a/templates/webapps/community/tool/manage_categories.mako Tue Apr 27 14:35:35 2010 -0400 +++ b/templates/webapps/community/tool/manage_categories.mako Tue Apr 27 15:00:38 2010 -0400 @@ -39,7 +39,15 @@ %endif <div class="toolForm"> - <div class="toolFormTitle">Tool '${tool.name}'</div> + <div class="toolFormTitle">Tool ${tool.name} + <a id="tool-${tool.id}-popup" class="popup-arrow" style="display: none;">▼</a> + <div popupmenu="tool-${tool.id}-popup"> + <a class="action-button" href="${h.url_for( controller='common', action='view_tool', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">View information</a> + <a class="action-button" href="${h.url_for( controller='common', action='edit_tool', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Edit information</a> + <a class="action-button" href="${h.url_for( controller='common', action='upload_new_tool_version', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Upload a new version</a> + <a class="action-button" href="${h.url_for( controller='tool', action='download_tool', id=trans.app.security.encode_id( tool.id ) )}">Download tool</a> + </div> + </div> <div class="toolFormBody"> <form name="associate_tool_category" id="associate_tool_category" action="${h.url_for( controller='common', action='manage_categories', id=trans.security.encode_id( tool.id ) )}" method="post" > <input name="cntrller" type="hidden" value="${cntrller}" size=40"/> diff -r 26f6936f59bf -r 50a0d5223206 templates/webapps/community/tool/view_tool.mako --- a/templates/webapps/community/tool/view_tool.mako Tue Apr 27 14:35:35 2010 -0400 +++ b/templates/webapps/community/tool/view_tool.mako Tue Apr 27 15:00:38 2010 -0400 @@ -29,7 +29,9 @@ <a id="tool-${tool.id}-popup" class="popup-arrow" style="display: none;">▼</a> <div popupmenu="tool-${tool.id}-popup"> %if cntrller=='admin' or can_edit: - <a class="action-button" href="${h.url_for( controller='common', action='edit_tool', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Edit tool</a> + <a class="action-button" href="${h.url_for( controller='common', action='edit_tool', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Edit information</a> + <a class="action-button" href="${h.url_for( controller='common', action='manage_categories', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Manage categories</a> + <a class="action-button" href="${h.url_for( controller='common', action='upload_new_tool_version', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">Upload a new version</a> %endif <a class="action-button" href="${h.url_for( controller='tool', action='download_tool', id=trans.app.security.encode_id( tool.id ) )}">Download tool</a> </div>
participants (1)
-
Nate Coraor