summaryrefslogtreecommitdiff
path: root/templates/packages/details_depend.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-06 23:34:29 -0600
committerDan McGee <dan@archlinux.org>2012-02-06 23:34:29 -0600
commit7977214c578ecde1dd6a0d99d60b83116ca3dfa9 (patch)
treedd037f7a783a392842add5880aa39af0ecd69164 /templates/packages/details_depend.html
parent33fe337d087126c6869b21791ff8e3ad6fe9e196 (diff)
Clean up details dependency display logic
This moves this lengthy conditional block of template into an include so it is a bit more manageable. This makes the fix for FS#28286, where provided optional dependencies were not displayed as expected. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages/details_depend.html')
-rw-r--r--templates/packages/details_depend.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/packages/details_depend.html b/templates/packages/details_depend.html
new file mode 100644
index 00000000..0226dd25
--- /dev/null
+++ b/templates/packages/details_depend.html
@@ -0,0 +1,15 @@
+{% load package_extras %}
+<li>
+{% ifequal depend.pkg None %}
+{% if depend.providers %}
+{{ depend.dep.depname }} <span class="virtual-dep">({% multi_pkg_details depend.providers %})</span>
+{% else %}
+{{ depend.dep.depname }} <span class="virtual-dep">(virtual)</span>
+{% endif %}
+{% else %}
+{% pkg_details_link depend.pkg %}{{ depend.dep.depvcmp|default:"" }}
+{% if depend.pkg.repo.testing %} <span class="testing-dep">(testing)</span>{% endif %}
+{% endifequal %}
+{% if depend.dep.optional %} <span class="opt-dep">(optional)</span>{% endif %}
+{% if depend.dep.description %}- <span class="dep-desc">{{ depend.dep.description }}</span>{% endif %}
+</li>