diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-09 23:16:00 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-09 23:16:00 -0500 |
commit | 156b91eb5935df4afdb8f0f0311d36537808c2f5 (patch) | |
tree | 2909539c99d6f71c547d8e501f9fa1ba9c424618 /templates/packages/details.html | |
parent | 21461e78608bb687d7101dd55e72d44cbebf2ff6 (diff) |
Use new package details link tag in templates
This replaces a lot of boilerplate we had everywhere, and makes sure
things like the title are consistent across all links.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages/details.html')
-rw-r--r-- | templates/packages/details.html | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html index 7972b9ab..8e3c0022 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load cache %} +{% load package_extras %} {% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} - Package Details{% endblock %} {% block navbarclass %}anb-packages{% endblock %} @@ -82,20 +83,14 @@ {% with pkg.split_packages as splits %}{% if splits %} <tr> <th>Split Packages:</th> - <td> - {% for s in splits %} - <a href="{{ s.get_absolute_url }}" - title="Package details for {{ s.pkgname }}">{{ s.pkgname }}</a><br/> - {% endfor %} - </td> + <td>{% for s in splits %}{% pkg_details_link s %}<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 }}" - title="Package details for {{ pkg.base_package.pkgname }}">{{ pkg.pkgbase }}</a></td> + <td>{% pkg_details_link pkg.base_package %}</td> {% else %} <td><a href="../{{ pkg.pkgbase }}/" title="Split package details for {{ pkg.pkgbase }}">{{ pkg.pkgbase }}</a></td> @@ -165,8 +160,7 @@ {% ifequal depend.pkg None %} <li>{{ depend.dep.depname }} <span class="virtual-dep">(virtual)</span></li> {% else %} - <li><a href="{{ depend.pkg.get_absolute_url }}" - title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}</a>{{ depend.dep.depvcmp|default:"" }} + <li>{% pkg_details_link depend.pkg %}{{ depend.dep.depvcmp|default:"" }} {% if depend.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %} {% if depend.dep.optional %}<span class="opt-dep">(optional)</span>{% endif %} {% if depend.dep.description %}- <span class="dep-desc">{{ depend.dep.description }}</span>{% endif %} @@ -188,8 +182,7 @@ {% if rqdby %} <ul> {% for req in rqdby %} - <li><a href="{{ req.pkg.get_absolute_url }}" - title="View package details for {{ req.pkg.pkgname }}">{{ req.pkg.pkgname }}</a> + <li>{% pkg_details_link req.pkg %} {% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %} {% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %} </li> |