diff options
author | Dan McGee <dan@archlinux.org> | 2010-07-06 05:22:19 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-07-06 05:22:19 +0200 |
commit | 85807311ca5545ea5e9d5a0170cf816269982348 (patch) | |
tree | 3d7c6a3859fc2961fef13a5ce3daeb1597fc7e01 | |
parent | cb9c74eff8f7c3469cc5e84477074c138ed555df (diff) | |
download | archweb-85807311ca5545ea5e9d5a0170cf816269982348.tar.gz archweb-85807311ca5545ea5e9d5a0170cf816269982348.tar.xz |
Show incomplete todo list packages in dev dashboard
Implements FS#20081.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | devel/views.py | 13 | ||||
-rw-r--r-- | templates/devel/index.html | 29 |
2 files changed, 38 insertions, 4 deletions
diff --git a/devel/views.py b/devel/views.py index 4215c0d..c600f08 100644 --- a/devel/views.py +++ b/devel/views.py @@ -9,7 +9,7 @@ from django.core.mail import send_mail from django.db.models import Q from django.views.decorators.cache import never_cache -from main.models import Package, Todolist +from main.models import Package, Todolist, TodolistPkg from main.models import Arch, Repo from main.models import UserProfile, News from main.models import Mirror @@ -25,14 +25,19 @@ pwletters = ascii_letters + digits def index(request): '''the Developer dashboard''' inner_q = PackageRelation.objects.filter(user=request.user).values('pkgbase') - packages = Package.objects.select_related('arch', 'repo').filter(needupdate=True) - packages = packages.filter(pkgbase__in=inner_q) + flagged = Package.objects.select_related('arch', 'repo').filter(needupdate=True) + flagged = flagged.filter(pkgbase__in=inner_q) + + todopkgs = TodolistPkg.objects.select_related( + 'pkg', 'pkg__arch', 'pkg__repo').filter(complete=False) + todopkgs = todopkgs.filter(pkg__pkgbase__in=inner_q) 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'), - 'flagged' : packages, + 'flagged' : flagged, + 'todopkgs' : todopkgs, } return render_to_response('devel/index.html', diff --git a/templates/devel/index.html b/templates/devel/index.html index d2dd155..cba9e76 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -60,6 +60,35 @@ </tbody> </table> + <h3>My Incomplete Todo List Packages</h3> + + <table id="dash-mytodolist" class="results dash-stats"> + <thead> + <tr> + <th>Todo List</th> + <th class="key">Name</th> + <th>Repo</th> + <th>Arch</th> + <th>Maintainer(s)</th> + </tr> + </thead> + <tbody> + {% for todopkg in todopkgs %} + <tr class="{% cycle 'odd' 'even' %}"> + <td><a href="{{ todopkg.list.get_absolute_url }}" + title="View todo list: {{ todopkg.list.name }}">{{ todopkg.list.name }}</a></td> + <td><a href="{{ todopkg.pkg.get_absolute_url }}" + title="View package details for {{ todopkg.pkg.pkgname }}">{{ todopkg.pkg.pkgname }}</a></td> + <td>{{ todopkg.pkg.repo.name }}</td> + <td>{{ todopkg.pkg.arch.name }}</td> + <td>{{ todopkg.pkg.maintainers|join:', ' }}</td> + </tr> + {% empty %} + <tr><td colspan="4"><em>No incomplete todo list packages to display</em></td></tr> + {% endfor %} + </tbody> + </table> + <form id="dash-pkg-notify" method="post" action="/devel/notify/">{% csrf_token %} <fieldset> <p><input id="notify" name="notify" type="checkbox" value="yes" |