{% extends 'silk/base/root_base.html' %}
{% load inclusion %}

{% block menu %}
{% root_menu request %}
{% endblock %}

{% block filter %}
    <form id="filter-form" action="." method="get"></form>
    <div class="menu-item">
        <div class="menu-item-outer">
            <div class="menu-item-inner">
                <label>Path:
                    <select name="path" form="filter-form" onchange="this.form.submit();">
                        {% for option in options_paths %}
                            <option value="{{ option }}"
                                    {% if option == path %}selected{% endif %}>{{ option }}</option>
                        {% endfor %}
                    </select>
                </label>
            </div>
        </div>
    </div>
    <div class="menu-item ">
        <div class="menu-item-outer">
            <div class="menu-item-inner">
                <label>Show:
                    <select name="show" form="filter-form" onchange="this.form.submit();">
                        {% for option in options_show %}
                            <option value="{{ option }}"
                                    {% if option == show %}selected{% endif %}>{{ option }}</option>
                        {% endfor %}
                    </select>
                </label>
            </div>
        </div>
    </div>
    <div class="menu-item">
        <div class="menu-item-outer">
            <div class="menu-item-inner">
                <label>Order:
                    <select name="order_by" form="filter-form" onchange="this.form.submit();">
                        {% for option in options_order_by %}
                            <option value="{{ option }}"
                                    {% if option == order_by %}selected{% endif %}>{{ option }}</option>
                        {% endfor %}
                    </select>
                </label>
            </div>
        </div>
    </div>
{% endblock %}

{% block data %}
    {% if results %}
        {% for silk_request in results %}
            <a href="{% url "silk:request_detail" request_id=silk_request.pk %}">
                {% request_summary silk_request %}
            </a>
        {% endfor %}
    {% endif %}
{% endblock %}
