diff options
author | Dave Lerner <dave.lerner@windriver.com> | 2015-02-24 16:14:41 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-09 14:33:47 +0000 |
commit | ec8e07f8cf4d04d9e7a4a5e66103d28ba4a81ed4 (patch) | |
tree | af6a858a0a8f877f99f5d760836d5dc1f0e4d1ed /bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html | |
parent | e248a503ba84658dea086e65e9cde8b845b9c0ed (diff) | |
download | poky-ec8e07f8cf4d04d9e7a4a5e66103d28ba4a81ed4.tar.gz |
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 <dave.lerner@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html | 25 |
1 files changed, 25 insertions, 0 deletions
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 @@ | |||
1 | {% comment %} | ||
2 | Adds sorted columns to a detail table. | ||
3 | Must be preceded by <table class="table table-bordered table-hover tablesorter" id="otable"> | ||
4 | Must be followed by <tbody>...</tbody></table>. | ||
5 | Requires tablecols setup column fields dclass, clclass, qhelp, orderfield. | ||
6 | {% endcomment %} | ||
7 | {% load projecttags %} | ||
8 | {# <table class="table table-bordered table-hover tablesorter" id="otable"> #} | ||
9 | <thead> | ||
10 | <!-- Table header row; generated from "tablecols" entry in the context dict --> | ||
11 | <tr> | ||
12 | {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> | ||
13 | {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%} | ||
14 | {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" onclick="saveOrderCookie('{{tc.orderfield}}')">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%} | ||
15 | {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%} | ||
16 | {% if request.GET.search and forloop.first %} | ||
17 | <span class="badge badge-info">{{objects.paginator.count}}</span> | ||
18 | {% endif %} | ||
19 | {%if tc.filter%}<div class="btn-group pull-right"> | ||
20 | <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini {%if request.GET.filter%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter and tc.filter.options|filtered_tooltip:request.GET.filter %} title="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=javascript:reload_params({'filter':''})>Show all {% if filter_search_display %}{{filter_search_display}}{% else %}{{objectname}}{% endif %}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a> | ||
21 | </div>{%endif%} | ||
22 | </th>{% endfor %} | ||
23 | </tr> | ||
24 | </thead> | ||
25 | |||