diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html')
-rw-r--r-- | poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html b/poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html new file mode 100644 index 000000000..7a9865908 --- /dev/null +++ b/poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html @@ -0,0 +1,72 @@ +{% comment %} + Show a detail table Search field and Rows per page. + Input: + objects, our boilerplated paginated with search fields set. + object_count, count of full, unfiltered, objects list + search_what, fills in "Search ___" + Only show the search form if we have more than 10 results, + or if return from a previous search. +{% endcomment %} + + +<script> +$(document).ready(function() { + /* Clear the current search selection and reload the results */ + $(".search-clear").click(function(){ + $("#search").val(""); + $(this).parents("form").submit(); + }); +}); +</script> + +{% if objects.paginator.count > 10 or request.GET.search %} + {% if objects.paginator.count == 0 %} + <div class="alert alert-warning"> + <h4>No {{search_what}} found</h4> + <form id="searchform" class="form-inline"> + {% else %} + <form id="searchform" class="navbar-form navbar-left detail-page-controls"> + {% endif %} + + <div class="form-group"> + <div class="btn-group"> + <input id="search" class="form-control" type="text" placeholder="Search {{search_what}}" name="search" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"> + <input type="hidden" value="name:+" name="orderby"> + <input type="hidden" value="l" name="page"> + {% if request.GET.search %} + <span class="remove-search-btn-detail-search search-clear glyphicon glyphicon-remove-circle"></span> + {% endif %} + </div> + </div> + <button type="submit" class="btn btn-default">Search</button> + {% if objects.paginator.count == 0 %} + <button type="submit" class="btn btn-link search-clear"> + Show all {{search_what}} + </button> + {% endif %} + </form> + {% endif %} + + {% if objects.paginator.count == 0 %} + </div> {# end alert #} + {% else %} + {% if object_count > 10 %} + <form class="navbar-form navbar-right"> + <div class="form-group"> + <label>Show rows:</label> + <select class="pagesize form-control"> + {% with "10 25 50 100 150" as list%} + {% for i in list.split %} + {% if request.session.limit == i %} + <option value="{{i}}" selected>{{i}}</option> + {% else %} + <option value="{{i}}">{{i}}</option> + {% endif %} + {% endfor %} + {% endwith %} + </select> + </div> + </form> + {% endif %} +{% endif %} + |