X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fsystems%2Fadmin%2Fsystems%2Fclass_divListSystem.inc;h=e812730197a419a7454b3e51b43f5b771d7c0500;hb=932c982f262f6076faf8ad6a29f06bdbb3ad309a;hp=909cc65d8f2333494601224311a6b15ec904b811;hpb=c0fb6c51a64a0e121116172242e85a847022f22d;p=gosa.git
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
index 909cc65d8..e81273019 100644
--- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc
+++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
@@ -1,4 +1,24 @@
SetHeadpageMode();
- $this->SetInformation(_("This menu allows you to add, remove and change the properties of specific systems. You can only add systems which have already been started once."));
$this->EnableAplhabet (true);
@@ -65,21 +84,35 @@ class divListSystem extends MultiSelectWindow
/* set Page header */
$this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'"));
- $this->AddHeader(array("string"=>_("System / Department")));
+ $this->AddHeader(array("string"=>_("Systems")." / "._("Department")));
$this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'"));
/* Text ,Value ,Name ,Is selected */
- $this->AddCheckBox("ShowServers", _("Select to see servers"), _("Show servers"), true);
- $this->AddCheckBox("ShowTerminals", _("Select to see Linux terminals"), _("Show terminals") , true);
- $this->AddCheckBox("ShowWorkstations", _("Select to see Linux workstations"), _("Show workstations"), true);
- $this->AddCheckBox("ShowWinWorkstations", _("Select to see MicroSoft Windows based workstations"), _("Show windows based workstations"),true);
- $this->AddCheckBox("ShowPrinters", _("Select to see network printers"), _("Show network printers") ,true);
- $this->AddCheckBox("ShowPhones", _("Select to see VOIP phones"), _("Show phones") , true);
- $this->AddCheckBox("ShowDevices", _("Select to see network devices"), _("Show network devices"), true);
+ $this->AddCheckBox("ShowServers",
+ msgPool::selectToView( _("servers")),
+ sprintf(_("Show %s"), _("servers")),true);
+ $this->AddCheckBox("ShowTerminals",
+ msgPool::selectToView( _("Linux terminals")),
+ sprintf(_("Show %s"), _("terminals")),true);
+ $this->AddCheckBox("ShowWorkstations",
+ msgPool::selectToView( _("Linux workstations")),
+ sprintf(_("Show %s"), _("workstations")),true);
+ $this->AddCheckBox("ShowWinWorkstations",
+ msgPool::selectToView( _("MicroSoft Windows based workstations")),
+ sprintf(_("Show %s"), _("windows based workstations")),true);
+ $this->AddCheckBox("ShowPrinters",
+ msgPool::selectToView( _("network printers")),
+ sprintf(_("Show %s"), _("network printers")) ,true);
+ $this->AddCheckBox("ShowPhones",
+ msgPool::selectToView( _("VoIP phones")),
+ sprintf(_("Show %s"), _("phones")) ,true);
+ $this->AddCheckBox("ShowDevices",
+ msgPool::selectToView( _("network devices")),
+ sprintf(_("Show %s"), _("network devices")), true);
/* Add SubSearch checkbox */
$this->AddCheckBox(SEPERATOR);
- $this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Search in subtrees"), false);
+ $this->AddCheckBox("SubSearch", msgPool::selectToView("","subsearch"), msgPool::selectToView("","subsearch_small"), false);
/* Name ,Text ,Default , Connect with alphabet */
$this->AddRegex ("Regex", _("Display systems matching"),"*" , true);
@@ -199,28 +232,29 @@ class divListSystem extends MultiSelectWindow
" "._("Component")."|"."newsystem_component|\n";
}
- $events = DaemonEvent::get_event_types();
+ $events = DaemonEvent::get_event_types(SYSTEM_EVENT);
+
$s.= "..|".
" "._("Trigger action")."|\n";
- foreach($events['BY_CLASS'] as $name => $event){
+ foreach($events['TRIGGERED'] as $name => $event){
$s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|trigger_event_".$name."\n";
}
$s.= "..|".
" "._("Schedule action")."|\n";
- foreach($events['BY_CLASS'] as $name => $event){
+ foreach($events['SCHEDULED'] as $name => $event){
$s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|schedule_event_".$name."\n";
}
- $s.= "..|".
+ $s.= "..|".
" "._("Remove")."|"."remove_multiple|\n";
/* Add multiple copy & cut icons */
if(is_object($this->parent->CopyPasteHandler)){
$s.= "..|---|\n";
- $s.= "..|".
+ $s.= "..|".
" "._("Copy")."|"."multiple_copy_systems|\n";
- $s.= "..|".
+ $s.= "..|".
" "._("Cut")."|"."multiple_cut_systems|\n";
}
@@ -229,10 +263,10 @@ class divListSystem extends MultiSelectWindow
if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){
$s .= "..|---|\n";
if($this->parent->CopyPasteHandler->entries_queued()){
- $img = "";
+ $img = "";
$s.="..|".$img." "._("Paste")."|editPaste|\n";
}else{
- $img = "";
+ $img = "";
$s.="..|".$img." "._("Paste")."\n";
}
}
@@ -321,9 +355,9 @@ class divListSystem extends MultiSelectWindow
$action ="";
if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
$action.= " ";
+ src='images/lists/cut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
$action.= " ";
+ src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}
$action.= "";
@@ -335,7 +369,7 @@ class divListSystem extends MultiSelectWindow
if(preg_match("/d/",$acl)){
- $action.= "";
}else{
$action.= $empty;
@@ -369,22 +403,15 @@ class divListSystem extends MultiSelectWindow
$display= $val["cn"][0].$dsc;
}
-
/* Check if this is a terminal/workstation && if we are allowed to change the gotoRootPasswd */
- $pwd_acl ="";
- if(in_array("gotoWorkstation",$val['objectClass'])){
- $pwd_acl = $ui->get_permissions($val['dn'],"workstation/workgeneric","gotoRootPasswd");
- }
- if(in_array("gotoTerminal",$val['objectClass'])){
- $pwd_acl = $ui->get_permissions($val['dn'],"terminal/termgeneric","gotoRootPasswd");
- }
- if(preg_match("/w/",$pwd_acl)){
- $action2 = "";
+ $display_key_for = array("terminal","workstation","server","component");
+ $pwd_acl = $ui->get_permissions($val['dn'],$tabs[$type]['ACL'],"userPassword");
+ if(preg_match("/w/",$pwd_acl) && in_array($type,$display_key_for)){
+ $action2 = "";
}else{
$action2 = $empty;
}
-
if(in_array("gotoWorkstation",$val['objectClass'])){
$action2= " ".$action2;
@@ -431,15 +458,15 @@ class divListSystem extends MultiSelectWindow
$num_deps = count($this->Added_Departments);
}
- $num_ser_str = _("Number of listed servers");
- $num_ws_str = _("Number of listed workstations");
- $num_ter_str = _("Number of listed terminals");
- $num_pho_str = _("Number of listed phones");
- $num_prt_str = _("Number of listed printers");
- $num_com_str = _("Number of listed network components");
- $num_new_str = _("Number of listed new devices");
- $num_wws_str = _("Number of listed windows workstations");
- $num_dep_str = _("Number of listed departments");
+ $num_ser_str = sprintf(_("Number of listed '%s'"),_("servers"));
+ $num_ws_str = sprintf(_("Number of listed '%s'"),_("workstations"));
+ $num_ter_str = sprintf(_("Number of listed '%s'"),_("terminals"));
+ $num_pho_str = sprintf(_("Number of listed '%s'"),_("phones"));
+ $num_prt_str = sprintf(_("Number of listed '%s'"),_("printers"));
+ $num_com_str = sprintf(_("Number of listed '%s'"),_("network components"));
+ $num_new_str = sprintf(_("Number of listed '%s'"),_("new devices"));
+ $num_wws_str = sprintf(_("Number of listed '%s'"),_("windows workstations"));
+ $num_dep_str = sprintf(_("Number of listed '%s'"),_("departments"));
$str = " ".$cnts['server']." ";
@@ -457,7 +484,7 @@ class divListSystem extends MultiSelectWindow
title='".$num_new_str."' alt='".$num_new_str."'> ".$cnts['NewDevice']." ";
$str.= " ".$cnts['winstation']." ";
- $str.= " ".$num_deps." ";
$this->set_List_Bottom_Info($str);