{% load i18n lfs_tags %}
{% if products %}
    <table id="livesearch-results-table">
        {% for product in products %}
            <tr class="{% cycle 'even' 'odd' %}"
                onclick="window.location='{{ product.get_absolute_url }}'">
                <td class="image">
                    {% if product.get_image %}
                        <a href="{{ product.get_absolute_url }}">
                            <img src="{{ product.get_image.url_60x60 }}"
                                 alt="{{ product.get_name }}"
                                 title="{{ product.get_name }}" />
                        </a>
                    {% endif %}
                </td>
                <td class="text">
                    <a href="{{ product.get_absolute_url }}">
                        {{ product.get_name }} 
                    </a>
                    <div>
                        {{ product.short_description|safe }}
                    </div>
                    {% for property in product.get_displayed_properties %}
                        <div>
                            {{ property.title }} : {{ property.value }} {{ property.unit|safe }}
                        </div>
                    {% endfor %}
                </td>
                <td class="number"
                    nowrap="nowrap">
                    {{ product.get_price|currency }}* {% if product.price_unit %}/ {{ product.price_unit }}{% endif %}
                </td>
            </tr>
        {% endfor %}
        <tr>
            <td class="all-results"
                colspan="3">
                <a href="{% url lfs_search %}?q={{ q }}">
                    {% trans 'All results' %} ({{ total }})
                </a>
            </td>
        </tr>
    </table>
{% else %}
    <p>{% trans 'No products found' %}</p>
{% endif %}
