{% extends "admin/feincms/item_editor.html" %}

{% load i18n %}

{% block object-tools %}
{{ block.super }}
<ul class="extra-object-tools">
	{% if not original.is_active %}
	    {% url "feincms_preview" original.get_absolute_url|slice:"1:-1" original.pk as preview_url %}
	    {% if preview_url %}
	        <li><a target="_blank" href="{{ preview_url }}" class="viewsitelink">{% trans "Preview" %}</a></li>
	    {% endif %}
	{% endif %}
</ul>
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% trans "Home" %}</a> &rsaquo;
    <a href="{% url 'admin:page_page_changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;

    {% if add %}
        {% trans "Add" %} {{ opts.verbose_name }}
    {% else %}
        {% for p in original.get_ancestors %}
            <a href="{% url 'admin:page_page_change' p.id %}">{{ p.short_title }}</a> :
        {% endfor %}
        {{ original.short_title }}
    {% endif %}
</div>
{% endblock %}
