35 lines
1.0 KiB
HTML
35 lines
1.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<div>
|
|
<h1>箱子</h1>
|
|
<p class="muted">这里管理顶层搬家容器,例如纸箱、行李箱或大收纳箱。</p>
|
|
</div>
|
|
<a class="button" href="/boxes/new">新建箱子</a>
|
|
</div>
|
|
|
|
{% if boxes %}
|
|
<div class="stack">
|
|
{% for box in boxes %}
|
|
<section class="card">
|
|
<h2><a href="/boxes/{{ box.id }}">{{ box.name }}</a></h2>
|
|
<p class="meta">物品数:{{ box.items|length }}</p>
|
|
{% if box.room %}<p>房间:{{ box.room }}</p>{% endif %}
|
|
{% if box.status %}<p>状态:{{ box.status }}</p>{% endif %}
|
|
{% if box.note %}<p>{{ box.note }}</p>{% endif %}
|
|
<div class="actions">
|
|
<a href="/boxes/{{ box.id }}">查看详情</a>
|
|
<a href="/boxes/{{ box.id }}/edit">编辑</a>
|
|
</div>
|
|
</section>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<section class="card">
|
|
<p>还没有箱子。</p>
|
|
<a href="/boxes/new">创建第一个箱子</a>
|
|
</section>
|
|
{% endif %}
|
|
{% endblock %}
|