summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-05-10 18:42:00 -0500
committerDan McGee <dan@archlinux.org>2013-05-10 18:44:25 -0500
commitdad70d0d7c70e7973cd9e3960b24e7f9ef883c61 (patch)
tree548db62f1c70eceb837bd0d1c64a54c9bbd3aebd
parentac1c00ee86cc0e355af5e4e6be47ca861091356b (diff)
downloadarchweb-dad70d0d7c70e7973cd9e3960b24e7f9ef883c61.tar.gz
archweb-dad70d0d7c70e7973cd9e3960b24e7f9ef883c61.zip
Add a 'last touched by' column to todolist detail view
This allows you to see very easily who last manipulated a package todolist item in case you have a need to know. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--templates/todolists/view.html2
-rw-r--r--todolists/models.py3
-rw-r--r--todolists/views.py5
3 files changed, 7 insertions, 3 deletions
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index fc4b29ea..b26cd91c 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -68,6 +68,7 @@
<th>Staging Version</th>
<th>Maintainers</th>
<th>Status</th>
+ <th>Last Touched By</th>
</tr>
</thead>
<tbody>
@@ -95,6 +96,7 @@
<span class="{{ pkg.status_css_class }}">{{ pkg.get_status_display }}</span>
{% endif %}
</td>
+ <td>{{ pkg.user|default:"" }}</td>
</tr>
{% endfor %}
</tbody>
diff --git a/todolists/models.py b/todolists/models.py
index 3ea80f37..59b14616 100644
--- a/todolists/models.py
+++ b/todolists/models.py
@@ -47,7 +47,8 @@ class Todolist(models.Model):
if not hasattr(self, '_packages'):
self._packages = self.todolistpackage_set.filter(
removed__isnull=True).select_related(
- 'pkg', 'repo', 'arch').order_by('pkgname', 'arch')
+ 'pkg', 'repo', 'arch', 'user__username').order_by(
+ 'pkgname', 'arch')
return self._packages
diff --git a/todolists/views.py b/todolists/views.py
index d5b39934..ff75686d 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -71,12 +71,13 @@ def view(request, slug):
attach_staging(todolist.packages(), todolist.pk)
arches = {tp.arch for tp in todolist.packages()}
repos = {tp.repo for tp in todolist.packages()}
- return render(request, 'todolists/view.html', {
+ context = {
'list': todolist,
'svn_roots': svn_roots,
'arches': sorted(arches),
'repos': sorted(repos),
- })
+ }
+ return render(request, 'todolists/view.html', context)
def list_pkgbases(request, slug, svn_root):