{% extends "core/base.html" %} {% load seizou_tags seizou_icons %} {% block title %}{{ object }} | {{ screen_name|default:"seizou" }}{% endblock %} {# 詳細: 頭の型 (パンくず・大きい題と状態の印と「?」・右にボタン。開発の記録 docs/nights/20261105/N163.md)、tabs で基本情報と関係する物、ファイルの節。関係する物の行は block tab_rows (部品と取引先の詳細が、部品の取引先を表に差し替える)。空のタブの字は block tab_empty (指示書の詳細が、進捗のタブに入れる場所の 1 文を足す。部品の詳細が、標準の工程のタブに意味の 1 文を足す)。 #} {# 発行の時の写しの枠 (core/_report_copies.html。R34): 土台の BaseDetailView が写しを持つ model (keeps_report_copy) の詳細でだけ置く report_copies に行があり、金額の閲覧の無い人 (seizou.hide_money) でないときだけ、block after_tabs の後・添付ファイルの枠の前に出す。 #} {% block heading %} {# 詳細の頭の型 (決め 11-05 16:2x。開発の記録 docs/nights/20261105/N163.md)。1 段目にパンくず (一覧の名前 › 題)、2 段目の左に大きい題・状態の印・「?」(要点の札 = head_chips。子が block heading の中で tag の as で置く。3 つまで)、右にボタン。小さい画面の名前の行はやめた (発注の 2 段をやめる。画面の名前はタブの題と「?」)。 #} {# パンくずの一覧の名前は、子が with の tag で渡す crumb か、土台の BaseDetailView が一覧の画面の名前から引く list_name。パンくずがあれば「一覧に戻る」は出さない。一覧の名前が引けない詳細だけ、ボタンの左端に「一覧に戻る」。 #} {# ボタンは左から block actions (副。白い線)・block more (「⋯」。赤い操作 1 つは core/_detail_more.html を include し、最後に赤の字で置く)・block edit_button (主のボタン 1 つ。土台は「編集」。土台の「編集」は開いた詳細の道を ?next= で渡す (編集の画面の「キャンセル」で詳細へ戻る)。ほかの主のボタンを持つ詳細はここを上書きする)。 #} {% with crumb_name=crumb|default:list_name %} {% if crumb_name %}{% endif %}
{# 状態の印の無い詳細は、題と「?」を折り返さない組 (min-w-0) に入れ、「?」だけが次の行へ落ちないようにする (題は truncate で縮む。作者の決め。開発の記録 docs/nights/20261106/N266.md)。block heading_badge は状態の枝にだけ置くので、状態 (choices つきの status) の無い model の子が heading_badge を上書きしても出ない (今上書きする請求書と指示書は status を持つ)。 #}
{% if status %}

{{ object }}

{% block heading_badge %}{% if status %}{% status_badge object dot=True %}{% endif %}{% endblock %} {% include "core/_screen_help.html" with part="" label="この画面の説明" %} {% else %}

{{ object }}

{% include "core/_screen_help.html" with part="" label="この画面の説明" %}
{% endif %} {% for chip in head_chips|slice:":3" %}{{ chip.label }}{{ chip.value }}{% endfor %}
{# 題の下に説明の 1 文 (screen_help) は出さない (決め 11-03 14:1x。「?」で説明書の断片を見る)。 #}
{% if list_url and not crumb_name %}{% icon "arrow-left" "size-4" %}一覧に戻る{% endif %} {% block actions %}{% endblock %} {% block more %}{% endblock %} {% block edit_button %}{% if edit_url %}{% icon "pencil" "size-4" %}編集{% endif %}{% endblock %}
{% endwith %} {% endblock %} {% block content %} {# 右の列 (作者の決め。開発の記録 docs/nights/20261105/N150.md): 子のテンプレートが block content の中で tag の as で aside (右の列のカードの並び) を置いてから block.super を呼ぶと、幅 lg 以上で左右の 2 列 (左が広く、右は 20rem)。狭い幅は 1 列で、全幅の口 block wide (子の明細。受注は明細の節、発注は #po-live) → block main (子の流れ・メモ) → 右のカード → 関係する物のタブ → block after_tabs (子の枠。請求書の入金の枠) → 添付の順 (カードより先に明細を見せる。決め 11-06 22:2x)。lg 以上は 1 段目に全幅の口 (明細の表が窓 1280 で右のカードの横の箱に入らず切れたため。決め 11-06 22:2x)、2 段目の左に block main、3 段目の左にタブ・block after_tabs・添付、右のカードは 2・3 段目にまたがる。3 段目は 1fr (右が高いときの空きを左の列の一番下に出す)。全幅の口は if aside の中なので、aside を置かない詳細の HTML の字は変わらない。block main を aside の閉じと同じ行に置くのは、aside を置かない詳細の HTML の字を変えないため (if の外に出る字は改行 2 つだけ)。aside を置かない詳細は今の 1 列のまま (基本情報のタブを出す)。1 列の詳細は、基本情報と関係する物のタブ → block after_tabs → 添付の順。カードの形は orders の orders_detail の tag の docstring。カードの項目の名は小さい灰の字、値は太い字。 #} {% if aside %}
{% block wide %}{% endblock %}
{% endif %} {% block main %}{% endblock %}{% if aside %}
{% endif %} {% if tabs or not aside or history %} {# 枠の「?」は箱の右上 (tabs の行の右端) に置く (本人 11-04 14:4x「ちゃんと右上がいい」)。開いている tab の枠の「?」だけが見える (tab-content は選んだ物だけ描く)。右の余白 (pr-12) は tabs が「?」の下に回り込まないため。タブの形は土台の seizou-tabs (scripts/css/input.css。本人の決め 11-07 16:5x) で、選んだ tab は主色の下線、中身の箱の上の辺が行の下の線。 #}
{% if not aside %}
{% include "core/_screen_help.html" with part="basic" label="基本情報の説明" %}

基本

{# マスターでない相手に詳細の画面があれば、値をその詳細への link にする (field.url。明細は親の伝票。部署でその部品を使わない人には字のまま。同じタブで移る。右の列のカードの値も同じ。作者の決め)。 #} {% for field in fields %}
{{ field.label|without_yen_unit }}
{% if field.file %}{% icon "file" "size-4" %}{{ field.file.name }} {% elif field.master %}{% master_link field.master %} {% elif field.url %}{{ field.value }} {% elif field.boolean %}{% bool_mark field.value %} {% elif field.value is None or field.value == "" %}— {% else %}{% with day=field.value|weekday_ja %}{% if day %}{{ field.value|date:"Y-m-d" }} ({{ day }}){% with clock=field.value|time:"H:i" %}{% if clock %} {{ clock }}{% endif %}{% endwith %}{% else %}{{ field.value|yen_if:field.money }}{% endif %}{% endwith %}{% endif %}
{% endfor %} {# block basic_extra: 子のテンプレートが基本の表の最後に行を足す所 (在庫の動きの詳細の「元の記録」の行。作者の決め) #}{% block basic_extra %}{% endblock %}
{% if files %}

ファイル

{% endif %}
{% endif %} {% for tab in tabs %}
{% include "core/_screen_help.html" with part="related" label="関係する物の説明" %}

{{ tab.label }}

{% if tab.rows %} {% block tab_rows %} {% endblock %} {% if tab.count > tab.rows|length %}

先頭の {{ tab.rows|length }} 件を出しています (全 {{ tab.count|comma }} 件)。

{% endif %} {% else %}{% block tab_empty %}
{% icon "inbox" "size-6" %}

まだありません。

{{ tab.label }}が入ると、ここに並びます。

{% endblock %}{% endif %}
{% endfor %} {# 履歴のタブ (作者の決め。core.history。model に印のある詳細だけ)。関係する物のタブの後ろに置く。「?」は付けない。右の列のある詳細で関係する物のタブが無ければ、このタブで開く。 #} {% if history %}

履歴

{% include "core/_history.html" with timeline=history %}
{% endif %}
{% endif %} {# 最後に直した日時と人 (作者の決め。履歴の一番新しい行。列を足さないのは「残す仕組みは 1 つ」= 作者の決めのため)。行が無ければ「—」(今ある行は、次に保存するまで「—」)。 #} {% if history %}

最後に直した {% if history.last %}{{ history.last.when|date:"Y-m-d H:i" }} ・ {{ history.last.who }}{% else %}—{% endif %}

{% endif %} {% block after_tabs %}{% endblock %}{% if report_copies and not seizou.hide_money %}{% include "core/_report_copies.html" %}{% endif %}{% if "attachments" in seizou.parts %}{% include "attachments/_panel.html" %}{% endif %} {% if aside %}
{% endif %} {% endblock %}