summaryrefslogtreecommitdiffstats
path: root/templates/todolists/view.html
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-05 22:26:48 +0200
committereliott <eliott@cactuswax.net>2008-04-05 22:26:48 +0200
commit1bac739c5cbf13163072d6929c43f686c4a828c9 (patch)
treefcd08ea803f82ce5810e4ecb281c56d46f05a8a2 /templates/todolists/view.html
parent5f7ea45989ec9a095d6b4b2b1c06e5f9f6630faf (diff)
downloadarchweb-1bac739c5cbf13163072d6929c43f686c4a828c9.tar.gz
archweb-1bac739c5cbf13163072d6929c43f686c4a828c9.tar.xz
Implemented todolist javascript sorting
Diffstat (limited to 'templates/todolists/view.html')
-rw-r--r--templates/todolists/view.html86
1 files changed, 60 insertions, 26 deletions
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index b77e6e7..8fe6014 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -1,33 +1,67 @@
{% 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">
<h3 class="title">ToDo List: {{ list.name }}</h2>
- <table class="results" width="100%">
- <tr>
- <th>ID</th>
- <th>Arch</th>
- <th>Repo</th>
- <th>Name</th>
- <th>Maintainer</th>
- <th>Status</th>
- </tr>
- {% for pkg in pkgs %}
- <tr class="{% cycle pkgr1,pkgr2 %}">
- <td><a href="/packages/{{ pkg.pkg.id }}/">{{ pkg.pkg.id }}</a></td>
- <td>{{ pkg.pkg.arch.name }}</td>
- <td>{{ pkg.pkg.repo.name }}</td>
- <td>{{ pkg.pkg.pkgname }}</td>
- <td>{{ pkg.pkg.maintainer.get_full_name }}</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 %}
+ <table id="todotable" class="results" width="100%">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>Arch</th>
+ <th>Repo</th>
+ <th>Name</th>
+ <th>Maintainer</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for pkg in pkgs %}
+ <tr class="{% cycle even,odd %}">
+ <td><a href="/packages/{{ pkg.pkg.id }}/">{{ pkg.pkg.id }}</a></td>
+ <td>{{ pkg.pkg.arch.name }}</td>
+ <td>{{ pkg.pkg.repo.name }}</td>
+ <td>{{ pkg.pkg.pkgname }}</td>
+ <td>{{ pkg.pkg.maintainer.get_full_name }}</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>
</div>
{% endblock %}