{% load seizou_tags seizou_icons %} {# 一覧の表の部分 (htmx はここだけを返す)。数は右寄せ・日付と識別子は等幅・長い字は省略して title に全文・行の高さは一定。 #} {# row_template: 1 行を描く template の名前 (無ければ下の欄の描き方)。actions_label: 最後の列の見出し (無ければ列を出さない)。include する側が with で渡す (connect の受信した注文)。 #} {% if rows %} {# 表の箱を包む要素。右に続きがあるときだけ、箱の印 (data-scroll-hint) を見る JS がこの要素に印を付け、この要素の中に「→」のボタンを作る (右の端の影はやめた。11-07 の決め)。 #}
| {% if col.sortable %}{{ col.label|without_yen_unit }}{% if sort == col.name %}{% icon "chevron-up" "size-4 text-primary" %}{% elif sort == col.desc_name %}{% icon "chevron-down" "size-4 text-primary" %}{% else %}{% icon "chevrons-up-down" "size-4 text-base-content/60" %}{% endif %}{% else %}{{ col.label|without_yen_unit }}{% endif %} | {% endfor %} {% if actions_label %}{{ actions_label }} | {% endif %}|||||
|---|---|---|---|---|---|---|
| {% if cell.datetime %}{{ cell.value|date:"Y-m-d H:i" }}{% elif cell.date %}{{ cell.value|date:"Y-m-d" }}{% with day=cell.value|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %}{% else %}{{ cell.value|default_if_none:"" }}{% endif %} | {% elif cell.numeric %}{% if cell.master %}{% master_link cell.master cell.value %}{% elif cell.negative %}{{ cell.value|yen_if:cell.money }}{% else %}{{ cell.value|yen_if:cell.money }}{% endif %} | {% elif cell.date or cell.datetime %}{% if cell.datetime %}{{ cell.value|date:"Y-m-d H:i" }}{% else %}{{ cell.value|date:"Y-m-d" }}{% with day=cell.value|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %}{% endif %} | {% elif cell.master %}{% master_link cell.master cell.value %} | {% elif cell.boolean %}{% bool_mark cell.value %} | {% elif cell.status %}{% status_badge row.obj %} | {% else %}{{ cell.value|default_if_none:"" }} | {% endif %} {% endfor %}
| {% if cell.numeric %}{{ cell.value|yen_if:cell.money }}{% elif forloop.first %}合計{% endif %} | {% endfor %}{% if actions_label %}{% endif %} |
{{ paginator.count|comma }} 件中 {{ page_obj.start_index|comma }}–{{ page_obj.end_index|comma }} 件
{% if paginator.num_pages > 1 %} {% endif %}{% if search_q %}「{{ search_q }}」{% if filter_chips %}、{% endif %}{% endif %}{% for chip in filter_chips %}{{ chip.heading }}「{{ chip.text }}」{% if not forloop.last %}、{% endif %}{% endfor %}に合う物はありません。
言葉を短くするか、「すべて外す」で条件を全部外してください。
{% icon "x" "size-4" %}すべて外す {% else %} {% icon "inbox" "size-6" %}まだ 1 件もありません。
{% if create_url %}「新規登録」から 1 件目を登録します。
{% icon "plus" "size-4" %}新規登録{% endif %} {% endif %}