{% extends 'viewflow/base.html' %}
{% load i18n viewflow %}

{% block title %}{{ block.super}} | {{ flow_class.process_title }}{% endblock %}

{% block content %}
<h1>{{ flow_class.process_title }} {% trans 'Queue' %}</h1>

<table class="table bordered">
    <thead>
        <th>{% trans '#' %}</th>
        <th>{% trans 'Name' %}</th>
        <th class="span1">{% trans 'Started' %}</th>
        <th class="span1">{% trans 'Finished' %}</th>
        <th>{% trans 'Process' %}</th>
        <th>{% trans 'Status' %}</th>
    </thead>
    <tbody>
        {% for task in queue %}
        <tr>
            <td><a href="{% flowurl task user=request.user %}?back={{ request.get_full_path|urlencode }}">{{ task.process.id }}/{{ task.id }}</a></td>
            <td>{{ task.flow_task }}</td>
            <td>{{ task.created }}</td>
            <td>{{ task.finished|default:"" }}</td>
            <td><a href="{% flowurl task.process 'detail' %}">{{ task.process }}</td>
            <td>{% trans task.status %}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}

