X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/5e47ceddf6029374226b156e2eece1c1cb5e52fe..ce1b40d981eccb0f01656d9796582d9562685f17:/lib/MECON/Marco/MenuPrincipal.php?ds=sidebyside diff --git a/lib/MECON/Marco/MenuPrincipal.php b/lib/MECON/Marco/MenuPrincipal.php index 5aee547..146757f 100644 --- a/lib/MECON/Marco/MenuPrincipal.php +++ b/lib/MECON/Marco/MenuPrincipal.php @@ -1,30 +1,29 @@ - -// +----------------------------------------------------------------------+ -// -// $Id$ -// $Author$ -// $URL$ -// $Date$ -// $Rev$ -// + +------------------------------------------------------------------------------- +$Id$ +-----------------------------------------------------------------------------*/ -#require_once 'PEAR.php'; require_once 'HTML/Table.php'; // +X2C includes @@ -113,7 +112,6 @@ class MenuPrincipal extends MenuHorizontal { $row = array (''.$this->_seccionSeleccionada->_nombre.''); $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$colspan.'"'); - $tabla = new HTML_Table (array('width' => '760', 'border' => 0, 'celspacing' => 0, 'celpadding' => 0)); //Agrego si corresponde el espacio al inicio if ($body['espacios']) { $espacio = ' 
'; @@ -122,18 +120,18 @@ class MenuPrincipal extends MenuHorizontal { $espacio = ''; } // + +//SI HAY MENU ARMO UNA TABLA, SINO TIRO DIRECTAMENTE $row = array(); $tmp = ''; if ($body['menuVertical']) { if (is_object($body['menuVertical'])) { if (method_exists($body['menuVertical'],'toHtml')) { $tmp.=$body['menuVertical']->toHtml(); - } - else { + } else { trigger_error('El metodo no existe!', E_USER_WARNING); } - } - else { + } else { $tmp.=$body['menuVertical']; } $row[] = $tmp; @@ -146,27 +144,29 @@ class MenuPrincipal extends MenuHorizontal { if (is_object($bod)) { if (method_exists($bod,'toHtml')) { $tmp.=$bod->toHtml(); - } - else { + } else { trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING); } - } - else { + } else { $tmp.=$bod; } } $tmp.= $espacio; $row[] = $tmp; - } - else { + } else { $row[] = $body['body']; } - $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF"'); if ($body['menuVertical']) { + $tabla = new HTML_Table (array('width' => '760', 'border' => 0, 'celspacing' => 0, 'celpadding' => 0)); + $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF"'); $tabla->updateCellAttributes($tt, 0, 'valign="top" width="1%"'); + $contenido[] = $tabla; + } else { + $contenido = $row; } - $this->_tabla->addRow(array($tabla->toHtml()),'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); +// + $this->_tabla->addRow($contenido,'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); } $row = array ($body['pie']);