summaryrefslogtreecommitdiff
path: root/templates/packages/details.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-06-09 16:16:45 -0500
committerDan McGee <dan@archlinux.org>2010-06-09 16:16:45 -0500
commit408288719e7515ac01c6eb81a5a2d9a1c63a62bc (patch)
tree875d67a208b0948b070e56aa7827aa955285db03 /templates/packages/details.html
parentd199ac33b2ae0235cd7717b93d0c49cbbeabc7f2 (diff)
Enhance base package listing in package detailsrelease_2010-06-10
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 <dan@archlinux.org>
Diffstat (limited to 'templates/packages/details.html')
-rw-r--r--templates/packages/details.html25
1 files changed, 22 insertions, 3 deletions
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 @@
<th>Repository:</th>
<td><a href="/packages/?repo={{ pkg.repo.name|capfirst }}"
title="Browse the {{ pkg.repo.name|capfirst }} repository">{{ pkg.repo.name|capfirst }}</a></td>
- </tr>{% ifnotequal pkg.pkgname pkg.pkgbase %}<tr>
- <th>Base Package Name:</th>
+ </tr>
+ {% ifequal pkg.pkgname pkg.pkgbase %}
+ {% with pkg.split_packages as splits %}{% if splits %}
+ <tr>
+ <th>Split Packages:</th>
+ <td>
+ {% for s in splits %}
+ <a href="{{ s.get_absolute_url }}">{{ s.pkgname }}</a><br/>
+ {% endfor %}
+ </td>
+ </tr>
+ {% endif %}{% endwith %}
+ {% else %}
+ <tr>
+ <th>Base Package:</th>
+ {% if pkg.base_package %}
+ <td><a href="{{ pkg.base_package.get_absolute_url }}">{{ pkg.pkgbase }}</a></td>
+ {% else %}
<td>{{ pkg.pkgbase }}</td>
- </tr>{% endifnotequal %}<tr>
+ {% endif %}
+ </tr>
+ {% endifequal %}
+ <tr>
<th>Description:</th>
<td>{% if pkg.pkgdesc %}{{ pkg.pkgdesc }}{% endif %}</td>
</tr><tr>