{# Display tabular data in a table view. title = title to appear at the top of the table view. Enter as None for no title. form = dictionary with form attributes. column_names = tuple of strings for column names. rows = list of tuples where each tuple contains the input objects that will be used to populate the columns of each row. table_class = string of space delimited classes for the table (optional). See Twitter Bootstrap documentation on tables for possibilities. Note: Make sure the number of values in each row tuple is the same as the number of values in the column_names tuple. Also make sure the values in the row tuples are aligned with the appropriate column_names (same order as column_names). Example: In the controller, pass the following variables to the template using c: c.table_view_edit = {'column_names': ('Name', 'Age', 'Job'), 'rows': [('Bill', 30, 'contractor'), ('Fred', 18, 'programmer'), ('Bob', 26, 'boss')], 'hover': True, 'striped': True, 'bordered': False, 'condensed': False, 'editable_columns': (False, 'ageInput', 'jobInput'), 'row_ids': [21, 25, 31]} {% snippet "snippets/table_view_edit.html", title=c.title, form=c.form, column_names=c.column_names, rows=c.rows, table_class=None %} #} {% if title %}

{{ _(title) }}

{% endif %}
{% for column_name in column_names %} {% endfor %} {% for row in rows %} {% for column in row.columns %} {% endfor %} {% endfor %}
{{ column_name }}Delete
{% if column['type'] != 'static' %} {% else %} {{ column['value'] }} {% endif %}