summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/views.py4
-rw-r--r--templates/packages/search.html3
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/views.py b/packages/views.py
index 40e8a08e..283f9cec 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -199,7 +199,7 @@ def search(request, page=None):
if packages.count() == 1:
return redirect(packages[0])
- allowed_sort = ["arch", "repo", "pkgname", "last_update"]
+ allowed_sort = ["arch", "repo", "pkgname", "last_update", "flag_date"]
allowed_sort += ["-" + s for s in allowed_sort]
sort = request.GET.get('sort', None)
# TODO: sorting by multiple fields makes using a DB index much harder
@@ -208,7 +208,7 @@ def search(request, page=None):
request.GET['sort'], 'repo', 'arch', 'pkgname')
page_dict['sort'] = sort
else:
- packages = packages.order_by('repo', 'arch', '-last_update', 'pkgname')
+ packages = packages.order_by('pkgname')
return list_detail.object_list(request, packages,
template_name="packages/search.html",
diff --git a/templates/packages/search.html b/templates/packages/search.html
index c3f70fa6..4a779aa0 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -84,6 +84,8 @@
<th>Description</th>
<th><a href="/packages/{% buildsortqs "-last_update" %}"
title="Sort packages by last update">Last Updated</a></th>
+ <th><a href="/packages/{% buildsortqs "-flag_date" %}"
+ title="Sort packages by when marked-out of-date">Flag Date</a></th>
</tr>
</thead>
<tbody>
@@ -103,6 +105,7 @@
{% endif %}
<td class="wrap">{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date }}</td>
+ <td>{{ pkg.flag_date|date }}</td>
</tr>
{% endfor %}
</tbody>