From e4dcb4254ada03d975da10a99504a86147d637e3 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 19 Aug 2009 15:23:46 +0000 Subject: [PATCH] Added possibility to handle colspans in department chooser git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14088 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_listing.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index c50453a8e..7d8138348 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -267,11 +267,18 @@ class listing { } // Render defined department columns, fill the rest with some stuff + $rest= $this->numColumns - 1; foreach ($this->xmlData['table']['department'] as $index => $config) { - $result.="colprops[$index]." class='list1'>".$this->renderCell($config['value'], $entry, $row).""; + $colspan= 1; + if (isset($config['span'])){ + $colspan= $config['span']; + } + $result.="colprops[$index]." class='list1'>".$this->renderCell($config['value'], $entry, $row).""; + $rest-= $colspan; } - $last= count($this->xmlData['table']['department']) + 1; - $rest= $this->numColumns - $last; + + // Fill remaining cols with nothing + $last= $this->numColumns - $rest; for ($i= 0; $i<$rest; $i++){ $result.= "colprops[$last+$i-1]." class='list1'> "; } -- 2.30.2