mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
fixed about function plus update to use xslt
This commit is contained in:
parent
48c3c62549
commit
d5202ca67c
43
about.php
43
about.php
@ -8,49 +8,36 @@
|
|||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$GLOBALS['phpgw_info'] = array();
|
$GLOBALS['phpgw_info'] = array();
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
||||||
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
|
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
|
|
||||||
$app = $HTTP_GET_VARS['app'];
|
$app = $HTTP_GET_VARS['app'];
|
||||||
|
|
||||||
if ($app)
|
if ($app)
|
||||||
{
|
{
|
||||||
$included = $GLOBALS['phpgw']->hooks->single('about',$app);
|
$included = $GLOBALS['phpgw']->hooks->single('about',$app);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$api_only = True;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tpl = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'));
|
$tpl = CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default'));
|
||||||
$tpl->set_file(array(
|
$tpl->add_file(array('about'));
|
||||||
'phpgw_about' => 'about.tpl',
|
|
||||||
'phpgw_about_unknown' => 'about_unknown.tpl'
|
|
||||||
));
|
|
||||||
|
|
||||||
$tpl->set_var('webserver_url',$GLOBALS['phpgw']->common->get_image_path('phpgwapi'));
|
|
||||||
$tpl->set_var('phpgw_version','phpGroupWare API version ' . $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
|
|
||||||
if ($included)
|
if ($included)
|
||||||
{
|
{
|
||||||
$tpl->set_var('phpgw_app_about',about_app('',''));
|
$app_data = about_app();
|
||||||
//about_app($tpl,"phpgw_app_about");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($api_only)
|
|
||||||
{
|
|
||||||
$tpl->set_var('phpgw_app_about','');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tpl->set_var('app_header',$app);
|
|
||||||
$tpl->parse('phpgw_app_about','phpgw_about_unknown');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl->pparse('out','phpgw_about');
|
$data = array
|
||||||
|
(
|
||||||
|
'phpgw_logo' => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
|
||||||
|
'lang_version' => lang('version'),
|
||||||
|
'phpgw_version' => 'phpGroupWare API ' . $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],
|
||||||
|
'phpgw_descr' => lang('is a multi-user, web-based groupware suite written in PHP'),
|
||||||
|
'about_app' => $app_data
|
||||||
|
);
|
||||||
|
|
||||||
|
$tpl->set_var('about',$data);
|
||||||
|
$tpl->pparse();
|
||||||
?>
|
?>
|
||||||
|
@ -667,7 +667,7 @@
|
|||||||
{
|
{
|
||||||
$appname = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$appname = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||||
}
|
}
|
||||||
if ($appname == 'home' || $appname == 'logout' || $appname == 'login')
|
if ($appname == 'home' || $appname == 'logout' || $appname == 'login' || $appname == 'about')
|
||||||
{
|
{
|
||||||
$appname = 'phpgwapi';
|
$appname = 'phpgwapi';
|
||||||
}
|
}
|
||||||
@ -1128,7 +1128,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
$GLOBALS['phpgw_info']['navbar']['preferences']['icon'] = $this->image('preferences',Array('navbar','nonav'));
|
$GLOBALS['phpgw_info']['navbar']['preferences']['icon'] = $this->image('preferences',Array('navbar','nonav'));
|
||||||
$GLOBALS['phpgw_info']['navbar']['preferences']['icon_hover'] = $this->image_on('preferences',Array('navbar','nonav'),'-over');
|
$GLOBALS['phpgw_info']['navbar']['preferences']['icon_hover'] = $this->image_on('preferences',Array('navbar','nonav'),'-over');
|
||||||
|
|
||||||
if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'about')
|
if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences')
|
||||||
{
|
{
|
||||||
$app = 'phpGroupWare';
|
$app = 'phpGroupWare';
|
||||||
}
|
}
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
<table border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td align="left">
|
|
||||||
<a href="http://www.phpgroupware.org" target="_new"><img src="{webserver_url}/logo.gif" border="0"></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center">{phpgw_version}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="http://www.phpgroupware.org" target="_new">phpGroupWare</a> is a multi-user, web-based groupware suite written in <a href="http://www.php.net" target="_new">PHP</a>.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><hr></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
|
|
||||||
{phpgw_app_about}
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
@ -1,47 +1,43 @@
|
|||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
|
|
||||||
<xsl:template match="about">
|
<xsl:template match="about">
|
||||||
<table cellpadding="2" cellspacing="2" width="80%" align="center">
|
<table cellpadding="2" cellspacing="2" width="70%" align="center" class="portal">
|
||||||
<xsl:variable name="phpgw_logo"><xsl:value-of select="phpgw_logo"/></xsl:variable>
|
<xsl:variable name="phpgw_logo"><xsl:value-of select="phpgw_logo"/></xsl:variable>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td colspan="2">
|
||||||
<a href="http://www.phpgroupware.org" target="_blank"><img src="{$phpgw_logo}" border="0"></a>
|
<a href="http://www.phpgroupware.org" target="_blank"><img src="{$phpgw_logo}/logo.png" border="0"/></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td colspan="2">
|
||||||
<xsl:value-of select="lang_version"/><xsl:text>: </xsl:text><xsl:value-of select="phpgw_version"/>
|
<a href="http://www.phpgroupware.org" target="_blank">phpGroupWare </a>
|
||||||
|
<xsl:value-of select="phpgw_descr"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<xsl:value-of select="lang_phpgw_descr"/>
|
<xsl:value-of select="lang_version"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="phpgw_version"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<hr noshade="noshade" width="98%" align="center" size="1"/>
|
<tr>
|
||||||
<xsl:apply-template select="about_app"/>
|
<td height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
<xsl:apply-templates select="about_app"/>
|
||||||
</table>
|
</table>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="about_app">
|
<xsl:template match="about_app">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="center" class="th_text">
|
<td colspan="2" class="th_text">
|
||||||
<xsl:value-of select="app_name"/>
|
<xsl:value-of select="app_title"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="center">
|
<td colspan="2">
|
||||||
<xsl:value-of select="lang_version"/><xsl:text>: </xsl:text><xsl:value-of select="app_version"/>
|
<xsl:value-of select="app_descr"/>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="top"><xsl:value-of select="lang_based_on"/></td>
|
|
||||||
<td><xsl:value-of select="app_source"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td height="5"></td>
|
|
||||||
<td>
|
|
||||||
<a href="{$app_source_url}" target="_blank"><xsl:value-of select="lang_app_source_url"/></a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -53,11 +49,26 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td height="5"></td>
|
<td>
|
||||||
|
<xsl:value-of select="lang_version"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="app_version"/>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td valign="top"><xsl:value-of select="lang_based_on"/></td>
|
||||||
<xsl:value-of select="app_descr"/>
|
<td><xsl:value-of select="app_source"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="5"></td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="app_source_url"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="lang_app_source_url"/>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
<!-- $Id$ -->
|
|
||||||
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center"><b>{app_title}</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center">{lang_version} {app_version}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="top">{based_on}</td>
|
|
||||||
<td>{source}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td><a href="{source_url}" target="_blank">{source_url_name}</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="top">{written_by}</td>
|
|
||||||
<td>{developers}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">{description}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
Loading…
Reference in New Issue
Block a user