Code

Updated filtering again
[gosa.git] / include / class_MultiSelectWindow.inc
index 738dabc80f3116cdf78f7f259fc76db7c7232f72..c344e537e7961cbeda8c7fc44c8fcf49ce63d75f 100644 (file)
@@ -27,12 +27,13 @@ class MultiSelectWindow{
        var $is_headpage                          = false;      // if true the design changes
        var $filterName                           = "Liste";
        var $DepartmentsAdded           = false;
+  var $Added_Departments  = array();
        var $selectedBase       = "";
 
   var $DivHeight          = "";
 
   var $HideFilterPart     = false;
-
+  var $List_Bottom_Info   = "";
   var $SaveAdditionalVars = array();  // Additional Post vars to store 
 
        function ClearElementsList()
@@ -297,7 +298,12 @@ class MultiSelectWindow{
 
                $divlist = new divlist($this->string_Title);
                $divlist->SetSummary($this->string_Summary);
-               $divlist->SetEntriesPerPage(0); // 0 for scrollable list 
+               $divlist->SetEntriesPerPage(0); // 0 for scrollable list
+
+    /* Display list footer with summary of all listed entries */
+    if(isset($this->config->data['MAIN']['LIST_SUMMARY']) && preg_match("/true/i",$this->config->data['MAIN']['LIST_SUMMARY'])){
+      $divlist->SetFooter($this->get_List_Bottom_Info());
+    }
   
     if($this->DivHeight != ""){
       $divlist->SetHeight($this->DivHeight);
@@ -548,6 +554,7 @@ class MultiSelectWindow{
        function AddDepartments($base = false,$numtabs = 3)
        {
                $this->DepartmentsAdded = true;
+    $this->Added_Departments = array();
 
                /* check for a valid base */
                if(!$base){
@@ -617,8 +624,19 @@ class MultiSelectWindow{
                        }
 
                        $this->AddElement($row);
+      $this->Added_Departments[] = $row;
                }
        }
+
+  function set_List_Bottom_Info($str)
+  {
+    $this->List_Bottom_Info = $str;
+  }
+
+  function get_List_Bottom_Info()
+  {
+    return($this->List_Bottom_Info); 
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>