X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_listing.inc;h=bfc9c0735a2f92d51c02d637568023cd84faa39c;hb=b9fc1972cf2270252fc2a9940feab21c93372e94;hp=52b5cc0c06fbbcab5e8e9127b48d6c7f541a77a1;hpb=0e13ec6f5ff52bfb2fa5d4cf797f0c1516a733eb;p=gosa.git diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 52b5cc0c0..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'])); @@ -271,10 +277,6 @@ class listing { return($message); } - // Display filter editor - if(0) - return($this->filter->filterEditor->execute()); - // Some browsers don't have the ability do do scrollable table bodies, filter them // here. $switch= false; @@ -293,16 +295,23 @@ class listing { $result.= "
\n"; + $result.= " | "; + if($this->multiSelect){ + $result.= ""; + }else{ + $result.= " "; + } + $result.=" | \n"; } foreach ($this->header as $header) { $result.= $header; @@ -330,7 +339,7 @@ class listing { $result.="||
"; } @@ -367,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"; @@ -387,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.= " |