questlab/www/analytics/plugins/ExampleVisualization/templates/simpleTable.twig
coderkun 046a724272 merge
2015-04-27 16:42:05 +02:00

26 lines
No EOL
829 B
Twig

<div>
<h2>{{ vizTitle }}</h2>
<table class="dataTable">
<thead>
<tr>
{% for name in properties.columns_to_display %}
{% if name in properties.translations|keys %}
<th>{{ properties.translations[name]|translate }}</th>
{% else %}
<th>{{ name }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for tableRow in dataTable.getRows %}
<tr>
{% for column in properties.columns_to_display %}
<td>{{ tableRow.getColumn(column)|default('-')|truncate(50)|raw }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>