Flat file database editor and browser with web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rocket-inv/templates/index.html.tera

44 lines
751 B

{% extends "_layout" %}
{% import "_form_macros" as form %}
{% block title -%}
Inventory
{%- endblock %}
{% block nav -%}
<a href="/add">Add</a>
{%- endblock %}
{% block content -%}
<table class="cards-table">
<thead>
<tr>
<th>Actions</th>
{%- for field in fields %}
<th>{{ field.label }}</th>
{%- endfor %}
</tr>
</thead>
<tbody>
{%- for card in cards %}
<tr>
<td><a href="/edit/{{card.id}}">Edit</a></td>
{%- for field in card.fields %}
<td>
{%- if field.kind == "bool" -%}
{% if field.checked %}
{% else %}
{% endif %}
{%- else -%}
{{ field.value }}
{%- endif -%}
</td>
{%- endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{%- endblock %}