Code

Added network card manufacturer string to network template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jun 2010 13:00:05 +0000 (13:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jun 2010 13:00:05 +0000 (13:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18849 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc
gosa-plugins/systems/admin/systems/network.tpl

index 7acfd33fbc0bd103f38d3fd6991ecc8f511f2cf9..716027dc7b5a705312edbe17372ad8b861f701c7 100644 (file)
@@ -370,6 +370,16 @@ class termDNS extends plugin
     $smarty->assign("dhcpParentNodes",$this->dhcpParentNodes);
     $smarty->assign("dhcpParentNodeCnt",count($this->dhcpParentNodes));
 
+    // Assign network card manufacturer string
+    $smarty->assign("macManufacturer", "");
+    if ($this->config->get_cfg_value("core","gosaRpcServer") != ""){
+        $rpc = $this->config->getRpcHandle();
+        $res = $rpc->getMacManufacturer($this->macAddress);
+        if($rpc->success()){
+            $smarty->assign('macManufacturer',$rpc->getMacManufacturer($this->macAddress));
+        }
+    }
+
     /**********
      * DNS Handling
      **********/
@@ -470,7 +480,6 @@ class termDNS extends plugin
       $smarty->assign("changeStateForRecords",$changeStateForRecords);
 
       $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress") && $this->acl_is_writeable("ipHostNumber")?"rw":"");
-
       $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
     }
 
index 97d308b1a66d93519e9db8c27303dc8576fbd7c2..47c99de40c4ff329aa7f533046830c8c6e274830 100644 (file)
             {render acl=$macAddressACL}
               <input   type='text' name="macAddress"   id="macAddress" value="{$macAddress}">
             {/render}
+
             {render acl=$autonetACL}
              <button type='submit' name='autonet'>{t}Autodetect{/t}</button>
             {/render}
+            {if macManufacturer!=""}
+                <br><span style='font-size:xx-small;'>{$macManufacturer}</span>
+            {/if}
           </td>
                                </tr>
       </table>