Fix for multi-set email alerts for repository changes in the tool shed.

This commit is contained in:
Greg Von Kuster
2014-01-27 15:01:49 -05:00
parent 51bcee1a9a
commit 7e4bfb87ce
3 changed files with 8 additions and 5 deletions
@@ -2466,6 +2466,10 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
kwd[ 'message' ] = 'You must be logged in to set email alerts.'
kwd[ 'status' ] = 'error'
del kwd[ 'operation' ]
elif operation == "view_or_manage_repository":
return trans.response.send_redirect( web.url_for( controller='repository',
action='view_or_manage_repository',
**kwd ) )
self.email_alerts_repository_grid.title = "Set email alerts for repository changes"
return self.email_alerts_repository_grid( trans, **kwd )
@@ -2766,9 +2770,8 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
@web.expose
@web.require_login( "set email alerts" )
def set_email_alerts( self, trans, **kwd ):
# Set email alerts for selected repositories
# This method is called from multiple grids, so
# the caller must be passed.
"""Set email alerts for selected repositories."""
# This method is called from multiple grids, so the caller must be passed.
caller = kwd[ 'caller' ]
user = trans.user
if user:
+1 -1
View File
@@ -304,7 +304,7 @@ class EmailAlertsRepositoryGrid( RepositoryGrid ):
visible=False,
filterable="advanced" )
]
operations = []
operations = [ grids.GridOperation( "Receive email alerts", allow_multiple=True ) ]
global_actions = [
grids.GridAction( "User preferences", dict( controller='user', action='index', cntrller='repository' ) )
]
@@ -4,7 +4,7 @@
<br/><br/>
<ul class="manage-table-actions">
<li>
<a class="action-button" href="${h.url_for( controller='repository', action='multi_select_email_alerts', cntrller='repository' )}">Manage repository alerts</a>
<a class="action-button" href="${h.url_for( controller='repository', action='multi_select_email_alerts' )}">Manage repository alerts</a>
</li>
<li>
<a class="action-button" href="${h.url_for( controller='user', action='index', cntrller='repository' )}">User preferences</a>