X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/f1e8dd28b05b78b0992493d8508bddaab2bd13d6..511afeece45e35328bb8fe4e56ab0453554b7689:/lib/MECON/Marco/MenuVertical.php diff --git a/lib/MECON/Marco/MenuVertical.php b/lib/MECON/Marco/MenuVertical.php index 7e91148..838cf57 100644 --- a/lib/MECON/Marco/MenuVertical.php +++ b/lib/MECON/Marco/MenuVertical.php @@ -1,118 +1,119 @@ - -// +----------------------------------------------------------------------+ -// -// $Id$ -// $Author$ -// $URL$ -// $Date$ -// $Rev$ -// + +------------------------------------------------------------------------------- +$Id$ +-----------------------------------------------------------------------------*/ -// +X2C includes require_once 'MECON/Marco/Menu.php'; -// ~X2C -// +X2C Class 103 :MenuVertical /** * Clase que se encarga del manejo de los menues verticales * * @access public */ -class MenuVertical extends Menu { - // ~X2C - - - // +X2C Operation 110 - /** - * Constructor. Recibe el nombre del directorio en donde esta instalado el sistema - * - * @param array $configuracion Configuracion del sistema - * - * @return void - * @access public - */ - function MenuVertical($configuracion = null) // ~X2C - { - parent::Menu($configuracion); - } - // -X2C - - // +X2C Operation 141 +class MECON_Marco_MenuVertical extends MECON_Marco_Menu { /** * Funcion para agregar el cuerpo de la pagina a la pagina * * @param string $body Cuerpo del mensaje para agregar a la pagina * @param string $titulo Titulo de la seccion seleccionada + * @param mixed $menu Menu a mostrar * * @return void * @access public */ - function addBody($body, $titulo) // ~X2C + function addBody($body, $titulo, $menu = null) { - $c= count($this->_componentes); - $tmp = $this->_componentes; $this->_componentes = array (); $this->_armarArraySecciones($tmp); - $TABLA = new HTML_Table('width=160 align="left" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0" height="1"'); - $menu =' '.$titulo.''; - $row = array ($menu); - $TABLA->addRow($row,'align="left" bgcolor="#FFFFFF" height="1"'); + $TABLA = new HTML_Table('width=152 align="left" cellspacing="0" + cellpadding="0" border="0" height="1" + background="/MECON/images/general_titulo_menu.gif"'); + $menutmp ='
 '.$titulo.'
'; + $TABLA->addRow(array ($menutmp),'align="left"'); $TABLA->updateCellAttributes(0,0,'colspan="2"'); - + + $TABLA->addRow( + array( + '', + '' + ) + ); + foreach ($this->_componentesVertical as $comp) { - $row = array ('',' '); - $TABLA->addRow($row); - $TABLA->addRow($comp,'align="left" bgcolor="#FFFFFF" height="1"'); - $TABLA->updateColAttributes(0,'align="right" width="34"'); - $TABLA->updateColAttributes(1,'align="left"'); + $TABLA->addRow($comp,'align="left" height="3" + background="/MECON/images/general_fondo_gris"'); + $TABLA->updateColAttributes(0, + 'align="right" width="34" height="3"'); + $TABLA->updateColAttributes(1,'align="left" width="118"'); + $TABLA->addRow( + array( + '', + '' + ) + ); } $TABLA->updateCellAttributes(0,0,'align="left"'); - $row = array ($TABLA->toHtml()); - $this->_tabla->addRow($row,'width=160 align="left" bgcolor="#FFFFFF" valign="top" rowspan="2"'); - - $tmp='
'; - foreach ($body as $bod) { - if (is_object($bod)) { - if (method_exists($bod,'toHtml')) { - $tmp.=$bod->toHtml(); - } - else { - trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING); - } + + $cuerpo = ''; + if (is_array($body)) { + if ($this->_configuracion['espacios']) { + $cuerpo.= ' 
'; } - else { - $tmp.=$bod; + foreach ($body as $bod) { + if (is_object($bod)) { + if (method_exists($bod,'toHtml')) { + $cuerpo.= $bod->toHtml(); + } + else { + trigger_error('El metodo no existe! - '. + get_class($bod).'::toHtml()', + E_USER_WARNING); + } + } + else { + $cuerpo.= $bod; + } } - } - $row = array ($tmp); - $this->_tabla->setCellContents (1,1,$row); - $this->_tabla->setCellAttributes(1,1,'align="center" bgcolor="#FFFFFF"'); + } + else { + $cuerpo = $body; + } + + if ($menu) { + $MENUVERTICAL = new HTML_Table ('width="608" align="left" + bgcolor="#FFFFFF"'); + $MENUVERTICAL->addRow(array($menu, $cuerpo), + 'valign="top"'); + $MENUVERTICAL->updateColAttributes(0, 'width="10%"'); + $cuerpo = $MENUVERTICAL; + } - $this->_tabla->updateColAttributes (1,'width="600"'); + $this->_tabla->addRow(array($TABLA, $cuerpo),'align="left" bgcolor="#FFFFFF" valign="top"'); + $this->_tabla->updateColAttributes(0, 'width="10%"'); + $this->resultado[] = $this->_tabla; } - // -X2C - -} // -X2C Class :MenuVertical - -?> +} +?> \ No newline at end of file