{% extends "base.html" %} {% load i18n auth_tags bootstrap djinn_contenttypes pgcomment_tags %} {% block body_class %}ct {{ object.ct_name }} edit{% endblock %} {% block container %} {% block header %}

{% block title %} {% with ct_label=view.ct_label %} {% if object and not object.is_tmp %} {% blocktrans %}Edit {{ ct_label }}{% endblocktrans %} {% else %} {% blocktrans %}Add {{ ct_label }}{% endblocktrans %} {% endif %} {% endwith %} {% endblock title %}

{% block metainfo %}
{% if not object.is_tmp %} {% if object.is_publishable %} {% if object.publish_from %} {# Translators: metadata publication date #} {% trans "Published on" %}: {{ object.publish_from }}, {% else %} {# Translators: metadata status #} {% trans "Status" %}: {% trans "draft" %}, {% endif %} {% endif %} {% endif %} {# Translators: metadata last changed #} {% trans "Last change" %}: {{ object.changed }}, {# Translators: metadata reactions #} {% trans "Reactions" %}: {% comment_count_for user object %}
{% endblock metainfo %} {% endblock header %} {% block form_preamble %} {% endblock %} {% block form %}
{{ form.media }} {% csrf_token %} {% if object and object.is_tmp %} {% endif %} {% block errors %} {% if form.errors %}
{% trans "Please correct the following errors" %}
{% endif %} {% endblock errors %} {% block help %} {% if form.help %}
{{ form.help|safe }}
{% endif %} {% endblock help %} {% block formfields %} {{ form|bootstrap }} {% endblock %} {% block extra_formfields %}{% endblock %} {% block formcontrols %}
{% block savecontrols %} {% if not object or object.is_tmp %} {% else %} {% if not object.is_published and not object.is_scheduled %} {% else %} {% endif %} {% endif %} {% endblock %} {% if object and not object.is_tmp %} {% with perm=object|delete_permission_id %} {% ifpermission object request.user perm %} {% block delete_label %} {% blocktrans with object_name=view.ct_label %}Delete this {{ object_name }}{% endblocktrans %} {% endblock %} {% endifpermission %} {% endwith %} {% endif %}
{% endblock %} {% block formfooter %}{% endblock %}
{% endblock form %} {% endblock container %}