diff options
author | Dan McGee <dan@archlinux.org> | 2010-08-27 10:04:00 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-08-27 10:04:00 -0500 |
commit | 538f57c7446397b44036a0f3e068b298a43e4d70 (patch) | |
tree | 516b276af709fd4395d0c5be8fcd4e91c6b10a3f /templates/todolists/public_list.html | |
parent | ff427f6d9bbcedebcdfc671bc13ab54a225b6cdf (diff) |
Make public todolist view more usefulrelease_2010-08-27
Show all the details the developer page does, make the lists always visible,
and add JS table sorting to each table on the page. This commit also adds
table sorting to the developer list view as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/todolists/public_list.html')
-rw-r--r-- | templates/todolists/public_list.html | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html index 72841200..fe5ffb5d 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -9,22 +9,46 @@ {% for list in todo_lists %} <h4>{{list.name}}</h4> <div class="todo_list"> - <p>{{list.description|safe}}</p> - <ul> - {% for pkg in list.packages %} - <li>{{pkg.pkg.pkgname}}</li> - {% endfor %} - </ul> + <p>{{list.description|safe|linebreaks}}</p> + <table "todo-pkglist-{{ list.id }}" class="results todo-table"> + <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 'odd' 'even' %}"> + <td><a href="{{ pkg.pkg.get_absolute_url }}" + title="View package details for {{ pkg.pkg.pkgname }}">{{ pkg.pkg.pkgname }}</a></td> + <td>{{ pkg.pkg.arch.name }}</td> + <td>{{ pkg.pkg.repo.name|capfirst }}</td> + <td>{{ pkg.pkg.maintainers|join:', ' }}</td> + <td> + {% if pkg.complete %} + <span class="complete">Complete</a> + {% else %} + <span class="incomplete">Incomplete</a> + {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> </div> {% endfor %} </div> </div> {% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> <script type="text/javascript"> - $("#public_todo_lists h4").click( - function(e) { - $(this).next().toggle(); - } - ); +$(document).ready(function() { + $(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]]}); +}); + </script> {% endblock %} |