From 2b65edd969598d67825ebb62b55886b87456db55 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Nov 2007 07:29:30 +0000 Subject: [PATCH] Some list changes git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7753 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ObjectListViewport.inc | 41 ++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/include/class_ObjectListViewport.inc b/include/class_ObjectListViewport.inc index 340a69f7d..efecf1dd7 100644 --- a/include/class_ObjectListViewport.inc +++ b/include/class_ObjectListViewport.inc @@ -31,9 +31,10 @@ class ObjectListViewport { private $entryFormat; private $attributes= array('cn', '_icon', '_actions', 'dn'); - private $b_displayHeader = TRUE; - private $b_displayFooter = TRUE; /* <---- Dummy here */ + private $b_displayHeader = TRUE; + private $b_displayFooter = TRUE; + private $i_numberOfCols = 0; /*! \brief Container for objects @@ -62,7 +63,7 @@ class ObjectListViewport { /* Dummy here */ $cr= Registry::getInstance("ConfigManager"); $cr->setSection($config); - $this->headline= $this->parseHeadline($cr->getValue("headline")); + $this->parseHeadline($cr->getValue("headline")); $this->footer= $cr->getValue("footer"); $this->entryFormat= $cr->getValue("entryFormat"); @@ -91,12 +92,11 @@ class ObjectListViewport { \return HTML rendered headline */ private function renderHeadline(){ - $buffer ="\n"; + $buffer ="
\n"; $buffer.="\n"; foreach($this->headline as $key => $value){ $buffer .= "\n"; } - $buffer.=""; $buffer.="\n"; $buffer.="
".$value['name']." 
\n"; return $buffer; @@ -161,13 +161,33 @@ class ObjectListViewport { $buffer="\n"; - foreach($tmp as $key => $value){ - $buffer .= "". - "
". +// foreach($tmp as $key => $value){ +// $buffer .= "". +// "
". +// $value. +// "
". +// "\n"; +// } + for($i = 0 ; $i < $this->i_numberOfCols ; $i ++){ + + $value = $tmp[$i]; + if($i == ($this->i_numberOfCols -1 )){ + + $buffer .= "". + "
". + $value. + "test
". + "\n"; + }else{ + $buffer .= "". + "
". $value. "
". "\n"; + } } + + $buffer.="\n"; return $buffer."\n"; @@ -254,6 +274,8 @@ class ObjectListViewport { /* Each cell definition is seperated by | * split by and go through each definition */ + $this->headline = array(); + $this->i_numberOfCols = 0; $tmp = split("\|",trim($data,"|")); $cell_formats = array(); foreach($tmp as $key => $data){ @@ -298,8 +320,9 @@ class ObjectListViewport { } } $cell_formats[$key] = array("name" => $s_name, "width" => $s_width, "alignment" => $s_alignment,"style" => $s_style); + $this->i_numberOfCols ++; } - return($cell_formats); + $this->headline = $cell_formats; } -- 2.30.2