added icons

This commit is contained in:
Roland Gruber 2007-11-19 19:16:08 +00:00
parent c05bfe50f3
commit 703688cc22
6 changed files with 29 additions and 11 deletions

View File

@ -1,6 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Upgrade notes</title>
<html><head><title>Upgrade notes</title>
@ -8,8 +9,7 @@
<link rel="stylesheet" type="text/css" href="style/layout.css">
</head><body>
<link rel="stylesheet" type="text/css" href="style/layout.css"></head><body>
<div style="text-align: center;">
<h1>Upgrade notes</h1></div>
@ -29,6 +29,8 @@ All options are now saved in cookies for one year.<br>
<br>
The <span style="font-weight: bold;">baseModule</span> class has a new protected option: <span style="font-weight: bold;">$autoAddObjectClasses </span>You can set it to false if you do not want that your module's object classes are added when creating or loading an account.<br>
<br>
Account modules can now have icons. See <span style="font-weight: bold;">baseModule-&gt;getIcon()</span>.<br>
<br>

View File

@ -797,6 +797,7 @@ abstract class baseModule {
/**
* Returns the path to the module icon.
* The path must be releative to graphics (e.g. key.png).
* You can also set $this->meta['icon'].
*
* @return unknown
*/

View File

@ -239,7 +239,13 @@ $_SESSION['conf_types'] = array();
for ($i = 0; $i < sizeof($modules); $i++) {
if (sizeof($options[$modules[$i]]) < 1) continue;
echo "<fieldset>\n";
echo "<legend><b>" . getModuleAlias($modules[$i], "none") . "</b></legend>\n";
$icon = '';
$module = new $modules[$i]('none');
$iconImage = $module->getIcon();
if ($iconImage != null) {
$icon = '<img src="../../graphics/' . $iconImage . '" alt="' . $iconImage . '"> ';
}
echo "<legend>$icon<b>" . getModuleAlias($modules[$i], "none") . "</b></legend>\n";
$configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, true, $tabindex, $tabindexLink, 'config');
$_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']);
echo "</fieldset>\n";

View File

@ -171,7 +171,8 @@ function config_showAccountModules($scope, $title) {
}
// show account modules
echo "<fieldset class=\"" . $scope . "edit\"><legend><b>" . $title . "</b></legend>\n";
$icon = '<img alt="' . $scope . '" src="../../graphics/' . $scope . '.png">&nbsp';
echo "<fieldset class=\"" . $scope . "edit\"><legend>$icon<b>" . $title . "</b></legend>\n";
echo "<table border=0 width=\"100%\">\n";
// select boxes
echo "<tr>\n";

View File

@ -172,8 +172,9 @@ if (sizeof($availableTypes) > 0) {
echo "<fieldset><legend><b>" . _("Available account types") . "</b></legend>\n";
echo "<table>\n";
for ($i = 0; $i < sizeof($availableTypes); $i++) {
$icon = '<img alt="' . $availableTypes[$i] . '" src="../../graphics/' . $availableTypes[$i] . '.png">&nbsp';
echo "<tr>\n";
echo "<td><b>" . getTypeAlias($availableTypes[$i]) . ": </b></td>\n";
echo "<td>$icon<b>" . getTypeAlias($availableTypes[$i]) . ": </b></td>\n";
echo "<td>" . getTypeDescription($availableTypes[$i]) . "</td>\n";
echo "<td><input type=\"submit\" name=\"add_" . $availableTypes[$i] ."\" value=\"" . _("Add") . "\"></td>\n";
echo "</tr>\n";
@ -189,7 +190,8 @@ if (sizeof($activeTypes) > 0) {
echo "<fieldset><legend><b>" . _("Active account types") . "</b></legend><br>\n";
for ($i = 0; $i < sizeof($activeTypes); $i++) {
echo "<fieldset class=\"" . $activeTypes[$i] . "edit\">\n";
echo "<legend>" . "<b>" . getTypeAlias($activeTypes[$i]) . ": </b>" . getTypeDescription($activeTypes[$i]) . "</legend>";
$icon = '<img alt="' . $activeTypes[$i] . '" src="../../graphics/' . $activeTypes[$i] . '.png">&nbsp';
echo "<legend>" . $icon . "<b>" . getTypeAlias($activeTypes[$i]) . ": </b>" . getTypeDescription($activeTypes[$i]) . "</legend>";
echo "<br>\n";
echo "<table>\n";
// LDAP suffix

View File

@ -174,7 +174,7 @@ function showMainPage($scope) {
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</fieldset>\n";
echo "</fieldset><br>\n";
// get input fields from modules
$columns = getUploadColumns($scope);
@ -183,7 +183,13 @@ function showMainPage($scope) {
$modules = array_keys($columns);
for ($m = 0; $m < sizeof($modules); $m++) {
if (sizeof($columns[$modules[$m]]) < 1) continue;
echo "<fieldset class=\"" . $scope . "edit\">\n<legend><b>" . getModuleAlias($modules[$m], $scope) . "</b></legend>\n";
$icon = '';
$module = new $modules[$m]($scope);
$iconImage = $module->getIcon();
if ($iconImage != null) {
$icon = '<img src="../graphics/' . $iconImage . '" alt="' . $iconImage . '"> ';
}
echo "<fieldset class=\"" . $scope . "edit\">\n<legend>$icon<b>" . getModuleAlias($modules[$m], $scope) . "</b></legend>\n";
echo "<table width=\"100%\">\n";
for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) {
echo "<tr valign=\"top\">\n";
@ -207,7 +213,7 @@ function showMainPage($scope) {
echo "</tr>\n";
}
echo "</table>\n";
echo "</fieldset>";
echo "</fieldset><br>";
}
echo "<p>&nbsp;</p>\n";