{% load url from future %}

{% if drafts or suspended or waiting %}
<li class="nav-header">Demandes</li>
{% endif %}

{% if drafts %}
<ul class="nav nav-list">
    <li class="nav-header">Brouillons</li>
    {% for request in drafts %}
    {% url 'request_wizard' pk=request.pk as request_url %}
    {% url 'request_delete' pk=request.pk as delete_url %}
    <li><span><a href="{{ request_url }}">Demande #{{request.pk}}</a><a href="{{ delete_url }}" class="icon-remove-sign pull-right"></a></span></li>
    {% endfor %}
</ul>
{% endif %}
 
{% if suspended %}
<ul class="nav nav-list">
    <li class="nav-header">Demandes nécessitants une correction</li>
    {% for request in suspended %}
    {% url 'request_wizard' pk=request.pk as request_url %}
    {% url 'request_delete' pk=request.pk as delete_url %}
    <li><span><a href="{{ request_url }}">Demande #{{request.pk}}</a><a href="{{ delete_url }}" class="icon-remove-sign pull-right"></a></span></li>
    {% endfor %}
</ul>
{% endif %}

{% if waiting %}
<ul class="nav nav-list">
    <li class="nav-header">En cours de traitement</li>
    {% for request in waiting %}
    {% url 'request_wizard' pk=request.pk as request_url %}
    {% url 'request_delete' pk=request.pk as delete_url %}
    <li><span><a href="{{ request_url }}">Demande #{{request.pk}}</a><a href="{{ delete_url }}" class="icon-remove-sign pull-right"></a></span></li>
    {% endfor %}
</ul>
{% endif %}
