{% endif %}
{% for module in modules %} {# begin modules #}
{% if module.enabled and module.context == 'JobContext' %} {# if module should render #}
{% for card in module.get_cards(job_details.job) %} {# begin cards #}
{# jinja variables go out of scope after the loop unless this "list" hack is used #}
{% if card_count.append(1) %}{% endif %}
{{ card.content | safe }}
{% endfor %} {# end cards #}
{% endif %} {# end if module should render #}
{% endfor %} {# end modules #}
{% if card_count | length == 0 and enabled_modules | length > 1 %} {# begin no cards message #}
No cards to show.
{% endif %} {# end no cards message #}
{% if enabled_modules | length > 1 %}