From: Nicolas Boisselier Date: Mon, 1 Oct 2018 00:09:02 +0000 (+0100) Subject: lib/php/db/table.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=6ee1cb090b6b7ec5d274bd7dc74d35eb7b4b8768;p=nb.git lib/php/db/table.php --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 3ba25730..5b4c50d4 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -740,7 +740,15 @@ Class Table extends nb { $html .= '<'; } - $html .= ''.($tot ? ($x+1) : 0).' - '.( $tot<($x+$y) ? $tot : ($x+$y) ).' / '.$tot.''; + # NB 01.10.18: TODO + $page = ''; + /* + $pages = $count ? floor($tot / $count) : 0; + #$page = $x == 0 ? '' : ' - '.floor($tot / $x); + */ + $num_start = $tot ? ($x+1) : 0; + $num_end = $tot<($x+$y) ? $tot : ($x+$y); + $html .= ''.$num_start.' - '.$num_end.' / '.$tot.$page.''; if ($next<$tot) { $html .= '>'; @@ -1611,7 +1619,7 @@ Class Table extends nb { $html = ''; - $html .= ''.NB_EOL; + $html .= '
'.NB_EOL; if ($this->show_header) { $html .= ''.NB_EOL; diff --git a/lib/php/out/table.php b/lib/php/out/table.php index bfaf16f0..dac32f6f 100644 --- a/lib/php/out/table.php +++ b/lib/php/out/table.php @@ -1,7 +1,7 @@ true, - 'enclose' => array("
".NB_EOL,"
".NB_EOL), + 'enclose' => array("".NB_EOL,"
".NB_EOL), 'tag_enclose' => 'tr class="db-row"', 'tag_head' => 'th', 'tag' => 'td',