{% macro sort_th(key, label, sort_headers) %} {% if sort_headers and key in sort_headers %} {% set h = sort_headers[key] %} {{ label }}{% if h.active %}{% endif %} {% else %} {{ label }} {% endif %} {% endmacro %}