Add simple row status breakdown when viewing batch
This commit is contained in:
parent
3b0292029d
commit
0b9fe2dfe7
2 changed files with 55 additions and 0 deletions
|
@ -40,6 +40,18 @@
|
|||
display: inline;
|
||||
}
|
||||
|
||||
.batch-helper {
|
||||
border: 1px solid black;
|
||||
float: right;
|
||||
margin-top: 1em;
|
||||
padding: 1em;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.batch-helper-content {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
|
@ -79,6 +91,28 @@
|
|||
${self.context_menu_items()}
|
||||
</ul>
|
||||
|
||||
% if status_breakdown is not Undefined:
|
||||
<div class="batch-helper">
|
||||
<h3>Row Status Breakdown</h3>
|
||||
<div class="batch-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="form-wrapper">
|
||||
${form.render(form_id='batch-form', buttons=capture(buttons))|n}
|
||||
</div><!-- form-wrapper -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue