From c5d16e93c9ccff80a31d6077ac34263f27a9ef2e Mon Sep 17 00:00:00 2001 From: ceb Date: Sat, 5 Oct 2002 22:00:25 +0000 Subject: [PATCH] update portalbox functions --- phpgwapi/inc/class.listbox.inc.php | 12 +++++++++++- phpgwapi/inc/class.portalbox.inc.php | 20 +++++++++++++------- phpgwapi/templates/default/cat_filter.xsl | 2 +- phpgwapi/templates/default/portal.xsl | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/phpgwapi/inc/class.listbox.inc.php b/phpgwapi/inc/class.listbox.inc.php index 045bba43ed..64b6f2c59b 100755 --- a/phpgwapi/inc/class.listbox.inc.php +++ b/phpgwapi/inc/class.listbox.inc.php @@ -57,7 +57,7 @@ } } $this->portalbox($param['title']); - $this->start_template(); + //$this->start_template(); } /* @@ -66,6 +66,15 @@ */ function draw($extra_data='') { + if ($extra_data) + { + $this->start_template(True); + } + else + { + $this->start_template(); + } + if(count($this->data)) { for ($x = 0; $x < count($this->data); $x++) @@ -79,6 +88,7 @@ } $this->output['listbox'] = $var; } + $this->set_internal($extra_data); return $this->draw_box(); } diff --git a/phpgwapi/inc/class.portalbox.inc.php b/phpgwapi/inc/class.portalbox.inc.php index 994b9a0cc8..51d816cf45 100755 --- a/phpgwapi/inc/class.portalbox.inc.php +++ b/phpgwapi/inc/class.portalbox.inc.php @@ -26,6 +26,7 @@ { //Set up the Object, reserving memory space for variables + var $app_name; var $outerwidth; var $width; var $innerwidth; @@ -75,15 +76,23 @@ /* This is the constructor for the object. */ - function portalbox($title='') + function portalbox($title = '') { $this->setvar('title',$title); + // echo 'After SetVar Title = '.$this->getvar('title')."
\n"; } - function start_template() + function start_template($extra = False) { - $GLOBALS['phpgw']->xslttpl->add_file(array('portal')); + if ($extra) + { + $GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->getvar('app_name'),'default') . SEP . 'extrabox')); + } + else + { + $GLOBALS['phpgw']->xslttpl->add_file(array('portal')); + } $this->output = array ( @@ -111,10 +120,7 @@ $data = ' '; } - $this->output['extrabox'] = array - ( - 'data' => $data - ); + $this->output['extrabox'] = $data; } function draw_box() diff --git a/phpgwapi/templates/default/cat_filter.xsl b/phpgwapi/templates/default/cat_filter.xsl index fb96f6e62d..ec0dbd121b 100644 --- a/phpgwapi/templates/default/cat_filter.xsl +++ b/phpgwapi/templates/default/cat_filter.xsl @@ -1,6 +1,6 @@ - +
diff --git a/phpgwapi/templates/default/portal.xsl b/phpgwapi/templates/default/portal.xsl index 3d1d21e374..24d7d2c469 100644 --- a/phpgwapi/templates/default/portal.xsl +++ b/phpgwapi/templates/default/portal.xsl @@ -25,7 +25,7 @@ - +