summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-08 00:25:32 -0600
committerDan McGee <dan@archlinux.org>2012-03-08 00:25:32 -0600
commit94be52f1bb320206524d2f0f4ad79968ca437727 (patch)
tree5aa29f68157380239890e5e2a9cee1ab7b65f0f4
parent0ad6a96019d8a713726b468369b4a6ef184b3018 (diff)
Only show package groups if they exist
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--templates/packages/details.html17
1 files changed, 7 insertions, 10 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 2482d1aa..e0dd7034 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -108,26 +108,23 @@
</tr><tr>
<th>License(s):</th>
<td>{{ pkg.licenses.all|join:", " }}</td>
- </tr><tr>
+ </tr>
+ {% with pkg.groups.all as groups %}{% if groups %}
+ <tr>
<th>Groups:</th>
- {% with pkg.groups.all as groups %}
- <td>{% if groups %}
- {% for g in groups %}
+ <td>{% for g in groups %}
<a href="/groups/{{ pkg.arch.name }}/{{ g.name }}/"
title="Group details for {{ g.name }}">{{ g.name }}</a><br/>
{% endfor %}
- {% else %}None{% endif %}
</td>
- {% endwith %}
</tr>
- {% with pkg.provides.all as provides %}
- {% if provides %}
+ {% endif %}{% endwith %}
+ {% with pkg.provides.all as provides %}{% if provides %}
<tr>
<th>Provides:</th>
<td>{% for p in provides %}{{ p.name }}{% if p.version %}={{ p.version }}{% endif %}<br/>{% endfor %}</td>
</tr>
- {% endif %}
- {% endwith %}
+ {% endif %}{% endwith %}
<tr>
<th>Maintainers:</th>
{% with pkg.maintainers as maints %}