summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2012-09-20 14:40:16 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2012-09-20 14:40:16 (GMT)
commita0dd4db3c1d5301e9d4fbbbea97943fcf0e51fdc (patch)
treea959211e507f0505b17d18d7e43c09c5ea75760a
parentd041afa83bcea5b439907861765ffd87ced1a9fb (diff)
downloadpfwb-ged-proto-a0dd4db3c1d5301e9d4fbbbea97943fcf0e51fdc.zip
pfwb-ged-proto-a0dd4db3c1d5301e9d4fbbbea97943fcf0e51fdc.tar.gz
pfwb-ged-proto-a0dd4db3c1d5301e9d4fbbbea97943fcf0e51fdc.tar.bz2
do not display 'prev' span when there is just a single page
-rw-r--r--server/index.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/index.html b/server/index.html
index df7eb64..78b1e93 100644
--- a/server/index.html
+++ b/server/index.html
@@ -29,8 +29,10 @@ function display_results(data) {
$('#results').append(link);
$('#results .nav').last().data('offset', prev_start);
} else {
- link = '<span class="nav prev" href="#">Résultats précédents</span>';
- $('#results').append(link);
+ if (data['hits'] >= NUM_RESULTS) {
+ link = '<span class="nav prev" href="#">Résultats précédents</span>';
+ $('#results').append(link);
+ }
}
$('#offset').val(orig_offset);
if ($('#offset').val()*1 + $('#count').val()*1 < data['hits']*1) {