diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-12-05 14:20:36 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-10 11:16:14 +0000 |
| commit | 192583a91e17b15da4668dbacee035def1d68b0c (patch) | |
| tree | 2dfef54dff47dddfb3005b619ee08d1731b63c2d /bitbake/lib/toaster/bldviewer/templates/basetable.html | |
| parent | 415ebb738da2a9625d6cc1456f4e99e463797c31 (diff) | |
| download | poky-192583a91e17b15da4668dbacee035def1d68b0c.tar.gz | |
bitbake: toaster: add pagination to the Simple UI
In an effort to make the Simple UI more usable and
reponsive, this patch adds pagination support for the
pages with lots of entries: Builds, Configuration and
Tasks.
(Bitbake rev: d4f075c050ad9ecebe750420d49961a7f30d090b)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldviewer/templates/basetable.html')
| -rw-r--r-- | bitbake/lib/toaster/bldviewer/templates/basetable.html | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldviewer/templates/basetable.html b/bitbake/lib/toaster/bldviewer/templates/basetable.html index 083bcb82e9..16628eafbe 100644 --- a/bitbake/lib/toaster/bldviewer/templates/basetable.html +++ b/bitbake/lib/toaster/bldviewer/templates/basetable.html | |||
| @@ -26,7 +26,7 @@ function filterTableRows(test) { | |||
| 26 | 26 | ||
| 27 | {% block pagename %} | 27 | {% block pagename %} |
| 28 | {% endblock %} | 28 | {% endblock %} |
| 29 | <div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Search: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off"> | 29 | <div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Filter: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off"> |
| 30 | </div> | 30 | </div> |
| 31 | {% if hideshowcols %} | 31 | {% if hideshowcols %} |
| 32 | <div align="right" style="display: inline-block; width: 40%">Show/Hide columns: | 32 | <div align="right" style="display: inline-block; width: 40%">Show/Hide columns: |
| @@ -36,7 +36,25 @@ function filterTableRows(test) { | |||
| 36 | </div> | 36 | </div> |
| 37 | {% endif %} | 37 | {% endif %} |
| 38 | </div> | 38 | </div> |
| 39 | <div> | 39 | |
| 40 | <div style="display: block; float:right; margin-left: auto; margin-right:5em"><span class="pagination" style="vertical-align: top; margin-right: 3em">Showing {{objects.start_index}} to {{objects.end_index}} out of {{objects.paginator.count}} entries. </span> | ||
| 41 | <ul class="pagination" style="display: block-inline"> | ||
| 42 | {%if objects.has_previous %} | ||
| 43 | <li><a href="?page={{objects.previous_page_number}}">«</a></li> | ||
| 44 | {%else%} | ||
| 45 | <li class="disabled"><a href="#">«</a></li> | ||
| 46 | {%endif%} | ||
| 47 | {% for i in objects.page_range %} | ||
| 48 | <li{%if i == objects.number %} class="active" {%endif%}><a href="?page={{i}}">{{i}}</a></li> | ||
| 49 | {% endfor %} | ||
| 50 | {%if objects.has_next%} | ||
| 51 | <li><a href="?page={{objects.next_page_number}}">»</a></li> | ||
| 52 | {%else%} | ||
| 53 | <li class="disabled"><a href="#">»</a></li> | ||
| 54 | {%endif%} | ||
| 55 | </ul> | ||
| 56 | </div> | ||
| 57 | |||
| 40 | <table class="table table-striped table-condensed" style="width:95%"> | 58 | <table class="table table-striped table-condensed" style="width:95%"> |
| 41 | {% block pagetable %} | 59 | {% block pagetable %} |
| 42 | {% endblock %} | 60 | {% endblock %} |
