Make it easier to override rendering grid component in master/index

was needed so i could pass extra event handlers to it
This commit is contained in:
Lance Edgar 2021-08-28 14:24:56 -05:00
parent 445862d48d
commit 897bb177bc

View file

@ -466,17 +466,22 @@
</b-notification> </b-notification>
% endif % endif
${self.render_grid_component()}
% if master.deletable and request.has_perm('{}.delete'.format(permission_prefix)) and master.delete_confirm == 'simple':
${h.form('#', ref='deleteObjectForm')}
${h.csrf_token(request)}
${h.end_form()}
% endif
</%def>
<%def name="render_grid_component()">
<${grid.component} :csrftoken="csrftoken" <${grid.component} :csrftoken="csrftoken"
% if master.deletable and request.has_perm('{}.delete'.format(permission_prefix)) and master.delete_confirm == 'simple': % if master.deletable and request.has_perm('{}.delete'.format(permission_prefix)) and master.delete_confirm == 'simple':
@deleteActionClicked="deleteObject" @deleteActionClicked="deleteObject"
% endif % endif
> >
</${grid.component}> </${grid.component}>
% if master.deletable and request.has_perm('{}.delete'.format(permission_prefix)) and master.delete_confirm == 'simple':
${h.form('#', ref='deleteObjectForm')}
${h.csrf_token(request)}
${h.end_form()}
% endif
</%def> </%def>
<%def name="make_this_page_component()"> <%def name="make_this_page_component()">