Tweak batch view template "object helpers" for easier customization

This commit is contained in:
Lance Edgar 2019-01-09 12:35:26 -06:00
parent 5bdacc70e5
commit 98fc4608da

View file

@ -75,6 +75,34 @@
% endif
</%def>
<%def name="object_helpers()">
${self.render_status_breakdown()}
</%def>
<%def name="render_status_breakdown()">
% if status_breakdown is not Undefined and status_breakdown is not None:
<div class="object-helper">
<h3>Row Status Breakdown</h3>
<div class="object-helper-content">
% if status_breakdown:
<div class="grid full">
<table>
% for i, (status, count) in enumerate(status_breakdown):
<tr class="${'even' if i % 2 == 0 else 'odd'}">
<td>${status}</td>
<td>${count}</td>
</tr>
% endfor
</table>
</div>
% else:
<p>Nothing to report yet.</p>
% endif
</div>
</div>
% endif
</%def>
<div style="display: flex; justify-content: space-between;">
<div class="form-wrapper">
@ -83,27 +111,9 @@
<div style="display: flex; align-items: flex-start;">
% if status_breakdown is not Undefined and status_breakdown is not None:
<div class="object-helper">
<h3>Row Status Breakdown</h3>
<div class="object-helper-content">
% if status_breakdown:
<div class="grid full">
<table>
% for i, (status, count) in enumerate(status_breakdown):
<tr class="${'even' if i % 2 == 0 else 'odd'}">
<td>${status}</td>
<td>${count}</td>
</tr>
% endfor
</table>
</div>
% else:
<p>Nothing to report yet.</p>
% endif
</div>
</div>
% endif
<div class="object-helpers">
${self.object_helpers()}
</div>
<ul id="context-menu">
${self.context_menu_items()}