mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs: show link to other distro comparison pages
If other distro comparison package(s) exist for a recipe being shown in the RRS recipe detail page, link to the page for each package as well as any extra URLs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
383d043f1e
commit
99c7f0b916
2
TODO
2
TODO
|
@ -62,5 +62,3 @@ RRS:
|
|||
* We only list recipes that have upgrade info (an earlier design decision) - should we list all?
|
||||
* Replace "All" with "(all)" and "No maintainer" with "(no maintainer)"?
|
||||
* Link to upstream changelogs? (will require per-recipe variable)
|
||||
* Link to other distro comparisons?
|
||||
* Link to other distro package info pages?
|
||||
|
|
|
@ -465,6 +465,9 @@ class Recipe(models.Model):
|
|||
eu = ExtraURL(name=item.name, url=item.render_url(self))
|
||||
yield eu
|
||||
|
||||
def comparison_recipes(self):
|
||||
return ClassicRecipe.objects.filter(cover_layerbranch=self.layerbranch).filter(cover_pn=self.pn)
|
||||
|
||||
def __str__(self):
|
||||
return os.path.join(self.filepath, self.filename)
|
||||
|
||||
|
|
|
@ -215,10 +215,21 @@
|
|||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if recipe_distros %}
|
||||
{% if recipe_distros or recipe.comparison_recipes.exists %}
|
||||
<dt>Distributions</dt>
|
||||
<dd>
|
||||
<ul class="unstyled">
|
||||
{% for cr in recipe.comparison_recipes %}
|
||||
<li><a href="{% url 'comparison_recipe' cr.id %}">{{ cr.layerbranch.branch }} - {{ cr.pn }}</a>
|
||||
{% if cr.extra_urls %}
|
||||
<ul>
|
||||
{% for extra_url in cr.extra_urls %}
|
||||
<li><a href="{{ extra_url.url }}">{{ extra_url.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for d in recipe_distros %}
|
||||
<li>{{ d }}</li>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user