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

{% block breadcrumbs %}
<ul class="breadcrumb">
    <li><a href="{% url 'admin:index' %}" title="{% trans "Go back to" %} {% trans "admin homepage" %}">{% trans "Home" %}</a><span class="divider">/</span></li>
    <li><a href="{% url 'admin:app_list' app_label='filer' %}" title="{% trans "Go back to" %} {% trans "Filer" %}"> {% trans "Filer" %}</a><span class="divider">/</span></li>
    <li><a href="{% url 'admin:filer-directory_listing-root' %}" title="{% trans "Go back to" %} '{% trans "root"|title %}' {% trans "folder" %}">{% trans "root"|title %}</a><span class="divider">/</span></li>
    {% for ancestor_folder in original.get_ancestors %}
    <li><a href="{% url 'admin:filer-directory_listing' ancestor_folder.id %}" title="{% blocktrans with ancestor_folder.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{{ ancestor_folder.name }}</a><span class="divider">/</span></li>
    {% endfor %}
    <li>{{ original.name }}</li>
</ul>
{% endblock %}


{% block coltype %}{% if is_popup %}colM{% else %}colMS{% endif %}{% endblock %}
{% block object-tools %}
{% if change %}{% if not is_popup %}
  <ul class="object-tools">
    <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="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
  </ul>
{% endif %}{% endif %}
{% endblock %}

{% block after_field_sets %}
{% if is_popup and select_folder %}<input type="hidden" name="select_folder" value="1" />{% endif %}
{% endblock %}

{% block sidebar %}{% if not is_popup %}
<div id="content-related" class="span3">
    <div id="navcontainer">
        <img src="{% filer_staticmedia_prefix %}icons/plainfolder_128x128.png" alt="{% trans "Folder Icon" %}" />
    </div>
</div>
{% endif %}{% endblock %}
