Template source: website/products-search-products.html

{% extends "website/base.html" %}
{% load static website_tags kway_tags nav_tags %}

{% block description %}{% ktrans "seo_description_prodotti_cerca_prodotti" %}{% endblock %}
{% block keywords %}{% ktrans "seo_keywords_prodotti_cerca_prodotti" %}{% endblock %}

{% block header %}
{{ block.super }}
{% endblock %}

{% block content %}
{{ block.super }}
        <div class="page-prodotti">
        
            <div class="container-fluid">
                <header>
                    <div class="header-heading-wrapper">
                        <h1 class="heading">{{ nav_page.name }}</h1>
                    </div>
                </header>
            </div>
        
            <div class="container">
        
                <div class="row">
        
                    <div class="col-xs-12 col-sm-12 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 col-xl-10 col-xl-offset-1">
        
        
                        <!-- begin filtri di ricerca -->
                        <div class="element-row search-form">
                            <div class="row">
                                <div class="col-md-12 col-centered">
                                    <form method="GET" action="{% nav_url %}">
                                        <div class="row form-wrapper">
                                            <div class="col-sm-3">
                                                <label for="prodottiPeriodoSelect">{% ktrans "view" default="Visualizza" %}:</label>
                                                <select id="prodottiPeriodoSelect" class="form-control" name="periodo">
                                                    <!--<option value="tutti" {% if not catalog_periods_filter %}selected{% endif %}>Tutti</option>-->
                                                    {% for obj in catalog_periods %}
                                                    <option value="{{ obj.value }}" {% if obj.value == catalog_periods_filter.value or forloop.first and not catalog_periods_filter %}selected{% endif %}>{{ obj.label }}</option>
                                                    {% endfor %}
                                                </select>
                                            </div>
                                            <div class="col-sm-3">
                                                <label for="prodottiMarcaSelect">{% ktrans "brand" default="Marca" %}:</label>
                                                <select id="prodottiMarcaSelect" class="form-control" name="marca">
                                                    <option value="tutte" {% if not catalog_brand_filter %}selected{% endif %}>{% ktrans "brands_all" default="Tutte" %}</option>
                                                    {% for obj in catalog_brands %}
                                                    <option value="{{ obj.slug }}" {% if obj.slug == catalog_brand_filter.slug %}selected{% endif %}>{{ obj.name }}</option>
                                                    {% endfor %}
                                                </select>
                                            </div>
                                            <div class="col-sm-4">
                                                <label for="prodottiRicercaInput">{% ktrans "research" default="Ricerca" %}:</label>
                                                <input type="text" class="form-control" id="prodottiRicercaInput" placeholder="" name="testo" value="{% if catalog_text_filter %}{{ catalog_text_filter }}{% endif %}">
                                            </div>
                                            <div class="col-sm-2">
                                                <label class="hidden-xs">&nbsp;</label>
                                                <input class="btn btn-primary btn-block" type="submit" value="{% ktrans 'search' default='Cerca' %}">
                                            </div>
                                        </div>
        
                                        <div class="row form-wrapper">
                                            <div class="col-sm-12">
                                                <div class="checkbox-wrapper">
                                                    <label>
                                                        <input type="checkbox" id="prodottiDisponibiliCheckbox" name="disponibili" {% if catalog_available_filter %}checked{% endif %}> {% ktrans "products_only_available" default="Solo disponibili" %}
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <hr>
        
                                        {% if catalog_lists_pages_total %}
                                        <div class="row form-wrapper">
                                            <div class="col-sm-12">
                                                <label class="hidden-xs">&nbsp;</label>
                                            </div>
                                            <div class="col-sm-3">
                                                <label for="prodottiRecordSelect">{% ktrans "products_num_results" default="N. risultati per pagina" %}</label>
                                                <select id="prodottiRecordSelect" class="form-control" name="record">
                                                    {% for n in catalog_lists_page_records_options %}
                                                    <option value="{{ n }}" {% if n == catalog_lists_page_records %}selected{% endif %}>{{ n }} record</option>
                                                    {% endfor %}
                                                </select>
                                            </div>
        
                                            <div class="col-sm-4">
                                                <label class="hidden-xs">&nbsp;</label>
                                                <p class="results-number">{{ catalog_lists_updates|length }} {% ktrans "products_results" default="risultati" %} - <strong>{% ktrans "page" default="Pagina" %} {{ catalog_lists_page_num }}</strong> / {{ catalog_lists_pages_total }}</p>
                                            </div>
        
                                            <div class="col-sm-5">
                                                <label class="hidden-xs">&nbsp;</label>
                                                <ul class="pagination">
                                                    <li class="previous {% if not catalog_lists_has_prev_page %}disabled{% endif %}"><a href="{% nav_url pagina=catalog_lists_prev_page_num %}">{% ktrans "prev" default="Prev" %}</a></li>
                                                    <li class="next {% if not catalog_lists_has_next_page %}disabled{% endif %}"><a href="{% nav_url pagina=catalog_lists_next_page_num %}">{% ktrans "next" default="Next" %}</a></li>
                                                </ul>
                                            </div>
                                        </div>
                                        {% else %}
                                        <div class="row form-wrapper">
                                            <div class="col-sm-12">
                                                <p class="text-center">{% ktrans "products_no_results" default="Non è stato possibile trovare prodotti in base ai criteri di ricerca selezionati." %}</p>
                                            </div>
                                        </div>
                                        {% endif %}
        
        
                                    </form>
                                </div>
                            </div>
                        </div>
                        <!-- end filtri di ricerca -->
        
                        
                        {% if catalog_lists_pages_total %}
                        <!-- begin risultati di ricerca -->
                        <div class="element-row">
                            
                            {% if catalog_brand_filter %}
                            {% for obj in catalog_lists_updates|slice:"0:1" %}
                            {% if obj.image_url %}
                            <div class="row form-wrapper">
                                <div class="col-sm-12">
                                    <p><img src="{{ obj.image_url }}" alt="{{ obj.Marca }}"></p>
                                </div>
                            </div>
                            {% endif %}
                            {% endfor %}
                            {% endif %}
                            <div class="row">
                                <div class="col-xs-12">
        
                                    <table class="prodotti-table">
                                        <thead>
                                            <tr>
                                                <th>{% ktrans "prodotto" default="Prodotto" %}</th>
                                                <th>{% ktrans "descrizione" default="Descrizione" %}</th>
                                                <th>{% ktrans "marca" default="Marca" %}</th>
                                                <th>{% ktrans "codice" default="Codice" %}</th>
                                                <th>{% ktrans "listino" default="Listino" %}</th>
                                                <th>{% ktrans "disponibilita" default="Disponibilità" %}</th>
                                            </tr>
                                        </thead>
        
                                        <tbody>
                                            {% for obj in catalog_lists_updates %}
                                            <tr>
                                                <td><strong class="visible-xs">{% ktrans "prodotto" default="Prodotto" %}: </strong>{{ obj.Prodotto }}</td>
                                                <td><strong class="visible-xs">{% ktrans "descrizione" default="Descrizione" %}: </strong>{{ obj.DESCRIZIONE }}</td>
                                                <td><strong class="visible-xs">{% ktrans "marca" default="Marca" %}: </strong>{{ obj.Marca }}</td>
                                                <td><strong class="visible-xs">{% ktrans "codice" default="Codice" %}: </strong>{{ obj.Codice }}</td>
                                                <td><strong class="visible-xs">{% ktrans "listino" default="Listino" %}: </strong>{{ obj.VenditaPrezzoListino1 }}</td>
                                                <td><strong class="visible-xs">{% ktrans "disponibilita" default="Disponibilità" %}: </strong><span class="{% if obj.available %}disponibile{% else %}non-disponibile{% endif %}"></span></td>
                                            </tr>
                                            {% endfor %}
                                        </tbody>
                                    </table>
        
                                </div>
                            </div>
                        </div>
                        <!-- begin risultati di ricerca -->
                        
                        <!-- begin mobile bottom pagination -->
                        <div class="element-row search-form visible-xs">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-wrapper">
                                        <div class="col-sm-12">
                                            <ul class="pagination">
                                                <li class="previous {% if not catalog_lists_has_prev_page %}disabled{% endif %}"><a href="{% nav_url pagina=catalog_lists_prev_page_num %}">{% ktrans "prev" default="Prev" %}</a></li>
                                                <li class="next {% if not catalog_lists_has_next_page %}disabled{% endif %}"><a href="{% nav_url pagina=catalog_lists_next_page_num %}">{% ktrans "next" default="Next" %}</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- end mobile bottom pagination -->
                        {% endif %}
        
                    </div>
        
                </div>
        
            </div>
        
        </div>
{% endblock %}

{% block footer %}
{{ block.super }}
{% endblock %}