2020-06-07 15:45:42 +02:00
|
|
|
<table class="full-width data-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
[%- for column in columns %]
|
|
|
|
{% if "[[ column.name ]]" not in skip_columns %}
|
|
|
|
<th>[[ column.name ]]</th>
|
|
|
|
{% endif %}
|
|
|
|
[%- endfor %]
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for instance in instances %}
|
|
|
|
<tr>
|
|
|
|
[%- for column in columns %]
|
|
|
|
{% if "[[ column.name ]]" not in skip_columns %}
|
2020-06-08 12:19:28 +02:00
|
|
|
<td>
|
|
|
|
[%- if column.type in ['relationship'] %]
|
|
|
|
[%- if column.multiple %]
|
|
|
|
{{ instance.[[ column.name|pluralize ]] }}
|
|
|
|
[%- else %]
|
|
|
|
{{ instance.[[ column.name ]] }}
|
|
|
|
[%- endif %]
|
|
|
|
[%- else %]
|
|
|
|
{{ instance.[[ column.name ]] }}
|
|
|
|
[%- endif %]
|
|
|
|
</td>
|
2020-06-07 15:45:42 +02:00
|
|
|
{% endif %}
|
|
|
|
[%- endfor %]
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('update_[[ name|camel_to_snake ]]', uuid=instance.id, _next=request.path) }}">e</a> |
|
|
|
|
<a href="{{ url_for('delete_[[ name|camel_to_snake ]]', uuid=instance.id, _next=request.path) }}">x</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|