diff --git a/lam/docs/devel/upgrade.htm b/lam/docs/devel/upgrade.htm index 1d2fd428..cfbfc0f0 100644 --- a/lam/docs/devel/upgrade.htm +++ b/lam/docs/devel/upgrade.htm @@ -1,6 +1,7 @@ - - Upgrade notes +Upgrade notes + + @@ -8,8 +9,7 @@ - - +

Upgrade notes

@@ -29,6 +29,8 @@ All options are now saved in cookies for one year.

The baseModule class has a new protected option: $autoAddObjectClasses 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.
+
+Account modules can now have icons. See baseModule->getIcon().

diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 31750c0b..a601e6f4 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -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 */ diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 8ba87281..3298a7ce 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -239,7 +239,13 @@ $_SESSION['conf_types'] = array(); for ($i = 0; $i < sizeof($modules); $i++) { if (sizeof($options[$modules[$i]]) < 1) continue; echo "
\n"; - echo "" . getModuleAlias($modules[$i], "none") . "\n"; + $icon = ''; + $module = new $modules[$i]('none'); + $iconImage = $module->getIcon(); + if ($iconImage != null) { + $icon = '' . $iconImage . ' '; + } + echo "$icon" . getModuleAlias($modules[$i], "none") . "\n"; $configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, true, $tabindex, $tabindexLink, 'config'); $_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']); echo "
\n"; diff --git a/lam/templates/config/confmodules.php b/lam/templates/config/confmodules.php index 69d6c824..2cd844d1 100644 --- a/lam/templates/config/confmodules.php +++ b/lam/templates/config/confmodules.php @@ -171,7 +171,8 @@ function config_showAccountModules($scope, $title) { } // show account modules - echo "
" . $title . "\n"; + $icon = '' . $scope . ' '; + echo "
$icon" . $title . "\n"; echo "\n"; // select boxes echo "\n"; diff --git a/lam/templates/config/conftypes.php b/lam/templates/config/conftypes.php index d85b4906..6db2603e 100644 --- a/lam/templates/config/conftypes.php +++ b/lam/templates/config/conftypes.php @@ -172,8 +172,9 @@ if (sizeof($availableTypes) > 0) { echo "
" . _("Available account types") . "\n"; echo "
\n"; for ($i = 0; $i < sizeof($availableTypes); $i++) { + $icon = '' . $availableTypes[$i] . ' '; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -189,7 +190,8 @@ if (sizeof($activeTypes) > 0) { echo "
" . _("Active account types") . "
\n"; for ($i = 0; $i < sizeof($activeTypes); $i++) { echo "
\n"; - echo "" . "" . getTypeAlias($activeTypes[$i]) . ": " . getTypeDescription($activeTypes[$i]) . ""; + $icon = '' . $activeTypes[$i] . ' '; + echo "" . $icon . "" . getTypeAlias($activeTypes[$i]) . ": " . getTypeDescription($activeTypes[$i]) . ""; echo "
\n"; echo "
" . getTypeAlias($availableTypes[$i]) . ": $icon" . getTypeAlias($availableTypes[$i]) . ": " . getTypeDescription($availableTypes[$i]) . "
\n"; // LDAP suffix diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index b6ff501b..9d49927b 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -174,7 +174,7 @@ function showMainPage($scope) { echo "\n"; echo "\n"; echo "
\n"; - echo "
\n"; + echo "

\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 "
\n" . getModuleAlias($modules[$m], $scope) . "\n"; + $icon = ''; + $module = new $modules[$m]($scope); + $iconImage = $module->getIcon(); + if ($iconImage != null) { + $icon = '' . $iconImage . ' '; + } + echo "
\n$icon" . getModuleAlias($modules[$m], $scope) . "\n"; echo "\n"; for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { echo "\n"; @@ -207,7 +213,7 @@ function showMainPage($scope) { echo "\n"; } echo "
\n"; - echo "
"; + echo "

"; } echo "

 

\n";