diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html')
-rw-r--r-- | import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html b/import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html new file mode 100644 index 000000000..7bea3f47f --- /dev/null +++ b/import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/detail_search_header.html @@ -0,0 +1,68 @@ +{% 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> +<div class="row-fluid"> +{% if objects.paginator.count > 10 or request.GET.search %} + {% if objects.paginator.count == 0 %} + <div class="alert"> + <h3>No {{search_what}} found</h3> + <form id="searchform" class="input-append"> + {% else %} + <form id="searchform" class="navbar-search input-append pull-left"> + {% endif %} + + <input id="search" class="input-xlarge" 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 %} + <a class="add-on btn search-clear"> + <i class="icon-remove"></i> + </a> + {% endif %} + <button type="submit" class="btn">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 %} + <div class="pull-right"> + <span class="help-inline" style="padding-top:5px;">Show rows:</span> + <select style="margin-top:5px;margin-bottom:0px;" class="pagesize"> + {% 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> + {% endif %} +{% endif %} +</div> {# row-fluid #} |