From 98fc4608da78f7f4ab07046c2b9eda59b0ff0a8f Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 9 Jan 2019 12:35:26 -0600 Subject: [PATCH] Tweak batch view template "object helpers" for easier customization --- tailbone/templates/batch/view.mako | 52 ++++++++++++++++++------------ 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/tailbone/templates/batch/view.mako b/tailbone/templates/batch/view.mako index ceaf9676..8316c4b9 100644 --- a/tailbone/templates/batch/view.mako +++ b/tailbone/templates/batch/view.mako @@ -75,6 +75,34 @@ % endif +<%def name="object_helpers()"> + ${self.render_status_breakdown()} + + +<%def name="render_status_breakdown()"> + % if status_breakdown is not Undefined and status_breakdown is not None: +
+

Row Status Breakdown

+
+ % if status_breakdown: +
+ + % for i, (status, count) in enumerate(status_breakdown): + + + + + % endfor +
${status}${count}
+
+ % else: +

Nothing to report yet.

+ % endif +
+
+ % endif + +
@@ -83,27 +111,9 @@
- % if status_breakdown is not Undefined and status_breakdown is not None: -
-

Row Status Breakdown

-
- % if status_breakdown: -
- - % for i, (status, count) in enumerate(status_breakdown): - - - - - % endfor -
${status}${count}
-
- % else: -

Nothing to report yet.

- % endif -
-
- % endif +
+ ${self.object_helpers()} +
    ${self.context_menu_items()}