{% extends 'base.html' %}

{% load i18n ska_tags %}

{% block content %}
    <h1>{% trans "Foo listing" %}</h1>
    <p>
        {% blocktrans %}
        Below you can see the list of URLs, divided into 3 categories: (1) Fail, (2) success, (3) success
        (class based) and (4) signed with template tag. Fail URLs obviously fail (401 Unauthorized). The
        other three should work.
        {% endblocktrans %}
    </p>
    <table>
        <thead>
            <tr>
                <td><strong>{% trans "Fail" %}</strong></td>
                <td><strong>{% trans "Success (signed with decorator, decorator validation)" %}</strong></td>
                <td><strong>{% trans "Success (signed with decorator, class based decorator validation)" %}</strong></td>
                <td><strong>{% trans "Success (signed with templatetag)" %}</strong></td>
            </tr>
        </thead>
        <tbody>
        {% for item in items%}
        <tr>
            <td><a href="{{ item.get_absolute_url }}" class="unsigned">{{ item }}</a></td>
            <td><a href="{{ item.get_signed_absolute_url }}" class="signed">{{ item }}</a></td>
            <td><a href="{{ item.get_signed_class_based_absolute_url }}" class="signed">{{ item }}</a></td>
            <td><a href="{% sign_url item.get_absolute_url as item_signed_absolute_url %}{{ item_signed_absolute_url }}" class="signed">{{ item }}</a></td>
        </tr>
        {% endfor %}
        </tbody>
    </table>

{% endblock content %}
