From fe832ea845f07a79b4580f7bca1dcf44b2f215ee Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 27 Mar 2010 16:15:20 -0500 Subject: Move package maintainer off of package model This is an attempt to fix our long-standing problems dealing with maintainer information. Move the actual maintainer information off of the package model into a PackageRelation object, which has some flexibility to later represent more than just maintainership. This solves multiple problems: * If a package gets accidentally deleted, so did the maintainer info * Testing packages have always shown up as orphans * With split packages, it was easy to miss some of the sub-packages This commit does not include the deletion of the original maintainer column; that will come at a later time when I feel more confident that the data was migrated correctly. Signed-off-by: Dan McGee --- templates/packages/details.html | 9 ++++++++- templates/packages/flagged.html | 2 +- templates/packages/search.html | 6 ++---- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index def07501..648b6483 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -49,7 +49,14 @@ {{ pkg.license }} Maintainer: - {% if pkg.maintainer %}{{ pkg.maintainer.get_full_name }}{% else %}None{% endif %} + {% with pkg.maintainers as maints %} + {% if maints %} + {% for m in maints %} + {{ m.get_full_name }}
+ {% endfor %} + {% else %}Orphan{% endif %} + + {% endwith %} Package Size: {{ pkg.compressed_size|filesizeformat }} diff --git a/templates/packages/flagged.html b/templates/packages/flagged.html index 64cb2452..3461bbda 100644 --- a/templates/packages/flagged.html +++ b/templates/packages/flagged.html @@ -3,6 +3,6 @@ {% block content %}

- {{pkg.pkgname}} on {{pkg.arch}} has already been flagged out of date. + {{pkg.pkgname}} has already been flagged out of date.

{% endblock %} diff --git a/templates/packages/search.html b/templates/packages/search.html index e760788e..4f7bc776 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -44,7 +44,7 @@ {% if paginator %} - @@ -77,7 +77,6 @@ - @@ -95,13 +94,12 @@ {% endif %} - {% endfor %} {% if paginator %} - -- cgit v1.2.3-2-g168b
+ {{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}. Name Version DescriptionMaintainer Last Updated
{{ pkg.pkgver }}-{{ pkg.pkgrel }}{{ pkg.pkgdesc }}{{ pkg.maintainer|default:"Orphan" }} {{ pkg.last_update|date:"Y-m-d" }}
+ {{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}.