mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Add links to other branch recipes in recipe detail
Add links to the same recipe in other branches in the recipe detail page (and RRS recipe detail page) so that you can see which versions are available in other branches and drill down to the detail if you want to. Implements [YOCTO #13019]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
eeffb2d675
commit
0929289465
|
@ -974,6 +974,7 @@ class RecipeDetailView(DetailView):
|
|||
if dep.path.endswith('.inc'):
|
||||
extrafiles.append(dep)
|
||||
context['extrafiles'] = extrafiles
|
||||
context['otherbranch_recipes'] = Recipe.objects.filter(layerbranch__layer=recipe.layerbranch.layer, layerbranch__branch__comparison=False, pn=recipe.pn).order_by('layerbranch__branch__sort_priority')
|
||||
return context
|
||||
|
||||
|
||||
|
|
|
@ -740,6 +740,8 @@ class RecipeDetailView(DetailView):
|
|||
|
||||
context['recipe_distros'] = RecipeDistro.get_distros_by_recipe(recipe)
|
||||
|
||||
context['otherbranch_recipes'] = Recipe.objects.filter(layerbranch__layer=recipe.layerbranch.layer, layerbranch__branch__comparison=False, pn=recipe.pn).order_by('layerbranch__branch__sort_priority')
|
||||
|
||||
return context
|
||||
|
||||
class MaintainerList():
|
||||
|
|
|
@ -222,6 +222,33 @@
|
|||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if otherbranch_recipes %}
|
||||
<h2>Other branches</h2>
|
||||
<p>This recipe in other branches of {{ recipe.layerbranch.layer.name }}:</p>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">Branch</th>
|
||||
<th>Recipe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for other in otherbranch_recipes %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ other.layerbranch.branch }}
|
||||
</td>
|
||||
<td>
|
||||
{% if other == recipe %}
|
||||
{{ other.pn }} {{ other.pv }} (this recipe)
|
||||
{% else %}
|
||||
<a href="{% url 'recipe' other.id %}">{{ other.pn }} {{ other.pv }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -144,6 +144,33 @@
|
|||
{% else %}
|
||||
<p>None</p>
|
||||
{% endif %}
|
||||
|
||||
{% if otherbranch_recipes %}
|
||||
<h2>Other branches</h2>
|
||||
<p>This recipe in other branches of {{ recipe.layerbranch.layer.name }}:</p>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">Branch</th>
|
||||
<th>Recipe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for other in otherbranch_recipes %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ other.layerbranch.branch }}
|
||||
</td>
|
||||
<td>
|
||||
{% if other == recipe %}
|
||||
{{ other.pn }} {{ other.pv }} (this recipe)
|
||||
{% else %}
|
||||
<a href="{% url 'recipe' other.id %}">{{ other.pn }} {{ other.pv }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
|
Loading…
Reference in New Issue
Block a user