diff options
-rw-r--r-- | rrs/views.py | 5 | ||||
-rw-r--r-- | templates/rrs/recipedetail.html | 22 | ||||
-rw-r--r-- | templates/rrs/recipes.html | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/rrs/views.py b/rrs/views.py index e98db9bd5c..ed05e8196e 100644 --- a/rrs/views.py +++ b/rrs/views.py @@ -10,7 +10,7 @@ from django.views.generic import ListView, DetailView, RedirectView from django.core.urlresolvers import resolve, reverse, reverse_lazy from django.db import connection -from layerindex.models import Recipe, StaticBuildDep +from layerindex.models import Recipe, StaticBuildDep, Patch from rrs.models import Release, Milestone, Maintainer, RecipeMaintainerHistory, \ RecipeMaintainer, RecipeUpstreamHistory, RecipeUpstream, \ RecipeDistro, RecipeUpgrade, MaintenancePlan @@ -468,6 +468,9 @@ def _get_recipe_list(milestone): recipe_list_item.upstream_status = upstream_status recipe_list_item.upstream_version = upstream_version recipe_list_item.outdated = outdated + patches = Patch.objects.filter(recipe__id=recipe['id']) + recipe_list_item.patches_total = patches.count() + recipe_list_item.patches_pending = patches.filter(status='P').count() recipe_list_item.maintainer_name = maintainer_name recipe_list_item.no_update_reason = no_update_reason recipe_list.append(recipe_list_item) diff --git a/templates/rrs/recipedetail.html b/templates/rrs/recipedetail.html index ac4c6463e5..e79852ce56 100644 --- a/templates/rrs/recipedetail.html +++ b/templates/rrs/recipedetail.html @@ -116,6 +116,28 @@ </tbody> </table> {% endif %} + + <h2>Patches</h2> + {% if recipe.patch_set.exists %} + <table class="table table-striped table-bordered"> + <thead> + <tr> + <th class="span6">Patch</th> + <th>Status</th> + </tr> + </thead> + <tbody> + {% for patch in recipe.patch_set.all %} + <tr> + <td><a href="{{ patch.vcs_web_url }}">{{ patch.src_path }}</a></td> + <td>{{ patch.get_status_display }} {{ patch.status_extra | urlize }}</td> + </tr> + {% endfor %} + </tbody> + </table> + {% else %} + <p>None</p> + {% endif %} </div> <div class="span4"> diff --git a/templates/rrs/recipes.html b/templates/rrs/recipes.html index 8c4b29abd6..30db1bf32e 100644 --- a/templates/rrs/recipes.html +++ b/templates/rrs/recipes.html @@ -79,6 +79,7 @@ <th class="upstream_version_column muted">Upstream version</th> <th class="upstream_status_column span2">Upstream status</th> <th class="last_updated_column">Last Updated</th> + <th class="patches_column">Patches</th> <th class="maintainer_column">Maintainer</th> <th class="summary_column muted span5">Summary</th> <th class="no_update_reason_column muted span5" style="display:none">No update reason</th> @@ -102,6 +103,7 @@ {{ r.upstream_status }} </td> <td class="last_updated_column">{{r.outdated}}</td> + <td class="patches_column">{% if r.patches_total %}<span {% if not r.patches_pending %}class="muted"{% endif %}>{{ r.patches_pending }}<span class="muted"> / {{ r.patches_total }}</span>{% endif %}</td> <td class="maintainer_column">{{ r.maintainer_name }}</td> <td class="summary_column">{{ r.summary }}</td> <td class="no_update_reason_column" style="display:none">{{ r.no_update_reason }}</td> |