X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_listing.inc;h=bfc9c0735a2f92d51c02d637568023cd84faa39c;hb=b9fc1972cf2270252fc2a9940feab21c93372e94;hp=d4f972d3da2c5357fdb2f11ed6fe0c502125e3f3;hpb=5ab7ebd28e53d52c3e6f3eddebde408550226ec2;p=gosa.git diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index d4f972d3d..bfc9c0735 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -28,6 +28,7 @@ class listing { var $departmentBrowser= false; var $departmentRootVisible= false; var $multiSelect= false; + var $singleSelect= false; var $template; var $headline; var $base; @@ -121,9 +122,14 @@ class listing { } + function getFilter() + { + return($this->filter); + } + + function setFilter($filter) { - $filter->setCategories($this->categories); $this->filter= &$filter; if ($this->departmentBrowser){ $this->departments= $this->getDepartments(); @@ -155,7 +161,7 @@ class listing { $this->xmlData= $this->xmlData["list"]; // Load some definition values - foreach (array("departmentBrowser", "departmentRootVisible", "multiSelect", "baseMode") as $token) { + foreach (array("departmentBrowser", "departmentRootVisible", "multiSelect","singleSelect", "baseMode") as $token) { if (isset($this->xmlData['definition'][$token]) && $this->xmlData['definition'][$token] == "true"){ $this->$token= true; @@ -239,7 +245,7 @@ class listing { isset($config['sortType'])) { $this->sortAttribute= $config['sortAttribute']; $this->sortType= $config['sortType']; - $sorter= " ".image("images/lists/sort-".($this->sortDirection[$index]?"up":"down").".png", null, $this->sortDirection[$index]?_("Up"):_("Down"), "text-top"); + $sorter= " ".image("images/lists/sort-".($this->sortDirection[$index]?"up":"down").".png", null, $this->sortDirection[$index]?_("Sort ascending"):_("Sort descending"), "text-top"); } $sortable= (isset($config['sortAttribute'])); @@ -289,16 +295,23 @@ class listing { $result.= "
\n"; + $result.= " | "; + if($this->multiSelect){ + $result.= ""; + }else{ + $result.= " "; + } + $result.=" | \n"; } foreach ($this->header as $header) { $result.= $header; @@ -326,7 +339,7 @@ class listing { $result.="||
"; } @@ -363,6 +376,10 @@ class listing { $trow.=" | \n"; } + if ($this->singleSelect) { + $trow.=" | \n"; + } + foreach ($this->xmlData['table']['column'] as $index => $config) { $renderedCell= $this->renderCell($config['value'], $entry, $row); $trow.=" | colprops[$index]." class='list0'>".$renderedCell." | \n"; @@ -383,8 +400,16 @@ class listing { // Complete list by sorting entries for _sort$index and appending them to the output $entryIterator= new listingSortIterator($this->entries, $this->sortDirection[$this->sortColumn], "_sort".$this->sortColumn, $this->sortType); foreach ($entryIterator as $row => $entry){ - $result.="
"; } } + $result.= " |