mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +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 *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$GLOBALS['phpgw_info'] = array();
|
||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
||||
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
|
||||
include('header.inc.php');
|
||||
|
||||
$app = $HTTP_GET_VARS['app'];
|
||||
|
||||
if ($app)
|
||||
{
|
||||
$included = $GLOBALS['phpgw']->hooks->single('about',$app);
|
||||
}
|
||||
else
|
||||
{
|
||||
$api_only = True;
|
||||
}
|
||||
|
||||
$tpl = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'));
|
||||
$tpl->set_file(array(
|
||||
'phpgw_about' => 'about.tpl',
|
||||
'phpgw_about_unknown' => 'about_unknown.tpl'
|
||||
));
|
||||
$tpl = CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default'));
|
||||
$tpl->add_file(array('about'));
|
||||
|
||||
$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)
|
||||
{
|
||||
$tpl->set_var('phpgw_app_about',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');
|
||||
}
|
||||
$app_data = about_app();
|
||||
}
|
||||
|
||||
$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'];
|
||||
}
|
||||
if ($appname == 'home' || $appname == 'logout' || $appname == 'login')
|
||||
if ($appname == 'home' || $appname == 'logout' || $appname == 'login' || $appname == 'about')
|
||||
{
|
||||
$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_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';
|
||||
}
|
||||
|
@ -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$ -->
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://www.phpgroupware.org" target="_blank"><img src="{$phpgw_logo}" border="0"></a>
|
||||
<td colspan="2">
|
||||
<a href="http://www.phpgroupware.org" target="_blank"><img src="{$phpgw_logo}/logo.png" border="0"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<xsl:value-of select="lang_version"/><xsl:text>: </xsl:text><xsl:value-of select="phpgw_version"/>
|
||||
<td colspan="2">
|
||||
<a href="http://www.phpgroupware.org" target="_blank">phpGroupWare </a>
|
||||
<xsl:value-of select="phpgw_descr"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="lang_phpgw_descr"/>
|
||||
<xsl:value-of select="lang_version"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="phpgw_version"/>
|
||||
</td>
|
||||
</tr>
|
||||
<hr noshade="noshade" width="98%" align="center" size="1"/>
|
||||
<xsl:apply-template select="about_app"/>
|
||||
<tr>
|
||||
<td height="15"> </td>
|
||||
</tr>
|
||||
<xsl:apply-templates select="about_app"/>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="about_app">
|
||||
<tr>
|
||||
<td colspan="2" align="center" class="th_text">
|
||||
<xsl:value-of select="app_name"/>
|
||||
<td colspan="2" class="th_text">
|
||||
<xsl:value-of select="app_title"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<xsl:value-of select="lang_version"/><xsl:text>: </xsl:text><xsl:value-of select="app_version"/>
|
||||
</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 colspan="2">
|
||||
<xsl:value-of select="app_descr"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -53,11 +49,26 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="5"></td>
|
||||
<td>
|
||||
<xsl:value-of select="lang_version"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="app_version"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<xsl:value-of select="app_descr"/>
|
||||
<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 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>
|
||||
</tr>
|
||||
</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