]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 1 Oct 2018 00:09:02 +0000 (01:09 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 1 Oct 2018 00:09:02 +0000 (01:09 +0100)
lib/php/db/table.php
lib/php/out/table.php

index 3ba2573098c94c4c20ff4b62432e312061bab3a9..5b4c50d479dfe4a68edbd2d274fff04b2b87b1f9 100644 (file)
@@ -740,7 +740,15 @@ Class Table extends nb {
                        $html .= '<span class="prev page-item"><a class="page-link" href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'">&lt;</a></span>';
                }
 
-               $html .= '<span class="count page-item"><span class="page-link">'.($tot ? ($x+1) : 0).' - '.( $tot<($x+$y) ? $tot : ($x+$y) ).' / '.$tot.'</span></span>';
+               # 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 .= '<span class="count page-item"><span class="page-link">'.$num_start.' - '.$num_end.' / '.$tot.$page.'</span></span>';
 
                if ($next<$tot) {
                        $html .= '<span class="next page-item"><a class="page-link" href="'.$this->url_list('limit',"$next,$y").'">&gt;</a></span>';
@@ -1611,7 +1619,7 @@ Class Table extends nb {
 
                $html = '';
 
-               $html .= '<table class="table table-striped table-responsive table-sm db-rows insert-bottom wp-list-table widefat striped">'.NB_EOL;
+               $html .= '<table class="table table-hover table-responsive table-sm db-rows insert-bottom wp-list-table widefat striped">'.NB_EOL;
 
                if ($this->show_header) {
                        $html .= '<thead>'.NB_EOL;
index bfaf16f099359d006068726a4616c6f8f254da80..dac32f6f761ef98c34a7c75947250f3259c9523c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 return [
   'is_html' => true,
-  'enclose' => array("<table class=\"table table-striped table-responsive table-sm db-rows widefat striped\">".NB_EOL,"</table>".NB_EOL),
+  'enclose' => array("<table class=\"table table-hover table-responsive table-sm db-rows widefat striped\">".NB_EOL,"</table>".NB_EOL),
   'tag_enclose' => 'tr class="db-row"',
   'tag_head' => 'th',
   'tag' => 'td',