{% load i18n placeholder_admin_tags %}{% comment %} This is the admin template to render the PlaceholderEditorInline. It renders tab buttons for each inline, and registers them as "placeholder panes" for the editor. inline_admin_formset = generated InlineAdminFormSet of the PlaceholderEditorInline. Each form holds a placeholder. inline_admin_formset.opts = PlaceholderEditorInline object inline_admin_formset.original = Placeholder object inline_admin_formset.form.'field'.value = value! inline_admin_formset.__iter__ gives all forms + a template form inline_admin_formset.formset.__iter__ gives the raw forms only inline_admin_formsets = all InlineAdminFormSet objects of the parent {% endcomment %}
{{ inline_admin_formset.formset.management_form }} {{ inline_admin_formset.formset.non_form_errors }} {# looping in `inline_admin_formset.formset.forms` excludes empty form #} {# looping in `_admin_formset` includes the empty placeholder as last item #} {# tab navigation #} {# each inline object is a placeholders #}
{# all the region tabs #} {% for inline_admin_form in inline_admin_formset %} {% getfirstof inline_admin_form.original.get_allowed_plugins inline_admin_formset.opts.get_all_allowed_plugins as cp_plugin_list %} {% getfirstof inline_admin_form.form.slot.value '__EMPTY__' as placeholder_slot %} {% getfirstof inline_admin_form.original.id '' as placeholder_id %}{# used by pane.html / controls.html #}
{% include "admin/fluent_contents/placeholderfield/pane_tabbar.html" %} {% if inline_admin_form.form.errors %}{# Should never happen, but when it does, this aids debugging #}
  • {{ inline_admin_form.form.errors.as_text|linebreaksbr }}
{% endif %} {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %} {% for fieldset in inline_admin_form %}{% for line in fieldset %}{% for adminfield in line %}{{ adminfield.field.as_hidden }} {% endfor %}{% endfor %}{% endfor %}
{% endfor %}

{% trans "There are no placeholders in this template." %}

{# this is a "lost+found" bucket for layout switching #}
{# all remaining fieldsets #} {% block tabmain_end %}{% endblock %}