{% load seizou_tags seizou_icons %} {# 出荷の一覧の 1 行 (shipping/_rows.html が core/_rows.html の row_template で include する)。context: row (土台の row_for の 1 行。obj は Shipment)・columns。 #} {# 欄の描き方は core/_rows.html の既定の 1 行をそのまま写した物 (土台の 1 行の形が変わったら、ここも合わせる)。右端の欄に「要点を見る」の目の印 (土台の目の印の部品を include する。押すと出荷の小窓)。 #} {# 行の操作は ⋮ のボタンと、同じ中身の右クリック (本人の決め 11-08 00:25)。markup の約束と動きは core の js/seizou-row-menu.js の頭の comment。行の押下で出荷の詳細へ移る onclick は、link と ⋮ の中の押下では動かない (closest('a, details'))。 #} {# 「編集」「削除」は can_edit (shipping/_rows.html が can_write の tag で 1 回だけ決める) が真の人にだけ出す。入力を小窓で開き (data-modal-form は href と 1 字も違わない字)、JS が無いときと新しいタブでは href で画面へ移り、保存の後と「キャンセル」で出荷の一覧へ戻る (?next=)。 #} {# 出荷は数の操作なので、金額の閲覧では隠さない (決め 21:0x)。発行の納品書に入った出荷の「編集」は入口で隠さず、開くと今のまま R08 の断りが出る。 #} {% for cell in row.cells %} {% if forloop.first and row.url and not cell.numeric and not cell.master %}{% 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 %} {# 右端の「要点」の列 (shipping/_rows.html が土台に actions_label を渡して見出しを出す)。目の印を押すと出荷の小窓 (ShipmentModalView) を開く。目の印の後ろに行の操作の ⋮。 #} {% url 'shipping:shipment_modal' row.pk as modal_url %}{% include "core/_row_summary_link.html" with modal_url=modal_url detail_url=row.url %} {% if can_edit %}{% url 'shipping:shipment_update' row.pk as edit_url %}{% url 'shipping:shipment_delete' row.pk as delete_url %} {% endif %}