{% extends "admin/change_form.html" %}
{% load i18n admin_modify pages_tags %}

{% block title %}{% trans "Edit" %}{% endblock %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/urlify.js"></script>
<script type="text/javascript">var static_url = "{{ STATIC_URL }}";</script>
{% endblock %}

{% block content %}
<!-- Content -->
<div id="content-main">
    {% block object-tools %}
        {% if change and not is_popup %}
            <ul class="object-tools">
                {% if has_absolute_url %}<li><a href="{% show_absolute_url original %}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif %}
            </ul>
        {% endif %}
    {% endblock %}

{% if change %}{% if not is_popup %}
  <ul class="object-tools">
    {% block object-tools-items %}
    <li><a href="history/" class="historylink">{% trans "History" %}</a></li>
    {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
    {% endblock %}
  </ul>
{% endif %}{% endif %}


    <form id="page_form" {% if has_file_field %}enctype="multipart/form-data" {% endif %} action="?language={{ request.GET.language }}{%if request.GET.target %}&amp;target={{ request.GET.target }}{% endif %}&amp;{%if request.GET.target %}position={{ request.GET.position }}{% endif %}" method="post">
        {% csrf_token %}
        <div class="sidebar">

        {% for fieldset in adminform %}
            {% include "admin/pages/page/includes/fieldset.html" %}

            {% if forloop.first %}
                {% comment %}Close sidebar, open content{% endcomment %}
                </div>
                <div id="change-page-content">
            {% endif %}
        {% endfor %}


        <div>
        {% for inline_admin_formset in inline_admin_formsets %}
            {% include inline_admin_formset.opts.template %}
        {% endfor %}
        </div>

        </div>{% comment %}Close content{% endcomment %}

        {% submit_row %}
    </form>
</div>
<script type="text/javascript" charset="utf-8">
<!--
var add_form = {% if add %}1{% else %}0{% endif %};
-->
</script>
<!-- END Content -->
{% endblock %}
