Files
2026-moving-helper/app/templates/boxes/index.html
T

64 lines
2.2 KiB
HTML
Raw Normal View History

2026-04-19 12:36:55 +02:00
{% extends "base.html" %}
{% block content %}
2026-04-19 13:26:23 +02:00
<div class="breadcrumb">
<span>首页</span>
<span>/</span>
<strong>箱子</strong>
</div>
2026-04-19 12:36:55 +02:00
<div class="page-header">
<div>
2026-04-19 13:26:23 +02:00
<div class="type-tag type-box">Box</div>
<h1>箱子总览</h1>
2026-04-19 12:36:55 +02:00
<p class="muted">这里管理顶层搬家容器,例如纸箱、行李箱或大收纳箱。</p>
</div>
2026-04-19 14:06:31 +02:00
<a class="button button-primary" href="/boxes/new">新建箱子</a>
2026-04-19 12:36:55 +02:00
</div>
2026-04-27 20:43:57 +02:00
<section class="stack summary-section">
<div class="section-heading">
<h2>当前概览</h2>
<p class="muted">快速查看当前装箱记录的核心统计。</p>
</div>
<section class="card summary-block">
<ul class="summary-list">
<li><strong>箱子总数:</strong>{{ summary.box_count }}</li>
<li><strong>物品总数(不含子物品):</strong>{{ summary.item_count }}</li>
<li><strong>物品总数(含子物品):</strong>{{ summary.item_and_subitem_count }}</li>
<li><strong>平均每箱物品数:</strong>{{ summary.avg_items_per_box }}</li>
<li><strong>平均每个容器型 Item 的子物品数:</strong>{{ summary.avg_subitems_per_container_item }}</li>
</ul>
</section>
</section>
2026-04-19 12:36:55 +02:00
{% if boxes %}
2026-04-19 14:06:31 +02:00
<div class="overview-grid">
2026-04-19 12:36:55 +02:00
{% for box in boxes %}
2026-04-19 14:06:31 +02:00
<section
class="compact-row compact-row-box clickable-card overview-card overview-card-box"
data-href="/boxes/{{ box.id }}"
tabindex="0"
role="link"
aria-label="查看箱子 {{ box.name }}"
>
2026-04-19 13:26:23 +02:00
<div class="compact-main">
<div class="row-title-line">
<span class="type-tag type-box">Box</span>
2026-04-19 14:06:31 +02:00
<h2>{{ box.name }}</h2>
2026-04-19 13:26:23 +02:00
</div>
<div class="row-meta-grid">
<span>物品数:{{ box.items|length }}</span>
</div>
{% if box.note %}<p class="row-note">{{ box.note }}</p>{% endif %}
</div>
2026-04-19 12:36:55 +02:00
</section>
{% endfor %}
</div>
{% else %}
<section class="card">
<p>还没有箱子。</p>
2026-04-19 14:06:31 +02:00
<a class="button button-primary" href="/boxes/new">创建第一个箱子</a>
2026-04-19 12:36:55 +02:00
</section>
{% endif %}
{% endblock %}