From bfc782560d7aeab6f63300da79edc629f238542f Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 3 Oct 2017 16:59:16 +0200 Subject: [PATCH] added colored status macro --- ordr2/templates/macros.jinja2 | 16 ++++++++++++++++ ordr2/templates/orders/order_list.jinja2 | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ordr2/templates/macros.jinja2 b/ordr2/templates/macros.jinja2 index 1ddf72e..35fda5d 100644 --- a/ordr2/templates/macros.jinja2 +++ b/ordr2/templates/macros.jinja2 @@ -62,6 +62,21 @@ {%- endmacro %} +{% macro colored_status(status) -%} + {% if status.name == 'APPROVAL' %} + + {% elif status.name == 'ORDERED' %} + + {% elif status.name == 'COMPLETED' %} + + {% else %} + + {% endif %} + {{ status.value|lower }} + +{%- endmacro %} + + {% macro pagination_helper(page, text=None, css_class='') -%} {% set is_active = 'active' if page == context.pages.current %} {% set is_disabled = 'disabled' if not page %} @@ -71,6 +86,7 @@ {%- endmacro %}} + {% macro pagination() -%} {% if context.pages and context.pages.last > 1 %}