Fix bugs in batch grid URLs
This commit is contained in:
parent
785d0b5806
commit
77ce81dec0
|
@ -528,15 +528,15 @@ class BatchMasterView(MasterView):
|
||||||
|
|
||||||
# view action
|
# view action
|
||||||
if self.rows_viewable:
|
if self.rows_viewable:
|
||||||
view = lambda r: self.request.route_url('{}.view'.format(route_prefix),
|
view = lambda r, i: self.request.route_url('{}.view'.format(route_prefix),
|
||||||
uuid=r.uuid)
|
uuid=r.uuid)
|
||||||
actions.append(grids.GridAction('view', icon='zoomin', url=view))
|
actions.append(grids.GridAction('view', icon='zoomin', url=view))
|
||||||
|
|
||||||
# delete action
|
# delete action
|
||||||
batch = self.get_instance()
|
batch = self.get_instance()
|
||||||
if self.editing and self.rows_deletable and not batch.executed:
|
if self.editing and self.rows_deletable and not batch.executed:
|
||||||
delete = lambda r: self.request.route_url('{}.delete'.format(route_prefix),
|
delete = lambda r, i: self.request.route_url('{}.delete'.format(route_prefix),
|
||||||
uuid=r.uuid)
|
uuid=r.uuid)
|
||||||
actions.append(grids.GridAction('delete', icon='trash', url=delete))
|
actions.append(grids.GridAction('delete', icon='trash', url=delete))
|
||||||
|
|
||||||
defaults['main_actions'] = actions
|
defaults['main_actions'] = actions
|
||||||
|
|
Loading…
Reference in a new issue