{% 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) value_widget Widget to use for displaying values attributes.class Class attribute for wrapping div attributes.table_class Table class. Default is "table" attributes.show_all If False (default) do not display empty fields attributes.bool_as_icon If True (default) boolean values are displayed as tick and cross icons 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,...]) attributes.item_links Display link buttons with each item. Sequence of sequences with (name,url,[arg0,arg1,...]). First argument to the url is the item primary key and is automatically provided {% 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 %} {% for object in object_list %} {% for lnk in attributes.item_links %}
{{ lnk.label }}
{% endfor %} {% for name,value in object|field_titles_and_values:attributes %} {% endfor %}
{{ name|capfirst }} {% include value_widget %}
{% endfor %}