Refactor batch views / templates per rattail framework overhaul

This commit is contained in:
Lance Edgar 2016-11-19 18:09:14 -06:00
parent a5184e416a
commit 203f0242fb
12 changed files with 225 additions and 182 deletions

View file

@ -50,11 +50,12 @@
</ul>
<div class="form-wrapper">
% if master.edit_with_rows:
${form.render(buttons=capture(buttons))|n}
% else:
## TODO: clean this up or fix etc..?
## % if master.edit_with_rows:
## ${form.render(buttons=capture(buttons))|n}
## % else:
${form.render()|n}
% endif
## % endif
</div>
% if master.edit_with_rows:

View file

@ -43,19 +43,11 @@
</div>
</%def>
<%def name="leading_buttons()">
</%def>
<%def name="leading_buttons()"></%def>
<%def name="refresh_button()">
## TODO: the refreshable thing still seems confusing...
% if master.refreshable:
% if form.readonly:
% if not batch.executed:
<button type="button" id="refresh-data">Refresh Data</button>
% endif
% elif batch.refreshable:
${h.submit('save-refresh', "Save & Refresh Data")}
% endif
% if master.viewing and master.batch_refreshable(batch):
<button type="button" id="refresh-data">Refresh data</button>
% endif
</%def>
@ -75,12 +67,14 @@
${rows_grid|n}
<div id="execution-options-dialog" style="display: none;">
% if not batch.executed:
<div id="execution-options-dialog" style="display: none;">
${h.form(url('{}.execute'.format(route_prefix), uuid=batch.uuid), name='batch-execution')}
% if master.has_execution_options:
${rendered_execution_options|n}
% endif
${h.end_form()}
${h.form(url('{}.execute'.format(route_prefix), uuid=batch.uuid), name='batch-execution')}
% if master.has_execution_options:
${rendered_execution_options|n}
% endif
${h.end_form()}
</div>
</div>
% endif