{% load seizou_tags seizou_icons %}{% comment %} orders の一覧の行の部分。土台は画面の全体でも htmx の要求でも、この部分を core/_rows.html より先に探す。 受注の一覧 (order_list) と注文残の一覧 (orderline_list) に行があるときだけ、core/_rows.html の「行がある時」の部分 (表・ページ送り・partial のときの _list_meta.html の oob) を写して、次の 2 つを変える。 - 受注の一覧: 状態の列 (列の名前 status) の欄を色の印にする。字は欄の値 (状態の表示名) のまま。列の並びは変えない。 右端に「要点」の列 (行の「要点を見る」の目の印 = core/_row_summary_link.html。押すと受注の小窓 orders:order_modal を開く。受け渡しの seizou-部品の6案-20261107/指示書.md の 6)。 - 注文残の一覧 (注残の盤): orders/_board_rows.html (判断の列の印・合計の行・行のメニュー)。 注文残の一覧が空で、検索も絞りの札も無いときは orders/_board_empty.html (「受注を入れると、出荷の残りがある明細がここに並びます。」の 1 文と「受注の新規登録」のボタン。ONB-01)。 それ以外 (検索か札のある 0 件、受注の一覧の 0 件、ほかの画面) は core/_rows.html をそのまま使う。 写した元: core/_rows.html (11-02 夜の main)。土台の表の形が変わったら、ここも合わせる。 {% endcomment %} {% with url_name=request.resolver_match.url_name %} {% if rows and url_name == "orderline_list" %}{% include "orders/_board_rows.html" %} {% elif rows and url_name == "order_list" %} {# 表の箱を包む要素。右に続きがあるときだけ、箱の印 (data-scroll-hint) を見る JS がこの要素に印を付け、この要素の中に「→」のボタンを作る (右の端の影はやめた。11-07 の決め。C34)。 #}
| {% if col.sortable %}{{ col.label }}{% 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 }}{% endif %} | {% endfor %} {% if url_name == "orderline_list" %}操作 | {% elif url_name == "order_list" %}要点 | {% endif %}||||||
|---|---|---|---|---|---|---|---|---|
| {% status_badge row.obj %} | {% 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 forloop.parentloop.first and row.url %}{{ cell.value|default_if_none:"" }} | {% else %}{{ cell.value|default_if_none:"" }} | {% endif %} {% endif %}{% endfor %} {% endfor %} {% if url_name == "orderline_list" %}{% include "orders/_line_actions.html" with line=row.obj order=row.obj.order %} | {% elif url_name == "order_list" %}{% url 'orders:order_modal' row.pk as modal_url %}{% include "core/_row_summary_link.html" with modal_url=modal_url detail_url=row.url %} | {% endif %}
| {% if cell.numeric %}{{ cell.value|yen_if:cell.money }}{% elif forloop.first %}合計{% endif %} | {% endfor %}{% if url_name == "orderline_list" or url_name == "order_list" %}{% endif %} |
{{ paginator.count|comma }} 件中 {{ page_obj.start_index|comma }}–{{ page_obj.end_index|comma }} 件
{% if paginator.num_pages > 1 %} {% endif %}