mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
update xslt
This commit is contained in:
parent
f42db9d12d
commit
b4e4be334b
@ -38,6 +38,6 @@
|
||||
'about_app' => $app_data
|
||||
);
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('about',$data);
|
||||
$GLOBALS['phpgw']->xslttpl->pparse();
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('about_data' => $data));
|
||||
//$GLOBALS['phpgw']->xslttpl->pparse();
|
||||
?>
|
||||
|
2
home.php
2
home.php
@ -211,5 +211,5 @@
|
||||
$GLOBALS['phpgw']->preferences->save_repository();
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output,True);
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output);
|
||||
?>
|
||||
|
@ -8,7 +8,6 @@
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($GLOBALS['phpgw_info']['user']['preferences']['infolog']['homeShowEvents'])
|
||||
@ -18,42 +17,18 @@
|
||||
|
||||
$GLOBALS['phpgw']->translation->add_app('infolog');
|
||||
|
||||
$portalbox = CreateObject('phpgwapi.listbox',
|
||||
Array(
|
||||
'title' => lang('Infolog'),
|
||||
'width' => '100%',
|
||||
'outerborderwidth' => '0',
|
||||
'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
|
||||
)
|
||||
);
|
||||
|
||||
$app_id = $GLOBALS['phpgw']->applications->name2id('infolog');
|
||||
$GLOBALS['portal_order'][] = $app_id;
|
||||
$var = Array(
|
||||
'up' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||
'down' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||
'close' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||
'question' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||
'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
|
||||
);
|
||||
|
||||
while(list($key,$value) = each($var))
|
||||
{
|
||||
$portalbox->set_controls($key,$value);
|
||||
}
|
||||
|
||||
$portalbox->data = Array();
|
||||
$GLOBALS['phpgw']->portalbox->set_params(array('app_id' => $app_id,
|
||||
'title' => lang('infolog')));
|
||||
|
||||
$GLOBALS['HTTP_POST_VARS']['filter'] = $GLOBALS['filter'] = 'own-open-today';
|
||||
$infolog = CreateObject('infolog.uiinfolog');
|
||||
|
||||
/*echo "\n".'<!-- BEGIN infolog info -->'."\n".
|
||||
$portalbox->draw($infolog->get_list(2))."\n".
|
||||
'<!-- END infolog info -->'."\n";
|
||||
*/
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('phpgw_body',$portalbox->draw(),True);
|
||||
$GLOBALS['phpgw']->portalbox->draw($infolog->get_list(2));
|
||||
|
||||
unset($infolog);
|
||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app;
|
||||
}
|
||||
?>
|
||||
|
@ -276,5 +276,5 @@
|
||||
|
||||
//_debug_array($data);
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('login',$data);
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('login',$data,False);
|
||||
?>
|
||||
|
@ -154,6 +154,12 @@
|
||||
*/
|
||||
function set_var($varname, $value = '', $append=False)
|
||||
{
|
||||
if ($varname == 'phpgw_body' && is_object($GLOBALS['phpgw']->xslttpl))
|
||||
{
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('body_data' => $value));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_array($varname))
|
||||
{
|
||||
if (!empty($varname))
|
||||
|
@ -1212,6 +1212,9 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
case 'home':
|
||||
$var['home'] = True;
|
||||
break;
|
||||
case 'about':
|
||||
$var['about'] = True;
|
||||
break;
|
||||
}
|
||||
|
||||
$var['lang_powered_by'] = lang('powered by');
|
||||
|
@ -27,8 +27,6 @@
|
||||
|
||||
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.
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
var $app_name;
|
||||
var $app_id;
|
||||
var $controls;
|
||||
var $up;
|
||||
var $down;
|
||||
var $close;
|
||||
@ -49,24 +48,24 @@
|
||||
|
||||
function portalbox($reset = False)
|
||||
{
|
||||
$this->title = '';
|
||||
$this->app_name = '';
|
||||
$this->app_id = 0;
|
||||
$this->title = '';
|
||||
$this->app_name = '';
|
||||
$this->app_id = 0;
|
||||
|
||||
$this->up = '';
|
||||
$this->down = '';
|
||||
$this->close = '';
|
||||
$this->question = '';
|
||||
$this->edit = '';
|
||||
$this->up = '';
|
||||
$this->down = '';
|
||||
$this->close = '';
|
||||
$this->question = '';
|
||||
$this->edit = '';
|
||||
|
||||
$this->extrabox = '';
|
||||
$this->xextrabox = '';
|
||||
$this->listbox = '';
|
||||
$this->data = array();
|
||||
$this->extrabox = '';
|
||||
$this->xextrabox = '';
|
||||
$this->listbox = '';
|
||||
$this->data = array();
|
||||
|
||||
if (!$reset)
|
||||
{
|
||||
$this->output;
|
||||
$this->output = array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +138,6 @@
|
||||
|
||||
function draw_box()
|
||||
{
|
||||
$control = '';
|
||||
if($this->up || $this->down || $this->close || $this->question || $this->edit)
|
||||
{
|
||||
$control_array = array
|
||||
|
@ -1,4 +1,29 @@
|
||||
<?php
|
||||
/*******************************************************************\
|
||||
* phpGroupWare API - XML tools *
|
||||
* Written by Dan Kuykendall <seek3r@phpgroupware.org> *
|
||||
* and Bettina Gille [ceb@phpgroupware.org] *
|
||||
* and Ralf Becker <ralfbecker@outdoortraining.de> *
|
||||
* Copyright (C) 2002 Dan Kuykendall, Bettina Gille, Ralf Becker *
|
||||
* ----------------------------------------------------------------- *
|
||||
* This library is part of the phpGroupWare API *
|
||||
* ----------------------------------------------------------------- *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\*******************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
function var2xml($name, $data)
|
||||
{
|
||||
$doc = new xmltool('root','','');
|
||||
|
@ -1,4 +1,28 @@
|
||||
<?php
|
||||
/*******************************************************************\
|
||||
* phpGroupWare API - XSLT Template class *
|
||||
* Written by Dan Kuykendall <seek3r@phpgroupware.org> *
|
||||
* and Bettina Gille [ceb@phpgroupware.org] *
|
||||
* and Ralf Becker <ralfbecker@outdoortraining.de> *
|
||||
* Copyright (C) 2002 Dan Kuykendall, Bettina Gille, Ralf Becker *
|
||||
* ----------------------------------------------------------------- *
|
||||
* This library is part of the phpGroupWare API *
|
||||
* ----------------------------------------------------------------- *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\*******************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
if (!extension_loaded('xslt'))
|
||||
{
|
||||
@ -131,7 +155,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function set_var($name, $value, $append = False)
|
||||
function set_var($name, $value, $append = True)
|
||||
{
|
||||
if($append)
|
||||
{
|
||||
|
@ -1,6 +1,10 @@
|
||||
<!-- $Id$ -->
|
||||
|
||||
<xsl:template match="about">
|
||||
<xsl:template name="about">
|
||||
<xsl:apply-templates select="about_data"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="about_data">
|
||||
<table cellpadding="2" cellspacing="2" align="center" class="about">
|
||||
<xsl:variable name="phpgw_logo"><xsl:value-of select="phpgw_logo"/></xsl:variable>
|
||||
<xsl:variable name="lang_url_statustext"><xsl:value-of select="lang_url_statustext"/></xsl:variable>
|
||||
|
@ -131,7 +131,7 @@
|
||||
<!-- END top_part -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<!-- BEGIN left_part -->
|
||||
<table cellspacing="0" cellpadding="0" valign="top" class="left">
|
||||
@ -152,6 +152,9 @@
|
||||
<xsl:when test="home">
|
||||
<xsl:call-template name="portal"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="about">
|
||||
<xsl:call-template name="about"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of disable-output-escaping="yes" select="body_data"/>
|
||||
</xsl:otherwise>
|
||||
|
Loading…
Reference in New Issue
Block a user