Skip to content

Commit

Permalink
Use message mako to display purging success message
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Oct 16, 2017
1 parent 34b07b8 commit 3c5fc3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,11 +1143,6 @@ def purge_repository(self, trans, **kwd):
purge_status, purge_message = irm.purge_repository(repository)
if purge_status == 'ok':
new_kwd['status'] = 'done'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='manage_repository',
message=message,
status=status,
id=repository_id))
else:
new_kwd['status'] = 'error'
new_kwd['message'] = purge_message
Expand All @@ -1163,7 +1158,7 @@ def purge_repository(self, trans, **kwd):
else:
new_kwd['status'] = 'error'
new_kwd['message'] = 'Invalid repository id value "None" received for repository to be purged.'
return trans.show_error_message(new_kwd['message'])
return trans.fill_template('message.mako', **new_kwd)

@web.expose
@web.require_admin
Expand Down
2 changes: 1 addition & 1 deletion lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_accepted_filters(self):
url_args=dict(controller='admin_toolshed',
action='restore_repository')),
grids.GridOperation(label="Purge",
condition=(lambda item: item.is_new),
#condition=(lambda item: item.is_new),
allow_multiple=False,
target='center',
url_args=dict(controller='admin_toolshed',
Expand Down

0 comments on commit 3c5fc3f

Please sign in to comment.