{% extends "discounts/base.html" %}
{% load discount_tags %}
{% load tagging_tags %}
{% load category_tags %}
{% load base_tags %}
{% load base_filters %}
{% load i18n %}

{% block title %}{{ block.super }} {{ discount.discount_code }}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/discounts.css">
{% endblock %}

{% block body %}
{% tags_for_object discount as tags %}

<div class="t">
    {% discount_nav request.user discount %}
    
    <div class="discounts-wrap">
        <a href="{{ discount.get_absolute_url }}"><h1>{{ discount.discount_code }}</h1></a>
		<div class="content">
            <table>
                <tr>
                    <td class="label"><b>{% trans "Discount Code" %}:</b></td>
                    <td>{{ discount.discount_code }}</td>
                </tr>
                <tr>
                    <td class="label"><b>{% trans "Discount Value" %}:</b></td>
                    <td>{{ discount.value }}</td>
                </tr>
                <tr>
                    <td class="label"><b>{% trans "Number of uses" %}:</b></td>
                    <td> {{ discount.num_of_uses }} out of {{ discount.cap }} max</td>
                </tr>
                <tr>
                    <td class="label"><b>{% trans "Duration" %}:</b></td>
                    <td>{{ discount.start_dt }} to {{ discount.end_dt }}</td>
                </tr>
                <tr>
                    <td class="label"><b>{% trans "Still Available" %}:</b></td>
                    <td>{% if discount.available %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %}</td>
                </tr>
            </table>
		</div>
    </div>
</div>
{% endblock %}
