{% load i18n filer_admin_tags %}

<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}" title="{% translate 'Go back to admin homepage' %}">{% translate "Home" %}</a>
    &rsaquo; <a href="{% url 'admin:app_list' app_label='filer' %}" title="{% translate 'Go back to Filer app' %}"> {% translate "Filer" %}</a>
    &rsaquo; <a href="{% url 'admin:filer-directory_listing-root' %}{% filer_admin_context_url_params %}" title="{% translate 'Go back to root folder' %}">{% translate "Folder" %}</a>
    {% for ancestor_folder in instance.logical_path %}
        &rsaquo; <a href="{{ ancestor_folder.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}" title="{% blocktrans with ancestor_folder.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">
            {% if ancestor_folder.label %}
                {{ ancestor_folder.label }}
            {% else %}
                {{ ancestor_folder.name }}
            {% endif %}
        </a>
    {% endfor %}
    {% if breadcrumbs_action %}
        {% if instance.label or instance.name %}
            &rsaquo; <a href="{{ instance.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}" title="{% blocktrans with instance.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %}</a>
        {% endif %}
        &rsaquo; {{ breadcrumbs_action }}
    {% else %}
        &rsaquo; {% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %}
    {% endif %}
</div>
