{% extends "base.html" %}

{% block extratitle %}
    Indeks jednostek{% if wybrana != None %} - litera {{ wybrana }}{% endif %}
{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    <li {% if wybrana == None %}class="current"{% endif %}>
        {% if wybrana != None %}<a  href="{% url "bpp:browse_jednostki" %}">{% endif %}
            Jednostki
        {% if wybrana != None %}</a>{% endif %}
    </li>
{% endblock %}

{% block content %}
    {% url "bpp:browse_jednostki" as browse_jednostki %}
    {% include "browse/go_to_admin_list.html" with url="admin:bpp_jednostka_changelist" group="struktura" text="<i class='fi-wrench'></i> wyświetl w module redagowania" %}

    {% url "bpp:browse_jednostki" as browse_jednostki %}

    <div class="row hide-for-print">
        <div class="large-4 small-12 columns">
            {% include "browse/search_form.html" with url=browse_jednostki tekst="Wpisz część nazwy i wciśnij ENTER..." name="search" flt=flt %}
        </div>
        <div class="large-8 small-12 columns">
            {% include "pagination.html" %}
        </div>
    </div>


    {% load columns %}

    <div class="grid-x grid-margin-x">
        {% for col in object_list|columns:2 %}
            <div class="large-6 cell">
                <ul class="no-bullet">
                    {% for item in col %}
                        <li>
                            <a href="{% url "bpp:browse_jednostka" item.slug %}">
                                {{ item.nazwa }} ({{ item.wydzial.skrot }})</a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        {% endfor %}
        {% if not object_list %}
            <div class="callout cell warning">
                Nie znaleziono takich jednostek. <p></p>
                <a href="{% url "bpp:browse_jednostki" %}">Kliknij tutaj, aby spróbować ponownie.</a>
            </div>

        {% endif %}
    </div><!-- /row -->


{% endblock %}
