Bug#756955: Team package list is not alphabetically ordered
Control: tag -1 +patch
> the team package list is not alphabetically ordered.
Should be solved with the attached patch.
Cheers,
Christophe
>From cb5beb270a1a8468c80ff49871799a0f6a37c483 Mon Sep 17 00:00:00 2001
From: Christophe Siraut <d@tobald.eu.org>
Date: Mon, 11 Aug 2014 11:07:28 +0200
Subject: [PATCH 2/3] Sort team packages by name.
---
distro_tracker/core/templates/core/team.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/distro_tracker/core/templates/core/team.html b/distro_tracker/core/templates/core/team.html
index 6281db4..1472ec9 100644
--- a/distro_tracker/core/templates/core/team.html
+++ b/distro_tracker/core/templates/core/team.html
@@ -103,7 +103,8 @@
<div class="panel-body">
<ul class="list-group list-group-flush">
<div class="scrollable">
- {% for package in team.packages.all %}
+ {% with packages=team.packages.all|dictsort:'name' %}
+ {% for package in packages %}
<div class="row-fluid">
<li class="list-group-item">
<div class="span10">
@@ -121,6 +122,7 @@
</div>
</li>
{% endfor %}
+ {% endwith %}
</div>
</ul>
</div>
@@ -180,4 +182,4 @@
{% endblock %}
-{% endwith %}
\ No newline at end of file
+{% endwith %}
--
2.0.1
Reply to: