{% if modules %}
{% for module in modules %}
{{ chart(module=module) }}
{% endfor %}
{% endif %}
{% endmacro -%}
{# Macro to create a new chart template or existing chart from a config #}
{%- macro chart(module=None) %}
{% if module %}
{% set dims = module|get_dims %}
{% set fixedcol = view.layout == 'grid' %}
{% if fixedcol %}
{% set colcount = dims.width|string|replace('col-', '') %}
{% endif %}
{% endif %}
{{ module.name }}
{% if module.inputs %}
{% endif %}
{% if can_edit and not demo_mode %}
{% endif %}
{% if not demo_mode %}
Back
{% endif %}
{{ view.name }}
{% if can_edit and not demo_mode %}
{% include "partials/dashboard-options.html" %}
{% endif %}
{% if can_edit %}
{% if not view.modules|length %}
It looks like this dashboard has no modules - add some!
{% endif %}
{% include "partials/dashboard-global-form.html" %}
{% include "partials/dashboard-json-form.html" %}
{% endif %}