From ec8e07f8cf4d04d9e7a4a5e66103d28ba4a81ed4 Mon Sep 17 00:00:00 2001 From: Dave Lerner Date: Tue, 24 Feb 2015 16:14:41 -0600 Subject: bitbake: toaster: add sort, search, paging to recipe package page When selecting the packages tab on a recipe detail page, the page now includes: column sort on package name and size columns, search on the package name, and pagination. Column sort is added by splitting the recipe view/html for a recipe's package list into a new url path, view name and template, so that the sorting routine, views.reload_params(), interfaces similar to other views. Search, sorting, and pagination are implemented for this detail page using three new templates. templates/detail_pagination_bottom.html templates/detail_search_header.html templates/detail_sorted_header.html views.recipe() is optimized since the recipe's package list is no longer needed by the recipe template, only the recipe's package count is required for the first page. The recipe view and template also changes to support tabbing to the right context on the recipe detail page from the recipe-package page. [YOCTO #6154] (Bitbake rev: 6cb9e853d05c2c71467af22ef459ffbe6f41de36) Signed-off-by: Dave Lerner Signed-off-by: Richard Purdie --- .../toastergui/templates/detail_sorted_header.html | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html (limited to 'bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html') diff --git a/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html b/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html new file mode 100644 index 0000000000..a7917dcf5a --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html @@ -0,0 +1,25 @@ +{% comment %} + Adds sorted columns to a detail table. + Must be preceded by + Must be followed by ...
. + Requires tablecols setup column fields dclass, clclass, qhelp, orderfield. +{% endcomment %} +{% load projecttags %} +{# #} + + + + {% for tc in tablecols %}{% endfor %} + + + -- cgit v1.2.3-54-g00ecf
+ {%if tc.qhelp%}{%endif%} + {%if tc.orderfield%}{{tc.name}}{%else%}{{tc.name}}{%endif%} + {%if tc.ordericon%} {%endif%} + {% if request.GET.search and forloop.first %} + {{objects.paginator.count}} + {% endif %} + {%if tc.filter%}
+ +
{%endif%} +