32 lines
772 B
HTML
32 lines
772 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block main %}
|
|
<script type="module" src="{{ base_path }}/js_dist/cells.mjs"></script>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
{% for field in fields %}
|
|
<th>
|
|
<div>{{ field.options.label.clone().unwrap_or(field.name.clone()) }}</div>
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in rows %}
|
|
<tr>
|
|
{% for field in fields %}
|
|
<td>
|
|
{% match Value::get_from_row(row, field.name.as_str()) %}
|
|
{% when Ok with (value) %}
|
|
{{ value.to_html_string(&field.options) | safe }}
|
|
{% when Err with (err) %}
|
|
<span class="pg-value-error">{{ err }}</span>
|
|
{% endmatch %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|