summaryrefslogtreecommitdiff
path: root/templates/todolists/list.html
blob: 983a49f09e86f010112b47cf4e607e506aa06a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% extends "base.html" %}
{% load cycle from future %}
{% load static from staticfiles %}

{% block title %}Arch Linux - Todo Lists{% endblock %}

{% block content %}
<div id="dev-todo" class="box">

    <h2>Package Todo Lists</h2>

    {% if perms.todolists.add_todolist %}<ul class="admin-actions">
        <li><a href="/todo/add/" title="Add new todo list">Add Todo List</a></li>
    </ul>{% endif %}

    <p>Todo lists are used by the developers when a rebuild of a set of
    packages is needed. This is common when a library has a version bump,
    during a toolchain rebuild, or a general cleanup of packages in the
    repositories. The progress can be tracked here, and completed todo lists
    can be browsed as well.</p>

    {% include "todolists/paginator.html" %}

    <table id="dev-todo-lists" class="results todo-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Creation Date</th>
                <th>Creator</th>
                <th>Description</th>
                <th>Package Count</th>
                <th>Incomplete Count</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            {% for list in lists %}
            <tr class="{% cycle 'odd' 'even' %}">
                <td><a href="{{ list.get_absolute_url }}"
                        title="View todo list: {{ list.name }}">{{ list.name }}</a></td>
                <td>{{ list.created|date }}</td>
                <td>{{ list.creator.get_full_name }}</td>
                <td class="wrap">{{ list.description|urlize }}</td>
                <td>{{ list.pkg_count }}</td>
                <td>{{ list.incomplete_count }}</td>
                <td>{% ifequal list.incomplete_count 0 %}<span class="complete">Complete</span>
                    {% else %}<span class="incomplete">Incomplete</span>{% endifequal %}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>

    {% include "todolists/paginator.html" %}
</div>
{% endblock %}

{% block script_block %}
{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
    // I'm not sure why it didn't autodetect digit, but it has to be explicit
    // http://stackoverflow.com/questions/302749/jquery-tablesorter-problem
    $(".results").tablesorter({widgets: ['zebra'], sortList: [[6, 1], [1, 1]],
        headers: { 4: { sorter: 'digit' }, 5: { sorter: 'digit' } } });
});
</script>
{% endblock %}