From 408288719e7515ac01c6eb81a5a2d9a1c63a62bc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 9 Jun 2010 16:16:45 -0500 Subject: Enhance base package listing in package details Add two methods to the package class, base_package() and split_packages(), that allow us to grab other related packages to one we are interested in. This allows us to list the Base Package on the package details page as a link. With the split_packages() method, we can also now list and link all sub-packages on the package details page; e.g. for 'kernel26' we can now link through to 'kernel26-firmware' and 'kernel26-headers'. Signed-off-by: Dan McGee --- templates/packages/details.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/packages/details.html b/templates/packages/details.html index 247b6344..e52a0052 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -50,10 +50,29 @@ Repository: {{ pkg.repo.name|capfirst }} - {% ifnotequal pkg.pkgname pkg.pkgbase %} - Base Package Name: + + {% ifequal pkg.pkgname pkg.pkgbase %} + {% with pkg.split_packages as splits %}{% if splits %} + + Split Packages: + + {% for s in splits %} + {{ s.pkgname }}
+ {% endfor %} + + + {% endif %}{% endwith %} + {% else %} + + Base Package: + {% if pkg.base_package %} + {{ pkg.pkgbase }} + {% else %} {{ pkg.pkgbase }} - {% endifnotequal %} + {% endif %} + + {% endifequal %} + Description: {% if pkg.pkgdesc %}{{ pkg.pkgdesc }}{% endif %} -- cgit v1.2.3