Factor out requiredby details into a template
This is similar to the previous commit doing the same for depends. We also add a '(staging)' text for use down the road. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
03a0d27971
commit
77f38be362
@ -185,13 +185,7 @@ <h3 title="{{ pkg.pkgname }} has the following dependencies">
|
||||
<h3 title="Packages that require {{ pkg.pkgname }}">
|
||||
Required By ({{rqdby|length}})</h3>
|
||||
{% if rqdby %}<ul>
|
||||
{% for req in rqdby %}
|
||||
<li>{% pkg_details_link req.pkg %}
|
||||
{% if req.depname != pkg.pkgname %}<span class="virtual-dep">(requires {{ req.depname }})</span>{% endif %}
|
||||
{% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
|
||||
{% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for req in rqdby %}{% include "packages/details_requiredby.html" %}{% endfor %}
|
||||
</ul>{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
@ -9,6 +9,7 @@
|
||||
{% else %}
|
||||
{% pkg_details_link depend.pkg %}{{ depend.dep.depvcmp|default:"" }}
|
||||
{% if depend.pkg.repo.testing %} <span class="testing-dep">(testing)</span>{% endif %}
|
||||
{% if depend.pkg.repo.staging %} <span class="staging-dep">(staging)</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 %}
|
||||
|
7
templates/packages/details_requiredby.html
Normal file
7
templates/packages/details_requiredby.html
Normal file
@ -0,0 +1,7 @@
|
||||
{% load package_extras %}
|
||||
<li>{% pkg_details_link req.pkg %}
|
||||
{% if req.depname != pkg.pkgname %}<span class="virtual-dep">(requires {{ req.depname }})</span>{% endif %}
|
||||
{% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
|
||||
{% if req.pkg.repo.staging %}<span class="staging-dep">(staging)</span>{% endif %}
|
||||
{% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %}
|
||||
</li>
|
Loading…
Reference in New Issue
Block a user