From 50ab75e58a9fdfc3db60d74a0974c3196a104d6c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 13 Jul 2005 08:39:42 +0000 Subject: [PATCH] option to never hide the nextmatch line (if less then max-matches entries --- etemplate/doc/reference.html | 1 + etemplate/inc/class.nextmatch_widget.inc.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/doc/reference.html b/etemplate/doc/reference.html index 0a639bfa41..bd87e682c1 100644 --- a/etemplate/doc/reference.html +++ b/etemplate/doc/reference.html @@ -761,6 +761,7 @@ $content[$id] = array( // I = value set by the app, 0 = value on return / 'header_left' => // I template to show left of the range-value, left-aligned (optional) 'header_right' => // I template to show right of the range-value, right-aligned (optional) 'bottom_too' => True// I show the nextmatch-line (arrows, filters, search, ...) again after the rows + 'never_hide' => True// I never hide the nextmatch-line if less then maxmatch entrie 'start' => // IO position in list 'cat_id' => // IO category, if not 'no_cat' => True 'search' => // IO search pattern diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 4dcced606d..b71527862e 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -29,6 +29,7 @@ * 'header_left' => // I template to show left of the range-value, left-aligned (optional) * 'header_right' => // I template to show right of the range-value, right-aligned (optional) * 'bottom_too' => True// I show the nextmatch-line (arrows, filters, search, ...) again after the rows + * 'never_hide' => True// I never hide the nextmatch-line if less then maxmatch entries * 'start' => // IO position in list * 'cat_id' => // IO category, if not 'no_cat' => True * 'search' => // IO search pattern @@ -197,7 +198,7 @@ $value['template']->data[0]['h'.$value['template']->rows] .= ',1'; // disable the last data row } $max = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']; - if ($total <= $max && $options && $value['search'] == '' && + if (!$value['never_hide'] && $total <= $max && $options && $value['search'] == '' && ($value['no_cat'] || !$value['cat_id']) && ($value['no_filter'] || !$value['filter'] || $value['filter'] == 'none') && ($value['no_filter2'] || !$value['filter2'] || $value['filter2'] == 'none'))