summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/views.py20
-rw-r--r--templates/devel/index.html8
2 files changed, 8 insertions, 20 deletions
diff --git a/devel/views.py b/devel/views.py
index b3724795..e0e25e17 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -8,28 +8,20 @@ from archweb_dev.main.models import UserProfile, News
def index(request):
'''the Developer dashboard'''
- thismaint = request.user
-
- # get a list of incomplete package todo lists
todos = Todolist.objects.get_incomplete()
- # get flagged-package stats for all maintainers
- if thismaint:
- # get list of flagged packages for this maintainer
- pkgs = Package.objects.filter(
- maintainer=thismaint.id).filter(
- needupdate=True).order_by('repo', 'pkgname')
- else:
- pkgs = None
+ pkgs = Package.objects.filter(
+ maintainer=request.user).filter(
+ needupdate=True).order_by('repo', 'pkgname')
return render_response(
request, 'devel/index.html',
- {'pkgs': pkgs, 'todos': todos, 'maint': thismaint,
+ {'pkgs': pkgs, 'todos': todos, 'maint': request.user,
'repos': Repo.objects.all(), 'arches': Arch.objects.all(),
'maintainers':
- [User(id=0, first_name="Orphans")] + list(User.objects.all())
+ [User(id=0, username="orphan", first_name="Orphans")] + list(
+ User.objects.all())
})
-#@is_maintainer
def change_notify(request):
maint = User.objects.get(username=request.user.username)
notify = request.POST.get('notify', 'no')
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 887e3a9a..661db3c0 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -70,8 +70,8 @@
{% for maint in maintainers %}
<tr class="{% cycle pkgr2,pkgr1 %}">
<td><strong>{{ maint.get_full_name }}</strong></td>
- <td><a href="/packages/?maint={{ maint.id }}"><strong>{{ maint.maintained_packages.count }}</strong> packages</a></td>
- <td><a href="/packages/?maint={{ maint.id }}&flagged=Flagged"><strong>{{ maint.maintained_packages.flagged.count }}</strong> packages</a></td>
+ <td><a href="/packages/?maintainer={{ maint.username }}"><strong>{{ maint.maintained_packages.count }}</strong> packages</a></td>
+ <td><a href="/packages/?maintainer={{ maint.username }}&flagged=Flagged"><strong>{{ maint.maintained_packages.flagged.count }}</strong> packages</a></td>
</tr>
{% endfor %}
</table>
@@ -84,10 +84,6 @@
<table width="100%">
<tr>
<td style="vertical-align: top">
- {% if maint %}
- <a href="/packages/?maint={{ maint.id }}">My Packages</a><br />
- {% endif %}
- <a href="/packages/?maint=0">Orphan Packages</a><br />
<br />
<a
href="http://wiki.archlinux.org/index.php/DeveloperWiki:HOWTO_Be_A_Packager">Package Maintainer's Guide</a><br />