mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
add extra info about the current template set in the about screen
This commit is contained in:
parent
4ac2c3ef0e
commit
e459af407c
213
about.php
213
about.php
@ -12,12 +12,20 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$GLOBALS['phpgw_info'] = array();
|
$GLOBALS['phpgw_info'] = array();
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
$app = $_GET['app'];
|
||||||
|
if(isset($app) && $_GET['app'] != "eGroupWare")
|
||||||
|
{
|
||||||
|
$GLOBALS['phpgw_info']['flags']['currentapp'] = $app;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
||||||
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
|
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
|
|
||||||
$app = $_GET['app'];
|
|
||||||
if ($app)
|
if ($app)
|
||||||
{
|
{
|
||||||
if (!($included = $GLOBALS['phpgw']->hooks->single('about',$app)))
|
if (!($included = $GLOBALS['phpgw']->hooks->single('about',$app)))
|
||||||
@ -29,75 +37,8 @@
|
|||||||
include (PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php");
|
include (PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php");
|
||||||
$info = $setup_info[$app];
|
$info = $setup_info[$app];
|
||||||
$info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
$info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
||||||
$other_infos = array(
|
return about_display($info);
|
||||||
'author' => lang('Author'),
|
}
|
||||||
'maintainer' => lang('Maintainer'),
|
|
||||||
'version' => lang('Version'),
|
|
||||||
'license' => lang('License')
|
|
||||||
);
|
|
||||||
|
|
||||||
$applink=$GLOBALS['phpgw']->link('/'.$app);
|
|
||||||
|
|
||||||
$s = "<table width='70%' cellpadding='4'>\n<tr>
|
|
||||||
<td align='left'><a href=\"$applink\" title=\"".lang('Go back to the application %1',$info['title'])."\"><img src=\"$icon\" alt=\"$info[title]\" border=\"0\" /></a></td><td align=\"left\"><h2>$info[title]</h2></td></tr>";
|
|
||||||
|
|
||||||
if ($info['description'])
|
|
||||||
{
|
|
||||||
$info['description'] = lang($info['description']);
|
|
||||||
$s .= "<tr><td colspan='2' align='left'>$info[description]</td></tr>\n";
|
|
||||||
if ($info['note'])
|
|
||||||
{
|
|
||||||
$info['note'] = lang($info['note']);
|
|
||||||
$s .= "<tr><td colspan='2' align='left'><i>$info[note]</i></td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($other_infos as $key => $val)
|
|
||||||
{
|
|
||||||
if (isset($info[$key]))
|
|
||||||
{
|
|
||||||
$s .= "<tr><td width='1%' align='left'>$val</td><td>";
|
|
||||||
$infos = $info[$key];
|
|
||||||
for ($n = 0; is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n)
|
|
||||||
{
|
|
||||||
if (!is_array($infos) && isset($info[$key.'_email']))
|
|
||||||
{
|
|
||||||
$infos = array('email' => $info[$key.'_email'],'name' => $infos);
|
|
||||||
}
|
|
||||||
if (is_array($infos))
|
|
||||||
{
|
|
||||||
$names = explode('<br>',$infos['name']);
|
|
||||||
$emails = split('@|<br>',$infos['email']);
|
|
||||||
if (count($names) < count($emails)/2)
|
|
||||||
{
|
|
||||||
$names = '';
|
|
||||||
}
|
|
||||||
$infos = '';
|
|
||||||
while (list($user,$domain) = $emails)
|
|
||||||
{
|
|
||||||
if ($infos) $infos .= '<br>';
|
|
||||||
$name = $names ? array_shift($names) : $user;
|
|
||||||
$infos .= "<a href='mailto:$user at $domain'><span onClick=\"document.location='mailto:$user'+'@'+'$domain'; return false;\">$name</span></a>";
|
|
||||||
array_shift($emails); array_shift($emails);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$s .= ($n ? '<br>' : '') . $infos;
|
|
||||||
}
|
|
||||||
$s .= "</td></tr>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($info['extra_untranslated'])
|
|
||||||
{
|
|
||||||
$s .= "<tr><td colspan='2' align='left'>$info[extra_untranslated]</td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$s .= "</table>\n";
|
|
||||||
|
|
||||||
return $s;
|
|
||||||
}
|
|
||||||
$api_only = !($included = file_exists(PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"));
|
$api_only = !($included = file_exists(PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,33 +52,135 @@
|
|||||||
'phpgw_about' => 'about.tpl',
|
'phpgw_about' => 'about.tpl',
|
||||||
'phpgw_about_unknown' => 'about_unknown.tpl'
|
'phpgw_about_unknown' => 'about_unknown.tpl'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare';
|
||||||
|
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title);
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_header();
|
||||||
|
|
||||||
|
$tpl->set_block('phpgw_about', 'egroupware','egroupware');
|
||||||
|
$tpl->set_block('phpgw_about', 'application','application');
|
||||||
|
|
||||||
|
|
||||||
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo.gif'));
|
if ($included)
|
||||||
$tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']));
|
|
||||||
$tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.',
|
|
||||||
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
|
|
||||||
|
|
||||||
if ($included)
|
|
||||||
{
|
{
|
||||||
$tpl->set_var('phpgw_app_about',about_app('',''));
|
$tpl->set_var('phpgw_app_about', about_app());
|
||||||
//about_app($tpl,"phpgw_app_about");
|
$tpl->pparse('phpgw_about', 'application', True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($api_only)
|
if ($api_only)
|
||||||
{
|
{
|
||||||
$tpl->set_var('phpgw_app_about','');
|
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo.gif'));
|
||||||
|
$tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']));
|
||||||
|
$tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.',
|
||||||
|
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
|
||||||
|
$tpl->pparse('out', 'egroupware');
|
||||||
|
|
||||||
|
$tpl->set_var('phpgw_app_about',about_template());
|
||||||
|
$tpl->pparse('phpgw_about', 'application', True);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tpl->set_var('app_header',$app);
|
$tpl->set_var('app_header',$app);
|
||||||
$tpl->parse('phpgw_app_about','phpgw_about_unknown');
|
|
||||||
|
$tpl->pparse('out','phpgw_about_unknown');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare';
|
|
||||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title);
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
|
||||||
$tpl->pparse('out','phpgw_about');
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||||
|
|
||||||
|
|
||||||
|
function about_template()
|
||||||
|
{
|
||||||
|
$template = $GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi');
|
||||||
|
|
||||||
|
include ($template . "/settings/settings.inc.php");
|
||||||
|
$s = "";
|
||||||
|
foreach($template_info as $info)
|
||||||
|
{
|
||||||
|
$s .= about_display($info);
|
||||||
|
}
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function about_display($info)
|
||||||
|
{
|
||||||
|
$other_infos = array(
|
||||||
|
'author' => lang('Author'),
|
||||||
|
'maintainer' => lang('Maintainer'),
|
||||||
|
'version' => lang('Version'),
|
||||||
|
'license' => lang('License'),
|
||||||
|
);
|
||||||
|
if($info[icon])
|
||||||
|
{
|
||||||
|
$icon = $info[icon];
|
||||||
|
}
|
||||||
|
$s = "<table width='70%' cellpadding='4'>\n";
|
||||||
|
if(trim($icon) != "")
|
||||||
|
{
|
||||||
|
$s.= "<tr>
|
||||||
|
<td align='left'><img src='$icon' alt=\"$info[title]\" /></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s .= "<tr>
|
||||||
|
<td align='left'></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
||||||
|
}
|
||||||
|
if ($info['description'])
|
||||||
|
{
|
||||||
|
$info['description'] = lang($info['description']);
|
||||||
|
$s .= "<tr><td colspan='2' align='left'>$info[description]</td></tr>\n";
|
||||||
|
if ($info['note'])
|
||||||
|
{
|
||||||
|
$info['note'] = lang($info['note']);
|
||||||
|
$s .= "<tr><td colspan='2' align='left'><i>$info[note]</i></td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
foreach ($other_infos as $key => $val)
|
||||||
|
{
|
||||||
|
if (isset($info[$key]))
|
||||||
|
{
|
||||||
|
$s .= "<tr><td width='1%' align='left'>$val</td><td>";
|
||||||
|
$infos = $info[$key];
|
||||||
|
for ($n = 0; is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n)
|
||||||
|
{
|
||||||
|
if (!is_array($infos) && isset($info[$key.'_email']))
|
||||||
|
{
|
||||||
|
$infos = array('email' => $info[$key.'_email'],'name' => $infos);
|
||||||
|
}
|
||||||
|
if (is_array($infos))
|
||||||
|
{
|
||||||
|
$names = explode('<br>',$infos['name']);
|
||||||
|
$emails = split('@|<br>',$infos['email']);
|
||||||
|
if (count($names) < count($emails)/2)
|
||||||
|
{
|
||||||
|
$names = '';
|
||||||
|
}
|
||||||
|
$infos = '';
|
||||||
|
while (list($user,$domain) = $emails)
|
||||||
|
{
|
||||||
|
if ($infos) $infos .= '<br>';
|
||||||
|
$name = $names ? array_shift($names) : $user;
|
||||||
|
$infos .= "<a href='mailto:$user at $domain'><span onClick=\"document.location='mailto:$user'+'@'+'$domain'; return false;\">$name</span></a>";
|
||||||
|
array_shift($emails); array_shift($emails);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$s .= ($n ? '<br>' : '') . $infos;
|
||||||
|
}
|
||||||
|
$s .= "</td></tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($info['extra_untranslated'])
|
||||||
|
{
|
||||||
|
$s .= "<tr><td colspan='2' align='left'>$info[extra_untranslated]</td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$s .= "</table>\n";
|
||||||
|
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,26 +1,41 @@
|
|||||||
<table border="0" width="100%">
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<!-- <tr>
|
|
||||||
|
<!-- BEGIN egroupware -->
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="logo"></a>
|
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">{phpgw_version}</td>
|
<td align="left">{phpgw_version}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">{phpgw_message}</td>
|
<td align="left">{phpgw_message}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><hr></td>
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
</tr>-->
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><div class="greyLine"></div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- END egroupware -->
|
||||||
|
|
||||||
|
<!-- BEGIN application -->
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
|
||||||
{phpgw_app_about}
|
{phpgw_app_about}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END application -->
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<!-- <tr>
|
|
||||||
|
<!-- BEGIN egroupware -->
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
||||||
</td>
|
</td>
|
||||||
@ -18,8 +20,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><div class="greyLine"></div></td>
|
<td align="center"><div class="greyLine"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
|
||||||
|
<!-- END egroupware -->
|
||||||
|
|
||||||
|
<!-- BEGIN application -->
|
||||||
<tr>
|
<tr>
|
||||||
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -30,4 +35,7 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END application -->
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<!-- <tr>
|
|
||||||
|
<!-- BEGIN egroupware -->
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
||||||
</td>
|
</td>
|
||||||
@ -18,8 +20,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><div class="greyLine"></div></td>
|
<td align="center"><div class="greyLine"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
|
||||||
|
<!-- END egroupware -->
|
||||||
|
|
||||||
|
<!-- BEGIN application -->
|
||||||
<tr>
|
<tr>
|
||||||
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -30,4 +35,7 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END application -->
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,26 +1,41 @@
|
|||||||
<table border="0" width="100%">
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
|
||||||
|
<!-- BEGIN egroupware -->
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<a href="http://www.egroupware.org" target="_new"><img src="{webserver_url}/logo.gif" border="0"></a>
|
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">{phpgw_version}</td>
|
<td align="left">{phpgw_version}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><a href="http://www.egroupware.org" target="_new">eGroupWare</a> is a multi-user, web-based groupware suite written in <a href="http://www.php.net" target="_new">PHP</a>.</td>
|
<td align="left">{phpgw_message}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><hr></td>
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><div class="greyLine"></div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- END egroupware -->
|
||||||
|
|
||||||
|
<!-- BEGIN application -->
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
|
||||||
{phpgw_app_about}
|
{phpgw_app_about}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END application -->
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<!-- <tr>
|
|
||||||
|
<!-- BEGIN egroupware -->
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
<a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a>
|
||||||
</td>
|
</td>
|
||||||
@ -18,8 +20,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><div class="greyLine"></div></td>
|
<td align="center"><div class="greyLine"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
|
||||||
|
<!-- END egroupware -->
|
||||||
|
|
||||||
|
<!-- BEGIN application -->
|
||||||
<tr>
|
<tr>
|
||||||
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
<td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -30,4 +35,7 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END application -->
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user