{% set views=None %} {% if views %}
{% for subview in views %} {% if active_subview_name and subview.name == active_subview_name %} {% with item=item, items=items, view=subview %} {% include "view.html" %} {% endwith %} {% endif %} {% endfor %}
{% else %} {% if view['type'] == 'ListView' %}
{% if view.columns %} {% for column in view.columns%} {% endfor %} {% endif %} {% set list_items = [] %} {% if view['attributes'] and view['attributes']['internal'] == 'true' %} {% if view['attributes']['source'] == 'attributes' %} {% set list_items = item.attributes.items() %} {% else %} {% set list_items = item.attributes[view['attributes']['source']] %} {% endif %} {% else %} {% set list_items = items %} {% endif %} {% for item in list_items %} {% if view.columns %} {% for column in view.columns%} {% endfor %} {% endif %} {% endfor %}
# Icon Name {{column}}
{{loop.index}} {% if item.attributes %} {{item.attributes['icon']}} {% endif %} {% if item.attributes and item.attributes['resource'] %} {{item.name}} {% else %} {{item.name}} {% endif %} {{column}}
{% elif view['type'] == 'AttributesView' %}
{% for key,value in item.attributes.items() %} {% endfor %}
# Name Value
{{loop.index}} {{key}} {{value}}
{% elif view['type'] == 'FormView' %}
{% set form=all_forms[view.attributes['form']] %} {% if form.attributes['upload'] == 'true' %}
{% else %}
{% endif %}
{% elif view['type'] == 'CodeView' %}
# Code goes here....
{% else %} type:{{view['type']}} showing {{item.name}} with {{items | length}} items {% endif %} {% endif %}