added icons for modules

This commit is contained in:
Roland Gruber 2007-11-19 18:42:03 +00:00
parent cad39b6dc3
commit d6200ee947
17 changed files with 53 additions and 4 deletions

View File

@ -793,6 +793,19 @@ abstract class baseModule {
public function getOriginalAttributes() {
return $this->orig;
}
/**
* Returns the path to the module icon.
* The path must be releative to graphics (e.g. key.png).
*
* @return unknown
*/
public function getIcon() {
if (isset($this->meta['icon'])) {
return $this->meta['icon'];
}
return null;
}
}

View File

@ -1009,8 +1009,16 @@ class accountContainer {
echo "<tr class=\"" . $class . "\"><td onclick=\"document.getElementsByName('form_main_".$this->order[$i]."')[0].click();\"";
echo " align=\"center\" style=\"border: 1px solid;border-bottom: 0px solid;padding:10px;\">\n";
// print normal button
echo "<input style=\"background: transparent; width:" . $buttonWidth ."em;border:0px solid;\" name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\"";
echo $this->module[$this->order[$i]]->get_alias();
$buttonImage = $this->module[$this->order[$i]]->getIcon();
$buttonImageStyle = '';
$buttonSpace = '';
if ($buttonImage != null) {
$buttonImageStyle = 'background-image: url(../../graphics/' . $buttonImage . ');background-position: 2px center;background-repeat: no-repeat;';
$buttonSpace = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
}
$buttonStyle = $buttonImageStyle . 'background-color:transparent;width:' . $buttonWidth . 'em;border:0px solid;';
echo "<input style=\"" . $buttonStyle . "\" name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\"";
echo $buttonSpace . $this->module[$this->order[$i]]->get_alias();
echo "\" tabindex=$x";
if (($buttonStatus == 'disabled') || $this->subpage == 'finish') echo " disabled";
echo ">\n";

View File

@ -48,6 +48,8 @@ class account extends baseModule {
$modules = $_SESSION['config']->get_AccountModules($this->get_scope());
}
$return = array();
// icon
$return['icon'] = 'uid.png';
// manages host accounts
$return["account_types"] = array("host", "user");
// alias name

View File

@ -41,6 +41,8 @@ class ieee802Device extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'device.png';
// manages host accounts
$return["account_types"] = array("host");
// alias name

View File

@ -41,6 +41,8 @@ class inetLocalMailRecipient extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'mailAlias.png';
// manages host accounts
$return["account_types"] = array("user");
// alias name

View File

@ -115,6 +115,8 @@ class inetOrgPerson extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'uid.png';
// manages user accounts
$return["account_types"] = array("user");
// alias name
@ -1493,7 +1495,6 @@ class inetOrgPerson extends baseModule {
return $return;
}
}
?>

View File

@ -62,6 +62,8 @@ class kolabUser extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'kolab.png';
// manages host accounts
$return["account_types"] = array("user");
// alias name

View File

@ -42,6 +42,8 @@ class ldapPublicKey extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'key.png';
// manages host accounts
$return["account_types"] = array("user");
// alias name

View File

@ -41,6 +41,8 @@ class nisMailAlias extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'mailAlias.png';
// manages host accounts
$return["account_types"] = array("mailAlias");
// base module

View File

@ -101,6 +101,8 @@ class posixAccount extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'tux.png';
// manages user and host accounts
$return["account_types"] = array("user", "host");
// user specific data

View File

@ -276,6 +276,8 @@ class posixGroup extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'tux.png';
// manages group accounts
$return["account_types"] = array("group");
if ($this->get_scope() == "group") {

View File

@ -64,6 +64,8 @@ class quota extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'hard-drive.png';
// manages user and group accounts
$return["account_types"] = array("user", "group");
// alias name

View File

@ -95,6 +95,8 @@ class sambaAccount extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'samba.png';
// manages user and host accounts
$return["account_types"] = array("user", "host");
if ($this->get_scope() == "host") {
@ -1186,7 +1188,6 @@ class sambaAccount extends baseModule {
}
}
}
?>

View File

@ -41,6 +41,8 @@ class sambaDomain extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'samba.png';
// manages host accounts
$return["account_types"] = array("smbDomain");
// alias name

View File

@ -249,6 +249,8 @@ class sambaGroupMapping extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'samba.png';
// manages group accounts
$return["account_types"] = array("group");
// alias name

View File

@ -117,6 +117,8 @@ class sambaSamAccount extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'samba.png';
// manages user and host accounts
$return["account_types"] = array("user", "host");
if ($this->get_scope() == "host") {

View File

@ -63,6 +63,8 @@ class shadowAccount extends baseModule {
*/
function get_metaData() {
$return = array();
// icon
$return['icon'] = 'key.png';
// manages user accounts
$return["account_types"] = array("user");
// alias name