diff options
-rw-r--r-- | devel/views.py | 13 | ||||
-rw-r--r-- | templates/devel/index.html | 13 | ||||
-rw-r--r-- | templates/devel/mirrorlist.html | 8 | ||||
-rw-r--r-- | templates/packages/differences.html | 7 | ||||
-rw-r--r-- | templates/packages/signoffs.html | 7 | ||||
-rw-r--r-- | templates/todolists/list.html | 10 |
6 files changed, 46 insertions, 12 deletions
diff --git a/devel/views.py b/devel/views.py index 5f4bcb94..192a4572 100644 --- a/devel/views.py +++ b/devel/views.py @@ -26,16 +26,17 @@ def index(request): '''the Developer dashboard''' inner_q = PackageRelation.objects.filter(user=request.user).values('pkgbase') flagged = Package.objects.select_related('arch', 'repo').filter(flag_date__isnull=False) - flagged = flagged.filter(pkgbase__in=inner_q) + flagged = flagged.filter(pkgbase__in=inner_q).order_by('pkgname') todopkgs = TodolistPkg.objects.select_related( 'pkg', 'pkg__arch', 'pkg__repo').filter(complete=False) - todopkgs = todopkgs.filter(pkg__pkgbase__in=inner_q) + todopkgs = todopkgs.filter(pkg__pkgbase__in=inner_q).order_by('list__name', 'pkg__pkgname') page_dict = { - 'todos': Todolist.objects.incomplete(), - 'repos': Repo.objects.all(), 'arches': Arch.objects.all(), - 'maintainers': User.objects.filter(is_active=True).order_by('last_name'), + 'todos': Todolist.objects.incomplete().order_by('-date_added'), + 'repos': Repo.objects.all(), + 'arches': Arch.objects.all(), + 'maintainers': User.objects.filter(is_active=True).order_by('first_name', 'last_name'), 'flagged' : flagged, 'todopkgs' : todopkgs, } @@ -82,7 +83,7 @@ def change_profile(request): @login_required def mirrorlist(request): - mirrors = Mirror.objects.select_related().all() + mirrors = Mirror.objects.select_related().order_by('tier', 'country') return render_to_response('devel/mirrorlist.html', RequestContext(request, {'mirror_list': mirrors})) diff --git a/templates/devel/index.html b/templates/devel/index.html index 02dd369c..0a2167e6 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -189,11 +189,18 @@ </div><!-- #dash-by-maintainer --> {% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> <script type="text/javascript"> +$(document).ready(function() { + $("#dash-todo").tablesorter({sortList: [[1,1]]}); + $("#dash-myflagged").tablesorter({sortList: [[0,0]]}); + $("#dash-mytodolist").tablesorter({sortList: [[0,0], [1,0]]}); + $("#stats-by-arch").tablesorter({sortList: [[0,0]]}); + $("#stats-by-repo").tablesorter({sortList: [[0,0]]}); + $("#stats-by-maintainer").tablesorter({sortList: [[0,0]]}); $("h3.dash-stats").click( - function(e) { - $(this).next().toggle(); - } + function(e) { $(this).next().toggle(); } ); +}); </script> {% endblock %} diff --git a/templates/devel/mirrorlist.html b/templates/devel/mirrorlist.html index 5084ccac..b9ad8f48 100644 --- a/templates/devel/mirrorlist.html +++ b/templates/devel/mirrorlist.html @@ -38,6 +38,12 @@ {% endfor %} </tbody> </table> - </div> +{% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + $(".results").tablesorter({sortList: [[1,0], [2,0]]}); +}); +</script> {% endblock %} diff --git a/templates/packages/differences.html b/templates/packages/differences.html index bc749016..337dcd73 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -33,5 +33,12 @@ </tbody> </table> </div> +{% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + $(".results").tablesorter({sortList: [[1,0], [0,0]]}); +}); +</script> {% endif %} {% endblock %} diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index 3040f453..dd7a8a75 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -47,5 +47,12 @@ </tbody> </table> </div> +{% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + $(".results").tablesorter({sortList: [[1,0]]}); +}); +</script> {% endif %} {% endblock %} diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 60e347dc..bbd39f34 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -36,6 +36,12 @@ {% endfor %} </tbody> </table> - -</div><!-- #dev-todo --> +</div> +{% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + $(".results").tablesorter({sortList: [[1,1]]}); +}); +</script> {% endblock %} |