diff --git a/tailbone/templates/batch/view.mako b/tailbone/templates/batch/view.mako index 9ff53f3b..94b9b5f5 100644 --- a/tailbone/templates/batch/view.mako +++ b/tailbone/templates/batch/view.mako @@ -3,6 +3,7 @@ <%def name="extra_javascript()"> ${parent.extra_javascript()} + % if not use_buefy: ${h.javascript_link(request.static_url('tailbone:static/js/tailbone.batch.js') + '?ver={}'.format(tailbone.__version__))} + % endif <%def name="extra_styles()"> @@ -58,21 +60,61 @@ <%def name="refresh_button()"> - % if master.viewing and master.batch_refreshable(batch) and request.has_perm('{}.refresh'.format(permission_prefix)): - + % if master.batch_refreshable(batch) and request.has_perm('{}.refresh'.format(permission_prefix)): + % if use_buefy: + ## TODO: this should surely use a POST request? + + Refresh Data + + % else: + + % endif % endif +<%def name="execute_submit_button()"> + + + <%def name="execute_button()"> % if not batch.executed and request.has_perm('{}.execute'.format(permission_prefix)): - % if execute_enabled: - - % elif why_not_execute: - + + % if use_buefy: + % if master.has_execution_options(batch): + ## TODO: this doesn't work yet + ${execute_submit_button()} + % else: + ${execute_form.render_deform(buttons=capture(execute_submit_button))|n} + % endif + % else: - + ## no buefy, do legacy thing + % endif % endif + <%def name="object_helpers()"> @@ -132,7 +174,7 @@ ${rows_grid|n} % endif -% if master.handler.executable(batch) and not batch.executed: +% if not use_buefy and master.handler.executable(batch) and not batch.executed: