{% extends "touchtechnology/admin/workbook/base.html" %} {% load i18n common admin_lists admin_workbook %} {% comment %} An object's page: its heading, then its parts as tabs (the form first, then one tab per related list), each part a sheet of its own. Blocks a deployment may fill: page-head the heading (eyebrow, title, head-actions) head-actions buttons beside the title before-tabs anything above the tabs (a checklist, a summary) tab-links the tabs: include "touchtechnology/admin/workbook/_tab.html" with name, label (and count); the tab's id is "-tab" tab-panes the panes:
form-fieldset the fields of the form form-bar the bar at the top of the form, kept in view, with Cancel and Save form-title its title form-buttons the Save button at the foot of the form cancel-url where Cancel goes aside a column beside the tabs at a desk {% endcomment %} {% block page_title %}{% if object|is_saved %}{{ object }}{% else %}{% blocktrans with type=model|type %}New {{ type }}{% endblocktrans %}{% endif %}{% endblock %} {% block content %} {% block page-head %}

{% block eyebrow %}{{ model|type|capfirst }}{% endblock %}

{% block heading %}{% if object|is_saved %}{{ object }}{% else %}{% blocktrans with type=model|type %}New {{ type }}{% endblocktrans %}{% endif %}{% endblock %}

{% block lede %}{% endblock %}
{% block head-actions %}{% endblock %}
{% endblock page-head %} {% block before-tabs %}{% endblock %}
{% if object|is_saved %}
{% block tab-links %} {% block edit-tab-label %}{% trans "Details" %}{% endblock %}{% if form.errors %} {% icon "circle-alert" %}{% endif %} {% for manager, name in object|related:related %} {% include "touchtechnology/admin/workbook/_tab.html" with name=name label=manager.all|types|capfirst count=manager|tab_count only %} {% endfor %} {% endblock tab-links %}
{% endif %}
{% block tab-panes %}
{% csrf_token %} {% block form-bar %}

{% block form-title %}{% blocktrans with type=model|type|capfirst %}{{ type }} details{% endblocktrans %}{% endblock %}

{% trans "Cancel" %}
{% endblock form-bar %} {% include "touchtechnology/admin/workbook/_problems.html" %} {% block form-fieldset %}
{% for f in form %} {% field f %} {% endfor %}
{% endblock form-fieldset %} {% block form-buttons %}
{% if not object|is_saved and form and not formset and not wizard %} {% endif %}
{% endblock form-buttons %}
{% if object|is_saved %} {% for manager, name in object|related:related %} {% if htmx_admin_tabs %}

{% trans "Loading…" %}

{% else %}
{% block mvp-list %} {% with table=templates|default:None %} {% admin_list manager.all template=manager|admin_list_template:table %} {% endwith %} {% endblock %}
{% endif %} {% endfor %} {% endif %} {% endblock tab-panes %}
{% block aside %}{% endblock %}
{% endblock %} {% block extracss %} {{ block.super }} {{ form.media|admin_media }} {% endblock %}