{% extends "base_theme.html" %}
{% load re_paginator render_form %}
{% block content %}
    <div class="row">
        <div class="col-md-4">
            {% get_search_form %}
        </div>

        <div class="col-md-8">
            <div class="row">
                <div class="col-md-4 select_height"> Mostrando {{ page_obj.start_index }} - {{ page_obj.end_index }}
                    de {{ paginator.count }} resultados
                </div>
                <div class="pull-right">
                    <form action="{% url 'properties_for_sale' %}" id="form-sort">
                        Ordenar por :
                        <select id="sort" name="sort" class="col-md-3">
                            <option value="price">Precio: Ascendente</option>
                            <option value="-price"{% if request.GET.sort == '-price' %}
                                    selected="selected"{% endif %}>
                                Precio: Descendente
                            </option>
                        </select>
                    </form>
                </div>
            </div>


            {% include 'includes/listing_grid.html' %}


            {# pagination #}
            <div class="pagination pagination-centered">
                {% pagination_url page_obj %}
            </div>
            {# pagination #}

        </div>
    </div>
{% endblock %}