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

{% if not is_popup %}
  {% block breadcrumbs %}
    <div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
    &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
    &rsaquo; {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
    &rsaquo; Duplicate page
    </div>
  {% endblock %}
{% endif %}

{% block content %}
  <div id="content-main">
    {% block object-tools %}
      {% if change %}
        {% if not is_popup %}
          <ul class="object-tools">
            {% block object-tools-items %}
              <li>
                  {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
                  <a href="{% add_preserved_filters history_url %}" class="historylink">{% trans "History" %}</a>
              </li>
              {% if has_absolute_url %}
                <li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>
              {% endif %}
              <li><a href="{% url "admin:glitter_pages_page_duplicate" original.pk %}" class="viewsitelink">{% trans "Duplicate page" %}</a></li>
            {% endblock %}
          </ul>
        {% endif %}
      {% endif %}
    {% endblock %}

    {{ block.super }}
{% endblock %}
