Code

Fixed Terminal/Workstation -template string in mangement list.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Nov 2006 04:29:19 +0000 (04:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Nov 2006 04:29:19 +0000 (04:29 +0000)
'Workstation template for ..' the department of the object will be shown instead of current selected department

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5180 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_divListSystem.inc
plugins/admin/systems/class_systemManagement.inc

index 1d465a18a66cf79d0c6872fff8c382839b67088c..6353c3e4b2d49029ae6fa4a0a0e2c00d05b674ef 100644 (file)
@@ -184,8 +184,9 @@ class divListSystem extends MultiSelectWindow
         $action2= "<input class='center' type='image' src='images/cdrom.png' alt='"._("Create CD")."'   name='gen_cd_%KEY%' title='"._("Create FAI CD")."'>".$action2;
       }
 
+      /* Add Message generated by mangement->reload*/  
       if(isset($val['message'])){
-        $display.= "  (".$val['message']." '".$this->config->idepartments[$_SESSION['CurrentMainBase']]."'  )";
+        $display.= "  (".$val['message'].")";
       }
 
       $img    = $this->parent->convert_list($val);
index a039c2ecca8e3ef1f5715b2cb9340b44c47e326c..4d210ca563e47a6d75fcad561d11b27c3a2c3880 100644 (file)
@@ -720,6 +720,12 @@ echo "ACL CHECK!";
         }
       } 
 
+      /* Create a string containing the last part of the department. */
+      $dn_name = preg_replace("#^([^/]+/)*#","",convert_department_dn(@LDAP::fix($tmp)));
+      if(empty($dn_name)){
+        $dn_name = "/";
+      }
+      
       /* Detect type of object and create an entry for $this->terminals */
       $terminal = array();
       if ((in_array ($tmp, $responsible)) || ($add != "")){
@@ -731,7 +737,7 @@ echo "ACL CHECK!";
           } else {
             $terminal             = $value;
             $terminal['type']     = "D";
-            $terminal['message']  = _("Terminal template for");
+            $terminal['message']  = _("Terminal template for")."&nbsp;'".$dn_name."'&nbsp;";
             $terminal['location'] = array_search($tmp, $this->config->departments); 
           }
         } elseif (in_array_ics('gotoWorkstation', $value["objectClass"])){
@@ -743,7 +749,7 @@ echo "ACL CHECK!";
             $terminal             = $value;
             $terminal['type']     = "D";
             $terminal['location'] = array_search($tmp, $this->config->departments);
-            $terminal['message']  = _("Workstation template for");
+            $terminal['message']  = _("Workstation template for")."&nbsp;'".$dn_name."'&nbsp;";
           }
           if (isset($value["FAIstate"][0])){
             $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]);