From adf54ba81c8b1a47b5e94662f85fd25ce327c5eb Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 15 Jan 2016 01:02:22 +0100 Subject: [PATCH] table.replace in yaml --- lib/php/db/table.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 138193dd..08f6e8a6 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -26,6 +26,7 @@ class table extends nb { public $sql; public $fields = null; public $fields_keys = null; + public $replace = array(); # replace by javascript public $extras = array(); public $params = array( 'table', @@ -794,7 +795,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. -----------------------------------------------------------------*/ function rows_begin_table($fields) { - $html = DB_HTML_NAV_TOP; + $html = $this->html_nav_top(); #$html .= ''.PHP_EOL; $html .= '
'.PHP_EOL; #if (!empty($opt)) $html .= '' .PHP_EOL; @@ -839,7 +840,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. Html Div -----------------------------------------------------------------*/ function rows_begin_div() { - return '
'.PHP_EOL.DB_HTML_NAV_TOP; + return '
'.PHP_EOL.$this->html_nav_top(); } function rows_rec_div(&$row) { @@ -1037,5 +1038,16 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. return false; } + + function html_nav_top() { + $html = DB_HTML_NAV_TOP; + if (!empty($this->replace)) { + $replace = array(); + foreach ($this->replace as $k=>$v) { $replace[] = "$k.$v"; } + $html .= ''; + } + return $html; + } + } ?> -- 2.47.3
' . $this->nav($opt['count'],$opt['tot'],$opt['limit']) . '