update xslt

This commit is contained in:
ceb 2002-10-25 16:44:35 +00:00
parent d94b0a9ffe
commit 6d2a19632f
5 changed files with 73 additions and 23 deletions

View File

@ -27,7 +27,8 @@
exit;
}
$GLOBALS['phpgw_info']['flags'] = array(
$GLOBALS['phpgw_info']['flags'] = array
(
'noheader' => True,
'nonavbar' => True,
'currentapp' => 'home',
@ -184,7 +185,8 @@
}
else
{
$sorted_apps = Array(
$sorted_apps = Array
(
'email',
'calendar',
'news',
@ -193,6 +195,9 @@
);
}
@reset($sorted_apps);
$GLOBALS['phpgw']->portalbox = CreateObject('phpgwapi.listbox');
$GLOBALS['phpgw']->hooks->process('home',$sorted_apps);
if($GLOBALS['portal_order'])
@ -206,5 +211,6 @@
$GLOBALS['phpgw']->preferences->save_repository();
}
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output,True);
$GLOBALS['phpgw']->xslttpl->pp();
?>

View File

@ -23,10 +23,12 @@
\**************************************************************************/
/* $Id$ */
CreateObject('phpgwapi.portalbox');
require_once('class.portalbox.inc.php');
class listbox extends portalbox
{
var $param;
/*
Set up the Object. You will notice, we have not reserved
memory space for variables. In this circumstance it is not necessary.
@ -41,7 +43,11 @@
the parent class, I simply call the parent constructor. Of course,
if I then wanted to override any of the values, I could easily do so.
*/
function listbox($param)
function listbox()
{
}
function set_params($param)
{
@reset($param);
while(list($key,$value) = each($param))
@ -52,7 +58,7 @@
$this->setvar($key,$value);
}
}
$this->portalbox($param['title']);
$this->title = $param['title'];
if($param['app_id'])
{
@ -93,7 +99,7 @@
'lang_link_statustext' => $this->data[$x]['lang_link_statustext']
);
}
$this->output[]['listbox'] = $var;
$this->listbox = $var;
}
$this->set_internal($extra_data);
$this->draw_box();
@ -121,7 +127,7 @@
'lang_link_statustext' => $this->data[$x]['lang_link_statustext']
);
}
$this->output[]['listbox'] = $var;
$this->listbox = $var;
}
$this->set_xinternal($extra_data);
$this->draw_box();

View File

@ -35,18 +35,36 @@
var $question;
var $edit;
var $extrabox;
var $xextrabox;
var $listbox;
var $output;
var $data = array();
var $data;
// Textual variables
var $title;
/* This is the constructor for the object. */
function portalbox($title = '')
function portalbox()
{
$this->setvar('title',$title);
// echo 'After SetVar Title = '.$this->getvar('title')."<br>\n";
$this->title = '';
$this->app_name = '';
$this->app_id = 0;
$this->up = '';
$this->down = '';
$this->close = '';
$this->question = '';
$this->edit = '';
$this->extrabox = '';
$this->xextrabox = '';
$this->listbox = '';
$this->output;
$this->data = array();
}
/*
@ -80,17 +98,16 @@
function start_template($extra = '')
{
if ($extra && $this->getvar('app_name'))
echo 'APPNAME: ' . $this->app_name;
if ($extra && $this->app_name)
{
$GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->getvar('app_name'),'default') . SEP . 'extrabox'));
$GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->app_name,'default') . SEP . 'extrabox'));
}
else
{
$GLOBALS['phpgw']->xslttpl->add_file('portal');
}
$this->output[]['title'] = $this->getvar('title');
$this->output[]['space'] = '&nbsp;';
}
function set_controls($control='',$control_param='')
@ -107,7 +124,7 @@
{
if($extra_data !='')
{
$this->output[]['extrabox'] = $extra_data;
$this->extrabox = $extra_data;
}
}
@ -115,7 +132,7 @@
{
if($extra_data !='')
{
$this->output[]['xextrabox'] = $extra_data;
$this->xextrabox = $extra_data;
}
}
@ -153,9 +170,31 @@
}
}
$this->output[]['control_link'] = $control_link;
$this->output['portal_data'][] = array
(
'title' => $this->title,
'control_link' => $control_link,
'listbox' => $this->listbox,
'extrabox' => $this->extrabox,
'xextrabox' => $this->xextrabox
);
for ($i=0;$i<count($this->output['portal_data']);$i++)
{
if ($this->output['portal_data'][$i]['listbox'] == '')
{
unset($this->output['portal_data'][$i]['listbox']);
}
if ($this->output['portal_data'][$i]['extrabox'] == '')
{
unset($this->output['portal_data'][$i]['extrabox']);
}
if ($this->output['portal_data'][$i]['xextrabox'] == '')
{
unset($this->output['portal_data'][$i]['xextrabox']);
}
}
}
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('portal_data' => $this->output),True);
//return $GLOBALS['phpgw']->xslttpl->parse();
}
}
?>

View File

@ -135,7 +135,6 @@
{
if($append)
{
//_debug_array($value);
if (is_array($value))
{
while(list($key,$val) = each($value))
@ -143,6 +142,7 @@
$this->vars[$name][$key] = $val;
}
}
_debug_array($this->vars);
}
else
{

View File

@ -55,7 +55,6 @@ a.th,a.th_text
.left
{
width: 154;
height: 85%;
}
td.left