Bug#757349: tracker.debian.org: please sort binary packages
Control: tags -1 +patch
> the list of binary packages isn't sorted yet
It should be fixed by the attached patch.
Cheers,
Christophe
>From fc928008f96f39cce37c58170557879e5d21997b Mon Sep 17 00:00:00 2001
From: Christophe Siraut <d@tobald.eu.org>
Date: Mon, 11 Aug 2014 11:12:17 +0200
Subject: [PATCH 3/3] Sort binaries panel alphabetically.
---
distro_tracker/core/templates/core/panels/binaries.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/distro_tracker/core/templates/core/panels/binaries.html b/distro_tracker/core/templates/core/panels/binaries.html
index 451d3cb..cbb50e0 100644
--- a/distro_tracker/core/templates/core/panels/binaries.html
+++ b/distro_tracker/core/templates/core/panels/binaries.html
@@ -3,7 +3,8 @@
{% block panel-body %}
<ul class="list-group list-group-flush">
<div class="scrollable">
- {% for item in panel.context %}
+ {% with items=panel.context|dictsort:'name' %}
+ {% for item in items %}
<li class="list-group-item">
{% with url=item.url|default:"#" %}
<a href="{{ url }}" title="{{ item.repository_name }}">{{ item.name }}</a>
@@ -37,6 +38,7 @@
{% endif %}
</li>
{% endfor %}
+ {% endwith %}
</div>
</ul>
{% endblock %}
--
2.0.1
Reply to: