paginated_list_panel.html 1.21 KB
{% load i18n get %}

{% with paginer|get:id as paginer_obj %}
    {% if paginer_obj.params.sort_fields %}
        <ul id={{ id }}-sort_choices class="sort-choices">
            {% for field in paginer_obj.params.sort_fields %}
                <li id="{{ id }}-{{ field }}-sort_choice" class="sort-choice">
                    <span class="sort-icon ui-icon"></span>
                    <a>
                        <div class="sort-direction">1</div>
                        <div class="sort-field-name">{{ field }}</div>
                        {% trans field %}</a>
                    {# TODO nazwa pola... #}
                </li>
            {% endfor %}
        </ul>
        <div class="clearer"></div>
    {% endif %}
    {% if paginer_obj.params.filter_fields %}
        <ul id="{{ id }}-filter_panel" class="filter-panel">
        </ul>
        <p>
            <button type="button" id="{{ id }}-add_filter_row"
                    class="add-filter-row">
                {% trans "Add filter" %}
            </button>
            <button type="button" id="{{ id }}-filter_button"
                    class="filter-button">
                {% trans "Apply filters" %}
            </button>
        </p>
    {% endif %}
{% endwith %}