Code

Fixe
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Feb 2010 17:41:14 +0000 (17:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Feb 2010 17:41:14 +0000 (17:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15638 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/system-filter.xml
gosa-plugins/systems/admin/systems/system-list.xml

index 08e1ced82a790d296bbf9efcb8ca486d459b0d0e..ccaa30722288e23e910543d54b07a9527eca43fc 100644 (file)
@@ -96,7 +96,7 @@ class systemManagement extends management
 
     // Build headpage
     $headpage = new listing(get_template_path("system-list.xml", true));
-    $headpage->registerElementFilter("systemDescription", "systemManagement::systemDescription");
+    $headpage->registerElementFilter("systemRelease", "systemManagement::systemRelease");
     $headpage->setFilter($filter);
     $filter->setConverter('INCOMING', 'systemManagement::incomingFilterConverter');
 
@@ -1348,25 +1348,28 @@ class systemManagement extends management
   }
 
 
-  function systemDescription($a,$b,$c,$d)
+  function systemRelease($a,$b,$c,$d)
   {
     global $config;
 
     // A ... solution, but I can't figure out a better solution right now.
     $headpage = session::get('SYSTEMS_DESCRIPTION_FILTER');
-    if(!is_object($headpage)) return($str);
-    $str = $headpage->filterLink($a,$b,$c,$d);
+    if(!is_array($d) || !count($d) || !is_object($headpage)) return("&nbsp;");
+
     $ldap = $config->get_ldap_link();
     $ldap->cd($config->current['BASE']);
-    $ldap->search("(&(objectClass=gosaGroupOfNames)(member=".$b."))");
+    $ldap->search("(&(objectClass=gosaGroupOfNames)(FAIclass=*)(member=".$b."))",array('FAIclass'));
+    
     while($attrs = $ldap->fetch()){
-      $str .= "&nbsp;<img class='center' src='plugins/ogroups/images/ogroup.png' 
+
+      $rel = preg_replace("/^.*:/","",$attrs['FAIclass'][0]);
+      $str = "&nbsp;<img class='center' src='plugins/ogroups/images/ogroup.png' 
           title='"._("Object group member")."' 
-          alt='("._("Object group member").")' >";
+          alt='("._("Object group member").")' >&nbsp;".$rel;
       return($str);
     }
     
-    return($str);
+    return("&nbsp;");
   }
 
 
index 9583ce829e2019707e85ff820cef3f21ad889ecf..4a452ccef7b10c859da0c69e0fac338095a3edc2 100644 (file)
@@ -17,6 +17,7 @@
       <attribute>description</attribute>
       <attribute>gotoMode</attribute>
       <attribute>FAIstate</attribute>
+      <attribute>FAIclass</attribute>
       <attribute>macAddress</attribute>
       <attribute>gotoLastUser</attribute>
     </query>
index d10d8460b47216374d69fc334f2ded7bebe26a65..563d7fd12f89015befeb8c4c46fc651a6314eb59 100644 (file)
   </definition>
 
   <table>
-    <layout>|20px;c||250px|170px;r|</layout>
+    <layout>|20px;c||250px||170px;r|</layout>
 
     <department>
       <value>%{filter:objectType(dn,objectClass)}</value>
       <label>Description</label>
       <sortAttribute>description</sortAttribute>
       <sortType>string</sortType>
-      <value>%{filter:systemDescription(row,dn,"%s",description)}</value>
+      <value>%{filter:link(row,dn,"%s",description)}</value>
+      <export>true</export>
+    </column>
+
+    <column>
+      <label>Release</label>
+      <sortAttribute>description</sortAttribute>
+      <sortType>string</sortType>
+      <value>%{filter:systemRelease(row,dn,"%s",FAIclass)}</value>
       <export>true</export>
     </column>