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.
|
|
|
{% 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 %}
|