X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/8a7c41689e3915b23a5e0a59a4e849289a287438..abcd5221dfc6663267b610a313c5d601a9240754:/lib/MECON/Marco/MenuHorizontal.php?ds=sidebyside diff --git a/lib/MECON/Marco/MenuHorizontal.php b/lib/MECON/Marco/MenuHorizontal.php index 172d149..d926ebc 100644 --- a/lib/MECON/Marco/MenuHorizontal.php +++ b/lib/MECON/Marco/MenuHorizontal.php @@ -31,6 +31,8 @@ $Id$ require_once 'MECON/Marco/Menu.php'; // ~X2C +require_once 'MECON/HTML/Image.php'; + // +X2C Class 100 :MECON_Marco_MenuHorizontal /** * Clase que se encarga del manejo de los menues horizontales @@ -54,23 +56,33 @@ class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu { */ function addBody($body, $titulo, $menu = null) // ~X2C { - $c = count($this->_componentes); - //Agrego el titulo - $tit = ''.$titulo.''; - $row = array ($tit); - $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$c.'"'); - // + $tmp = $this->_componentes; $this->_componentes = array (); $this->_armarArraySecciones($tmp); - $this->_tabla->addRow($this->_componentes,'align="center" bgcolor="#FFFFFF"'); + $this->_tabla->addRow($this->_componentes,'align="center" bgcolor="#CCCCCC" valign="top"'); + $c = count($this->_componentes); $colcount = $this->_tabla->getColCount(); $width = 100 / $colcount; for ($col=0; $col < $colcount; $col++) { $this->_tabla->updateColAttributes($col,'width="'.$width.'%"'); } + + $imagen = new MECON_HTML_Image('/MECON/images/general_linea.gif', str_repeat('=', 108)); + $i = $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$c.'"'); + $this->_tabla->updateRowAttributes($i, 'height="1"'); + + //Agrego el titulo + $row = array + ($this->_armarEncabezado($titulo.$this->_configuracion['subtitulo'])); + $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"'); + $imagen = new MECON_HTML_Image('/MECON/images/general_linea2.gif', + str_repeat('.', 108), array('border' => 0, 'align' => 'center')); + $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$c.'"'); + // + $tmp=''; //Agrego si corresponde el espacio al inicio @@ -79,7 +91,25 @@ class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu { $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"'); } // - + //AGREGO EL MENU VERTICAL + $TABLA = new HTML_Table('width=760 align="center" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"'); + $row = array(); + $tmp = ''; + if ($menu) { + if (is_object($menu)) { + if (method_exists($menu,'toHtml')) { + $tmp.=$menu->toHtml(); + } + else { + trigger_error('El metodo no existe!', E_USER_WARNING); + } + } + else { + $tmp.=$menu; + } + $row[] = $tmp; + } + $tmp = ''; foreach ($body as $bod) { if (is_object($bod)) { if (method_exists($bod,'toHtml')) { @@ -93,8 +123,10 @@ class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu { $tmp.=$bod; } } - $row = array ($tmp); - $this->_tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'.$c.'"'); + $row[] = $tmp; + $TABLA->addRow($row); + $row = array ($TABLA->toHtml()); + $this->_tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'.$c.'" valign="top"'); //Agrego si corresponde el espacio al final if ($this->_configuracion['espacios']) { $row = array (' ');