{% extends "layout.html" %}


{% load i18n %}
{% load product_tags %}

{% block title %}
{{ offer.name }} | {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
<ul class="breadcrumb">
    <li>
	<a href="{{ homepage_url }}">{% trans "Home" %}</a>
        <span class="divider">/</span>
    </li>
    <li>
        <a href="{% url 'offer:list' %}">{% trans "Offers" %}</a>
        <span class="divider">/</span>
    </li>
    <li class="active">{{ offer.name }}</li>
</ul>
{% endblock %}

{% block headertext %}{{ offer.name }}{% endblock %}

{% block content %}

    {% if not offer.is_available %}
        <div class="alert alert-error">{% trans " This offer is no longer available." %}</div>
    {% endif %}

    {% if upsell_message %}
    <div class="well">
        {% if offer.description %}
            <p>{{ offer.description|safe }}</p>
            <hr/>
        {% endif %}
        <h3><i class="icon-exclamation-sign icon-large"></i> {% trans "What you need to do" %}</h3>
        <p>{{ upsell_message }}</p>
    </div>
    {% endif %}

    {% if products %}
        <section>
            <div>
                {% include "partials/pagination.html" %}
                <ol class="row-fluid">
                    {% for product in products %}
                    <li class="span2 {% if forloop.counter0|divisibleby:"6" %}no-margin{% endif %}">{% render_product product %}</li>
                    {% endfor %}
                </ol>
                {% include "partials/pagination.html" %}
            </div>
        </section>
    {% else %}
    <p class="nonefound">{% trans "No products found." %}</p>
    {% endif %}
{% endblock content %}
