From: hickert Date: Thu, 18 May 2006 08:30:30 +0000 (+0000) Subject: Updated tabs to show inherit instead of default X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=29c7be344e1aaedca962d3f42fbe41024342f2fc;p=gosa.git Updated tabs to show inherit instead of default git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3414 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 812b4f90f..2aa43a34f 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -243,7 +243,7 @@ class termgeneric extends plugin $tmp2[$servername.":".$path]= $servername.":".$path; }else{ - $tmp2[$server]=$server; + $tmp2[$server]="["._("inherited")."]"; } } diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index 9343af23b..27caf1a01 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -45,8 +45,8 @@ class termservice extends plugin var $XKbModels= array (); var $XKbLayouts= array (); var $XKbVariants= array (); - var $MouseTypes= array("AUTO", "ImPS/2", "PS/2", "Microsoft", "Logitech"); - var $MousePorts= array("AUTO", "/dev/ttyS0", "/dev/ttyS1", "/dev/psaux", "/dev/input/mice"); + var $MouseTypes= array(); + var $MousePorts= array(); var $gotoScannerModels= array(); var $hardware_list= array(); var $used_hardware= array(); @@ -69,7 +69,7 @@ class termservice extends plugin array_unshift($this->XDrivers, "["._("unknown")."]"); $this->XResolutions= array( - "default" => _("inherited") , + "default" => "["._("inherited")."]" , "640x480" => "640x480", "800x600" => "800x600", "1024x768" => "1024x768", @@ -79,13 +79,13 @@ class termservice extends plugin "1600x1200" => "1600x1200"); $this->XColordepths= array( - "default" => _("inherited"), + "default" => "["._("inherited")."]", "8" => "8 " ._("bit"), "15" => "15 "._("bit"), "16" => "16 "._("bit"), "24" => "24 "._("bit")); - $this->XKbModels['default']= _("inherited"); + $this->XKbModels['default']= "["._("inherited")."]"; foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex", "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless", "logiinetnav", "logiinternet", "macintosh", "microsoft", @@ -95,8 +95,17 @@ class termservice extends plugin } /* Additional values will be extracted from /etc/gosa/keyboardLayouts */ - $this->XKbLayouts= array ("default"=>_("inherited"),"de"=> "de","intl" =>"intl","us" =>"us"); - $this->XKbVariants= array ("default"=>_("inherited"), "nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); + $this->XKbLayouts= array ("default"=>"["._("inherited")."]","de"=> "de","intl" =>"intl","us" =>"us"); + $this->XKbVariants= array ("default"=>"["._("inherited")."]", "nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); + + $this->MouseTypes= array( "AUTO" => "["._("inherited")."]" , "ImPS/2" => "ImPS/2", + "PS/2" => "PS/2" , "Microsoft" => "Microsoft", + "Logitech" => "Logitech"); + + $this->MousePorts= array("AUTO" =>"["._("inherited")."]" , "/dev/ttyS0" => "/dev/ttyS0", + "/dev/ttyS1" => "/dev/ttyS1" , "/dev/psaux" => "/dev/psaux", + "/dev/input/mice" =>"/dev/input/mice"); + /* try to read additional keyboard layouts */ diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 589f89a78..e4d3412ab 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -8,13 +8,13 @@ class termstartup extends plugin /* Generic terminal attributes */ var $bootmode= "G"; - var $goLdapServerList= array("default"); + var $goLdapServerList= array(); var $gotoBootKernel= ""; var $gotoKernelParameters= ""; var $gotoLdapServer= ""; var $gotoModules= array(); var $gotoTerminalPath= ""; - var $gotoBootKernels= array("default"); + var $gotoBootKernels= array(); /* Share */ var $gotoShares = array();// Currently Share Option @@ -36,6 +36,8 @@ class termstartup extends plugin { plugin::plugin ($config, $dn); + $this->gotoBootKernels = array("default"=>"["._("inherited")."]"); + /* Get arrays */ foreach (array("gotoModules") as $val){ if (isset($this->attrs["$val"]["count"])){ @@ -101,7 +103,14 @@ class termstartup extends plugin } } - + $tmp = $this->config->data['SERVERS']['LDAP']; + foreach($tmp as $server){ + $visible = $server; + if($server == "default"){ + $visible = "["._("inherited")."]"; + } + $this->goLdapServerList[$server] = $visible; + } } function execute() @@ -173,9 +182,6 @@ class termstartup extends plugin $smarty->assign("gotoShares",$this->printOutAssignedShares()); $smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares())); - /* Arrays */ - $tmp = $this->config->data['SERVERS']['LDAP']; - /* Create divSelectBox for ldap server selection */ $SelectBoxLdapServer = new divSelectBox("LdapServer"); @@ -185,7 +191,7 @@ class termstartup extends plugin * or given entry is no longer available ... */ $found = false; - foreach($tmp as $server){ + foreach($this->goLdapServerList as $server => $name){ if($this->gotoLdapServer==$server){ $found = true; } @@ -193,7 +199,7 @@ class termstartup extends plugin /* Add Entries */ - foreach($tmp as $server){ + foreach($this->goLdapServerList as $server => $visible){ $use =""; if(($this->gotoLdapServer == $server) || ($found == false)) { $found = true; @@ -202,7 +208,7 @@ class termstartup extends plugin $SelectBoxLdapServer->AddEntry( array( - array("string"=>$server), + array("string"=>$visible), array("string"=>"", "attach"=>"style='border-right:0px;'") )); @@ -334,8 +340,10 @@ class termstartup extends plugin } /* Strip out 'default' values */ - if ($this->attrs['gotoLdapServer'] == "default"){ - unset ($this->attrs['gotoLdapServer']); + foreach(array("gotoBootKernel","gotoLdapServer") as $value){ + if ($this->attrs[$value] == "default"){ + $this->attrs[$value] = array(); + } } /* prepare share settings */ diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index debc29975..315df0e52 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -38,8 +38,8 @@ class workservice extends plugin var $XResolutions = array(); - var $MouseTypes= array("AUTO", "ImPS/2", "PS/2", "Microsoft", "Logitech"); - var $MousePorts= array("AUTO", "/dev/ttyS0", "/dev/ttyS1", "/dev/psaux", "/dev/input/mice"); + var $MouseTypes= array(); + var $MousePorts= array(); var $hardware_list= array(); var $used_hardware= array(); @@ -63,7 +63,7 @@ class workservice extends plugin plugin::plugin ($config, $dn); $this->XResolutions= array( - "default" => _("inherited") , + "default" => "["._("inherited")."]", "640x480" => "640x480", "800x600" => "800x600", "1024x768" => "1024x768", @@ -75,13 +75,13 @@ class workservice extends plugin array_unshift($this->XDrivers, "["._("unknown")."]"); $this->XColordepths= array( - "default" => _("inherited"), + "default" => "["._("inherited")."]", "8" => "8 " ._("bit"), "15" => "15 "._("bit"), "16" => "16 "._("bit"), "24" => "24 "._("bit")); - $this->XKbModels['default']= _("inherited"); + $this->XKbModels['default']= "["._("inherited")."]"; foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex", "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless", "logiinetnav", "logiinternet", "macintosh", "microsoft", @@ -90,9 +90,17 @@ class workservice extends plugin $this->XKbModels[$type] = $type; } + $this->MouseTypes= array("AUTO" => "["._("inherited")."]", "ImPS/2" =>"ImPS/2", + "PS/2" => "PS/2", "Microsoft" =>"Microsoft", + "Logitech"=>"Microsoft"); + + $this->MousePorts= array("AUTO" => "["._("inherited")."]", "/dev/ttyS0" =>"/dev/ttyS0", + "/dev/ttyS1" => "/dev/ttyS1", "/dev/psaux" =>"/dev/psaux", + "/dev/input/mice" => "/dev/input/mice"); + /* Additional values will be extracted from /etc/gosa/keyboardLayouts */ - $this->XKbLayouts= array ("default"=>_("inherited"),"de"=> "de","intl" =>"intl","us" =>"us"); - $this->XKbVariants= array ("default"=>_("inherited"), "nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); + $this->XKbLayouts= array ("default"=>"["._("inherited")."]","de"=> "de","intl" =>"intl","us" =>"us"); + $this->XKbVariants= array ("default"=>"["._("inherited")."]", "nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); /* try to read additional keyboard layouts */ diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 0d5fd2bf9..f187ef89e 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -890,7 +890,7 @@ class workstartup extends plugin if ($this->attrs['gotoLdapServer'] == "default"){ $this->attrs['gotoLdapServer']= array(); } - if ($this->attrs['gotoBootKernel'] == "%default%"){ + if ($this->attrs['gotoBootKernel'] == "%default%" || $this->attrs['gotoBootKernel'] == "default"){ $this->attrs['gotoBootKernel']= array(); } diff --git a/plugins/admin/systems/terminal.tpl b/plugins/admin/systems/terminal.tpl index 8485c9862..fc29ba407 100644 --- a/plugins/admin/systems/terminal.tpl +++ b/plugins/admin/systems/terminal.tpl @@ -54,7 +54,7 @@ @@ -62,7 +62,7 @@ diff --git a/plugins/admin/systems/terminalService.tpl b/plugins/admin/systems/terminalService.tpl index 50d4645d3..db8fc0e29 100644 --- a/plugins/admin/systems/terminalService.tpl +++ b/plugins/admin/systems/terminalService.tpl @@ -42,7 +42,7 @@ @@ -50,7 +50,7 @@ diff --git a/plugins/admin/systems/terminalStartup.tpl b/plugins/admin/systems/terminalStartup.tpl index 6f332c1b6..39ae8c823 100644 --- a/plugins/admin/systems/terminalStartup.tpl +++ b/plugins/admin/systems/terminalStartup.tpl @@ -13,7 +13,7 @@ diff --git a/plugins/admin/systems/workstationService.tpl b/plugins/admin/systems/workstationService.tpl index 87f45142b..54ddff5ee 100644 --- a/plugins/admin/systems/workstationService.tpl +++ b/plugins/admin/systems/workstationService.tpl @@ -42,7 +42,7 @@ @@ -50,7 +50,7 @@