From: Nicolas Boisselier Date: Fri, 22 Apr 2016 15:39:51 +0000 (+0100) Subject: wp X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=c29ea4c7f2f017eee31c415115058d3ce7fd9487;p=nb.git wp --- diff --git a/lib/php/db/wp.php b/lib/php/db/wp.php index 8bfcd927..9cb22124 100644 --- a/lib/php/db/wp.php +++ b/lib/php/db/wp.php @@ -11,32 +11,89 @@ class html_table extends WP_List_Table { #$fields = $this->get_columns(); #debug($sort); $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns()); + + $this->search_box(); return; } - public function search_box( $text='Search', $input_id='db' ) { - if ( empty( $_REQUEST['s'] ) && !$this->has_items() ) - return; + public function search_box( $text='Search', $input_id='search' ) { + echo '
'; + + echo '

Table: ' + + .'' + + #.'' + #.'' + + .'' +/* +*/ + + .'Add New' + .'

'; + echo '
'; + echo ''; + echo ''; + #echo '
'; + } - submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); + submit_button( __( 'Search' ), 'button', '', false, array('id' => 'search-submit') ); echo '

'; - /* - - - */ + echo ''; + + if (0) { + // Query / Search + $qin = !empty($_REQUEST['qin']) ? $_REQUEST['qin'] : ''; + $qout = ''; + if ($qin) { + $q = '[q:'.$qin.']'; + $qout = "
$q
".$htis->_table->q($qin); + } + echo '
' + .'

Query / Search: [q:]' + .'
' + .'' + .'' + .get_submit_button('Submit','small',null,false) + .'
' + .'
'.$qout.'
' + .'

'; + } } + protected function column_default( $item, $column_name ) { return $item[$column_name]; } public function get_columns() {