Let view template define how to render "row grid tools"

seems much cleaner that way.  must adopt Buefy to use this style though
This commit is contained in:
Lance Edgar 2019-05-20 20:00:28 -05:00
parent 3c8d16a368
commit 40e957fff2

View file

@ -67,6 +67,10 @@
<%def name="object_helpers()"></%def> <%def name="object_helpers()"></%def>
<%def name="render_row_grid_tools()">
${rows_grid_tools}
</%def>
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
@ -90,7 +94,7 @@
% if use_buefy: % if use_buefy:
<br /><br /> <br /><br />
## TODO: stop using |n filter ## TODO: stop using |n filter
${rows_grid.render_buefy(allow_save_defaults=False, tools=rows_grid_tools)|n} ${rows_grid.render_buefy(allow_save_defaults=False, tools=capture(self.render_row_grid_tools))|n}
% else: % else:
## no buefy, so do the traditional thing ## no buefy, so do the traditional thing
${rows_grid|n} ${rows_grid|n}