{% extends "layout.html" %} {% block title %}{{ g.title }}{% endblock %} {% block subtitle %}{{ g.subtitle }}{% endblock %} {% block panels %} {% set context = "ProjectContext" %} {% set num_enabled_modules = enabled_module_indices[context] | length %} {% set columns_per_card = (12 / CARDS_PER_ROW) | int %} {% set card_count = [] %} {% if num_enabled_modules > 1 %}
{% endif %} {% for module in modules_by_context[context] %} {# begin modules #} {% if loop.index0 in enabled_module_indices[context] %} {% for card in module.get_cards(g.project) %} {# begin cards #} {# jinja variables go out of scope after the loop unless this "list" hack is used #} {% if card_count.append(1) %}{% endif %}
{{ card.name }}
{{ card.content | safe }}
{% endfor %} {# end cards #} {% endif %} {# end if module should render #} {% endfor %} {# end modules #} {% if card_count | length == 0 and num_enabled_modules >= 1 %}
No cards to show.
{% endif %} {% if num_enabled_modules > 1 %}
{% endif %} {% endblock %} {% block view_options %}{% endblock %}