From: David Reyna Date: Tue, 29 Sep 2015 07:15:19 +0000 (+0100) Subject: toaster: display most recent builds for projects X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce9a7f1819a1897878ce154b3ee7e727a76165b0;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git toaster: display most recent builds for projects Display the most recent builds in the given project's build page. [YOCTO #8186] Signed-off-by: David Reyna Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- diff --git a/lib/toaster/toastergui/templates/mrb_section.html b/lib/toaster/toastergui/templates/mrb_section.html index b2c49fe3652..2fefe4b0f75 100644 --- a/lib/toaster/toastergui/templates/mrb_section.html +++ b/lib/toaster/toastergui/templates/mrb_section.html @@ -3,13 +3,19 @@ {% load humanize %} -{%if mru.count > 0%} +{%if mru and mru.count > 0%} - + {% endif %}
{% for build in mru %}
diff --git a/lib/toaster/toastergui/templates/projectbuilds.html b/lib/toaster/toastergui/templates/projectbuilds.html index fc659a02bb2..fde7e3b9dae 100644 --- a/lib/toaster/toastergui/templates/projectbuilds.html +++ b/lib/toaster/toastergui/templates/projectbuilds.html @@ -21,13 +21,17 @@ }); + {% with mrb_type='project' %} + {% include "mrb_section.html" %} + {% endwith %} +

{% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} - {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found + {{objects.paginator.count}} project build{{objects.paginator.count|pluralize}} found {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} - No builds found + No project builds found {%else%} - Project builds + All project builds {%endif%}

diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py index b7eddf411d1..9f16e8f76fc 100755 --- a/lib/toaster/toastergui/views.py +++ b/lib/toaster/toastergui/views.py @@ -2904,6 +2904,9 @@ if True: context['project'] = prj _set_parameters_values(pagesize, orderby, request) + # add the most recent builds for this project + context['mru'] = _get_latest_builds(prj) + return context