Link to provides/conflicts/replacements if we can in details template
Use the newly implemented get_best_satisfier() method that is in the abstract base class for all of these types. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
158be107e4
commit
1625cd31c3
@ -120,22 +120,22 @@ <h4>Versions Elsewhere</h4>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}{% endwith %}
|
||||
{% with pkg.provides.all as provides %}{% if provides %}
|
||||
{% with pkg.provides.all as all_related %}{% if all_related %}
|
||||
<tr>
|
||||
<th>Provides:</th>
|
||||
<td class="wrap">{{ provides|join:", " }}</td>
|
||||
<td class="wrap">{% include "packages/details_relatedto.html" %}</td>
|
||||
</tr>
|
||||
{% endif %}{% endwith %}
|
||||
{% with pkg.conflicts.all as conflicts %}{% if conflicts %}
|
||||
{% with pkg.conflicts.all as all_related %}{% if all_related %}
|
||||
<tr>
|
||||
<th>Conflicts:</th>
|
||||
<td class="wrap">{{ conflicts|join:", " }}</td>
|
||||
<td class="wrap">{% include "packages/details_relatedto.html" %}</td>
|
||||
</tr>
|
||||
{% endif %}{% endwith %}
|
||||
{% with pkg.replaces.all as replaces %}{% if replaces %}
|
||||
{% with pkg.replaces.all as all_related %}{% if all_related %}
|
||||
<tr>
|
||||
<th>Replaces:</th>
|
||||
<td class="wrap">{{ replaces|join:", " }}</td>
|
||||
<td class="wrap">{% include "packages/details_relatedto.html" %}</td>
|
||||
</tr>
|
||||
{% endif %}{% endwith %}
|
||||
<tr>
|
||||
|
10
templates/packages/details_relatedto.html
Normal file
10
templates/packages/details_relatedto.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% load package_extras %}
|
||||
{% for related in all_related %}
|
||||
{% with related.get_best_satisfier as best_satisfier %}
|
||||
{% ifequal best_satisfier None %}
|
||||
{{ related.name }}{{ related.comparison|default:"" }}{{ related.version|default:"" }}{% if not forloop.last %}, {% endif %}
|
||||
{% else %}
|
||||
{% pkg_details_link best_satisfier %}{{ related.comparison|default:"" }}{{related.version|default:"" }}{% if not forloop.last %}, {% endif %}
|
||||
{% endifequal %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user