{% load static seizou_icons %} {# shipping の入力の小窓の中身。入力の土台は小窓のテンプレートを app ごとに選ぶ (shipping/_form_modal.html → core/_form_modal.html) ので、画面の URL の名前で出し分ける。 #} {# 一括出荷は明細の表のカード (shipping/_shipment_bulk_card.html) を form_card で渡す。題と閉じるボタンと知らせは core/_form_modal.html の物。納品書の取消は確かめのカード (shipping/_deliverynote_cancel_card.html)。納品書を作るは出荷の表のカード (shipping/_deliverynote_create_card.html。候補 C74)。出荷の削除は確かめのカード (shipping/_shipment_delete_card.html。候補 12)。ほかの入力 (出荷の新規登録・編集) は土台の小窓のまま。 #} {% if request.resolver_match.url_name == "shipment_bulk_create" %}{% include "core/_form_modal.html" with form_card="shipping/_shipment_bulk_card.html" %}{% elif request.resolver_match.url_name == "deliverynote_cancel" %}{% include "core/_form_modal.html" with form_card="shipping/_deliverynote_cancel_card.html" %}{% elif request.resolver_match.url_name == "deliverynote_create" %}{% include "core/_form_modal.html" with form_card="shipping/_deliverynote_create_card.html" %}{% elif request.resolver_match.url_name == "shipment_delete" %}{% include "core/_form_modal.html" with form_card="shipping/_shipment_delete_card.html" %}{% else %}{% include "core/_form_modal.html" %} {# 出荷の新規登録の小窓でも、受注の明細を選び直したときに「残り n」を写す JS を読む (画面の全体は shipping/shipment_form.html が読む。精査 A8 の 3 節の 2)。htmx が差し替えの後に script を動かす。 #} {# 出荷の編集の小窓: カードの下に「この出荷を削除」を置く。押すと同じ小窓の中身が削除の確かめに替わる (data-modal-form。開いた元の道 ?next= を引き継ぐ。実績の編集の progress/_form_modal.html と同じ形。候補 12)。 #} {% if request.resolver_match.url_name == "shipment_create" %} {% elif request.resolver_match.url_name == "shipment_update" and object %}{% url 'shipping:shipment_delete' object.pk as delete_url %}
{% icon "x" "size-4" %}この出荷を削除
{% endif %}{% endif %}