From 57c6b175cd45dffc709bec64f6fb5065fe5807a8 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 24 Oct 2017 12:33:14 +0200 Subject: [PATCH] added template macros --- ordr2/templates/macros.jinja2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ordr2/templates/macros.jinja2 diff --git a/ordr2/templates/macros.jinja2 b/ordr2/templates/macros.jinja2 new file mode 100644 index 0000000..05ee087 --- /dev/null +++ b/ordr2/templates/macros.jinja2 @@ -0,0 +1,14 @@ +{% macro flash_messages() -%} + {% for queue in ('ok', 'warning', 'error') %} + {% for message in request.session.pop_flash(queue) %} + {% set css_class = 'danger' if queue == 'error' else queue %} +
+ {{message|safe}} +
+ {% endfor %} + {% endfor %} +{%- endmacro %} + +{% macro center_column_hack() -%} +
+{%- endmacro %}