diff options
author | Belen Barros Pena <belen.barros.pena@linux.intel.com> | 2014-11-13 11:34:01 +0000 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-11-20 15:43:57 +0000 |
commit | c67a5dd8026833e167c58a17643febee130dbb35 (patch) | |
tree | df7bd07db2717e0793de7e22fb4b7c587ced8403 | |
parent | 83af0db872ea28965cd6007ad72ff210f67a4f30 (diff) | |
download | bitbake-c67a5dd8026833e167c58a17643febee130dbb35.tar.gz |
toaster: add no results state to all layers page
When you search for a layer and your search returns no results,
we should show you an alert and a link to show back all layers,
as we do in all other tables.
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
-rw-r--r-- | lib/toaster/toastergui/templates/layers.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/templates/layers.html b/lib/toaster/toastergui/templates/layers.html index 2bca84b50..e9f910fa5 100644 --- a/lib/toaster/toastergui/templates/layers.html +++ b/lib/toaster/toastergui/templates/layers.html @@ -23,6 +23,18 @@ <div id="zone1alerts"> </div> +{% if objects.paginator.count == 0 %} + <div class="row-fluid"> + <div class="alert"> + <form class="no-results input-append" id="searchform"> + <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} + <button class="btn" type="submit" value="Search">Search</button> + <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all layers</button> + </form> + </div> + </div> + +{% else %} {% include "basetable_top_layers.html" %} {% for o in objects %} @@ -264,4 +276,6 @@ $(document).ready(function (){ </script> {%endif%} +{%endif%} + {% endblock %} |