{% load seizou_tags seizou_icons %}{% comment %} 実績の一覧の 1 行 (progress/_rows.html が実績の一覧 record_list のときに core/_rows.html の row_template として渡す。PROG-1e = a)。 写した元: stock/_row.html (在庫の一覧の 1 行。その元は core/_rows.html の行)。土台の表の行の形が変わったら、ここも合わせる。 写した元から変えた所: 行の詳細の画面が無いので、行の押下で移る onclick と行の頭の link は付けない。最後の「操作」の欄の項目は「編集」と「削除」。 行の操作は ⋮ のボタンと、同じ中身の右クリック。markup の約束と動きは core の js/seizou-row-menu.js の頭の comment。 「編集」「削除」は入力を小窓で開く (data-modal-form は href と 1 字も違わない字)。JS が無いときと新しいタブでは href で画面へ移り、 保存の後と「キャンセル」で実績の一覧へ戻る (?next=)。 この 2 つは can_edit (progress/_rows.html が can_write の tag で 1 回だけ決める) が真の人にだけ出す。 {% endcomment %} {% for cell in row.cells %} {% if 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 can_edit %}{% url 'progress:progress_update' row.pk as edit_url %}{% url 'progress:progress_delete' row.pk as delete_url %} {% endif %}