Add support for general "view click handler" for <b-table>
element
plus some other tweaks for sake of revision history in profile view
This commit is contained in:
parent
069ccab0ae
commit
c09437880f
2 changed files with 43 additions and 2 deletions
|
@ -964,6 +964,24 @@ class Grid(object):
|
|||
context['data_prop'] = data_prop
|
||||
if 'grid_columns' not in context:
|
||||
context['grid_columns'] = self.get_buefy_columns()
|
||||
|
||||
# locate the 'view' action
|
||||
# TODO: this should be easier, and/or moved elsewhere?
|
||||
view = None
|
||||
for action in self.main_actions:
|
||||
if action.key == 'view':
|
||||
view = action
|
||||
break
|
||||
if not view:
|
||||
for action in self.more_actions:
|
||||
if action.key == 'view':
|
||||
view = action
|
||||
break
|
||||
|
||||
context['view_click_handler'] = None
|
||||
if view and view.click_handler:
|
||||
context['view_click_handler'] = view.click_handler
|
||||
|
||||
return render(template, context)
|
||||
|
||||
def get_filters_sequence(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue