summaryrefslogtreecommitdiff
path: root/templates/todolists/view.html
blob: a1a82a41b759b0d133d51cf8799cb79cc8c95509 (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
69
70
71
72
73
74
75
76
77
78
{% extends "base.html" %}
{% block head %}
<script type="text/javascript" src="/media/jquery-1.2.3.min.js"></script>
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
    $(document).ready(
        function(){
            $("#todotable").tablesorter({widgets: ['zebra']});
        }
    );
</script>
<style type="text/css">
    table#todotable thead tr .header {
        background-image: url('/media/bg.gif');
        background-repeat: no-repeat;
        background-position: center right;
        cursor: pointer;
    }
    table#todotable thead tr .headerSortUp {
        background-image: url('/media/asc.gif');
    }
    table#todotable thead tr .headerSortDown {
        background-image: url('/media/desc.gif');
    }
    table#todotable thead tr .headerSortDown, table.todotable thead tr .headerSortUp {
        background-color: #8dbdd8;
    }
    table#todotable tbody tr.odd {
        background-color: #eee4cb;
    }
</style>
{% endblock %}
{% block content %}
	<div class="greybox">
            <div style="float:right">
                {% if perms.todolist.delete_todolist %}
                    <a href="/todo/delete/{{list.id}}/">Delete Todo List</a> | 
                {% endif %}
                {% if perms.todolists.change_todolist %}
                    <a href="/todo/edit/{{list.id}}/">Edit Todo List</a>
                {% endif %}
            </div>
		<h2 class="title">ToDo List: {{ list.name }}</h2>
		<table id="todotable" class="results" width="100%">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Arch</th>
                    <th>Repo</th>
                    <th>Maintainer</th>
                    <th>Status</th>
                </tr>
            </thead>
            <tbody>
            {% for pkg in list.packages %}
                <tr class="{% cycle even,odd %}">
                    <td><a href="/packages/{{ pkg.pkg.id }}/">{{ pkg.pkg.pkgname }}</a></td>
                    <td>{{ pkg.pkg.arch.name }}</td>
                    <td>{{ pkg.pkg.repo.name|capfirst }}</td>
                    <td>{{ pkg.pkg.maintainer.get_full_name|default:"Orphan" }}</td>
                    <td>
                    {% if pkg.complete %}
                        <a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"><span style="color:blue">Complete</span></a>
                    {% else %}
                        <a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"><span style="color:red">Incomplete</span></a>
                    {% endif %}
                    </td>
                </tr>
            {% endfor %}
            </tbody>
		</table>
        <br />
        <div class="box">
            <h3>List Description</h3>
            {{list.description}}
        </div>
	</div>
{% endblock %}