update to use xslt

This commit is contained in:
ceb 2002-10-03 23:16:08 +00:00
parent 68684ff8ac
commit f89c10e742
4 changed files with 12 additions and 17 deletions

View File

@ -21,8 +21,7 @@
$included = $GLOBALS['phpgw']->hooks->single('about',$app); $included = $GLOBALS['phpgw']->hooks->single('about',$app);
} }
$tpl = CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')); $GLOBALS['phpgw']->xslttpl->add_file(array('about'));
$tpl->add_file(array('about'));
if ($included) if ($included)
{ {
@ -39,6 +38,6 @@
'about_app' => $app_data 'about_app' => $app_data
); );
$tpl->set_var('about',$data); $GLOBALS['phpgw']->xslttpl->set_var('about',$data);
$tpl->pparse(); $GLOBALS['phpgw']->xslttpl->pparse();
?> ?>

View File

@ -42,7 +42,6 @@
Array( Array(
'title' => $title, 'title' => $title,
'width' => '100%', 'width' => '100%',
'outerborderwidth' => '0',
'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler') 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
) )
); );
@ -65,9 +64,11 @@
while(list($key,$val) = @each($bdays)) while(list($key,$val) = @each($bdays))
{ {
$portalbox->data[] = array( $portalbox->data[] = array
(
'text' => lang("Today is x's birthday!", $val['n_given'] . ' ' . $val['n_family']), 'text' => lang("Today is x's birthday!", $val['n_given'] . ' ' . $val['n_family']),
'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']),
'lang_link_statustext' => lang('show contact')
); );
} }
@ -77,9 +78,11 @@
while(list($key,$val) = @each($bdays)) while(list($key,$val) = @each($bdays))
{ {
$portalbox->data[] = array( $portalbox->data[] = array
(
'text' => lang("Tomorrow is x's birthday.", $val['n_given'] . ' ' . $val['n_family']), 'text' => lang("Tomorrow is x's birthday.", $val['n_given'] . ' ' . $val['n_family']),
'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id']) 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id']),
'lang_link_statustext' => lang('show contact')
); );
} }
if(count($portalbox->data)) if(count($portalbox->data))
@ -87,7 +90,7 @@
$tmp = $portalbox->draw(); $tmp = $portalbox->draw();
} }
unset($portalbox); unset($portalbox);
$tmp .= "\n<!-- Birthday info -->\n";
$GLOBALS['phpgw']->template->set_var('phpgw_body',$tmp,True); $GLOBALS['phpgw']->template->set_var('phpgw_body',$tmp,True);
unset($tmp); unset($tmp);
} }

View File

@ -43,7 +43,6 @@
*/ */
function listbox($param) function listbox($param)
{ {
$this->setvar('classname','listbox');
$this->setvar('outerwidth',300); $this->setvar('outerwidth',300);
$this->setvar('innerwidth',300); $this->setvar('innerwidth',300);
$this->setvar('width',300); $this->setvar('width',300);

View File

@ -27,12 +27,10 @@
//Set up the Object, reserving memory space for variables //Set up the Object, reserving memory space for variables
var $outerwidth; var $outerwidth;
var $outerborderwidth = 1;
var $width; var $width;
var $innerwidth; var $innerwidth;
var $controls; var $controls;
var $header_background_image; var $header_background_image;
var $classname;
var $up; var $up;
var $down; var $down;
var $close; var $close;
@ -45,9 +43,6 @@
// Textual variables // Textual variables
var $title; var $title;
// Template
var $p;
/* /*
Use these functions to get and set the values of this Use these functions to get and set the values of this
object's variables. This is good OO practice, as it means object's variables. This is good OO practice, as it means
@ -92,7 +87,6 @@
$this->output = array $this->output = array
( (
'outer_border' => $this->getvar('outerborderwidth'),
'outer_width' => $this->getvar('width'), 'outer_width' => $this->getvar('width'),
'title' => $this->getvar('title'), 'title' => $this->getvar('title'),
'inner_width' => $this->getvar('width'), 'inner_width' => $this->getvar('width'),