Allow customization of row 'view' action url
This commit is contained in:
parent
ac133ce830
commit
a881b310bc
|
@ -490,9 +490,8 @@ class MasterView(View):
|
|||
|
||||
# view action
|
||||
if self.rows_viewable:
|
||||
view = lambda r, i: self.get_row_action_url('view', r)
|
||||
icon = 'eye' if use_buefy else 'zoomin'
|
||||
actions.append(self.make_action('view', icon=icon, url=view))
|
||||
actions.append(self.make_action('view', icon=icon, url=self.row_view_action_url))
|
||||
|
||||
# edit action
|
||||
if self.rows_editable and self.has_perm('edit_row'):
|
||||
|
@ -1344,6 +1343,9 @@ class MasterView(View):
|
|||
"""
|
||||
return True
|
||||
|
||||
def row_view_action_url(self, row, i):
|
||||
return self.get_row_action_url('view', row)
|
||||
|
||||
def row_edit_action_url(self, row, i):
|
||||
if self.row_editable(row):
|
||||
return self.get_row_action_url('edit', row)
|
||||
|
|
Loading…
Reference in a new issue