{% load bootstrap3 %} {% load crud_tags %} {% comment %} Render object list as a table, plus optional description text and links bar Parameters: object_list Collection of objects to list (for example a queryset or list) attributes.headings List of headings attributes.class Class attribute for wrapping div attributes.table_class Table class. Default is "table table-striped table-condensed text-center" attributes.text Display a paragraph of text (usually instructions and help) attributes.links Display link buttons above list. Sequence of sequences with (name,url,[arg0,arg1,...]) {% endcomment %}
{% if attributes.text %} {% include "simplecrud/widget/text.html" with object_list=attributes.text %} {% endif %} {% if attributes.links %} {% include "simplecrud/widget/links.html" with object_list=attributes.links %} {% endif %} {% if object_list %} {% if attributes.headings %} {% for name in attributes.headings %} {% endfor %} {% endif %} {% for object in object_list %} {% for item in object %} {% endfor %} {% endfor %}
{{ name }}
{% if item.widget %} {% include item.widget with object_list=item.object_list attributes=item.attributes %} {% else %} {{ item }} {% endif %}
{% endif %}