2024-07-03 14:19:58 +02:00
|
|
|
|
{#
|
|
|
|
|
SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
|
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
#}
|
|
|
|
|
|
2024-07-10 01:14:49 +02:00
|
|
|
|
{%- import "macros.html" as macros -%}
|
2024-07-03 14:19:58 +02:00
|
|
|
|
{% extends "base.html" %}
|
|
|
|
|
{% block title %}{% block page_title %}Item List{% endblock %} – {{ branding }}{% endblock %}
|
|
|
|
|
{% block page_actions %}
|
|
|
|
|
<a class="btn btn-primary" href="/items/add">Add</a>
|
|
|
|
|
{% endblock %}
|
|
|
|
|
{% block main %}
|
|
|
|
|
<table class="table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Name</th>
|
2024-07-07 13:48:31 +02:00
|
|
|
|
<th>Class</th>
|
2024-07-08 22:39:54 +02:00
|
|
|
|
<th>Parents</th>
|
2024-07-03 14:19:58 +02:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-07-08 22:39:54 +02:00
|
|
|
|
{% for item in item_list -%}
|
2024-07-07 13:48:31 +02:00
|
|
|
|
{% let class = item_classes.get(item.class).unwrap() %}
|
2024-07-10 01:14:49 +02:00
|
|
|
|
{# inlining this breaks? #}
|
|
|
|
|
{%- let parents = item_parents.get(item.id).unwrap() %}
|
2024-07-03 14:19:58 +02:00
|
|
|
|
<tr>
|
2024-07-10 01:14:49 +02:00
|
|
|
|
<td><a href="/item/{{ item.id }}">{% call macros::item_name_terse(item, true) %}</a></td>
|
2024-07-07 13:48:31 +02:00
|
|
|
|
<td><a href="/item-class/{{ class.id }}">{{ class.name }}</a></td>
|
2024-07-08 22:39:54 +02:00
|
|
|
|
<td>
|
2024-07-10 01:14:49 +02:00
|
|
|
|
{%- call macros::parents_breadcrumb(item, parents, item_classes, full=false) %}
|
2024-07-08 22:39:54 +02:00
|
|
|
|
</td>
|
2024-07-03 14:19:58 +02:00
|
|
|
|
</tr>
|
|
|
|
|
{% endfor -%}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
{% endblock %}
|