diff --git a/layerindex/views.py b/layerindex/views.py index 1cd7eea..6c7a919 100644 --- a/layerindex/views.py +++ b/layerindex/views.py @@ -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 diff --git a/rrs/views.py b/rrs/views.py index 57340b9..f3f1553 100644 --- a/rrs/views.py +++ b/rrs/views.py @@ -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(): diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html index df85e2f..c3b841e 100644 --- a/templates/layerindex/recipedetail.html +++ b/templates/layerindex/recipedetail.html @@ -222,6 +222,33 @@ {% endfor %} {% endif %} + + {% if otherbranch_recipes %} +

Other branches

+

This recipe in other branches of {{ recipe.layerbranch.layer.name }}:

+ + + + + + + + {% for other in otherbranch_recipes %} + + + + + {% endfor %} +
BranchRecipe
+ {{ other.layerbranch.branch }} + + {% if other == recipe %} + {{ other.pn }} {{ other.pv }} (this recipe) + {% else %} + {{ other.pn }} {{ other.pv }} + {% endif %} +
+ {% endif %} diff --git a/templates/rrs/recipedetail.html b/templates/rrs/recipedetail.html index 91b28ee..84b3fbc 100644 --- a/templates/rrs/recipedetail.html +++ b/templates/rrs/recipedetail.html @@ -144,6 +144,33 @@ {% else %}

None

{% endif %} + + {% if otherbranch_recipes %} +

Other branches

+

This recipe in other branches of {{ recipe.layerbranch.layer.name }}:

+ + + + + + + + {% for other in otherbranch_recipes %} + + + + + {% endfor %} +
BranchRecipe
+ {{ other.layerbranch.branch }} + + {% if other == recipe %} + {{ other.pn }} {{ other.pv }} (this recipe) + {% else %} + {{ other.pn }} {{ other.pv }} + {% endif %} +
+ {% endif %}