X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/bf5e13802a852ae3d121bb9a88237e9f1da2c33f..68e567775ffff90eadcc4169f946a083f1f8b44b:/lib/MECON/Marco/MenuVertical.php
diff --git a/lib/MECON/Marco/MenuVertical.php b/lib/MECON/Marco/MenuVertical.php
index 1f87b81..972cc83 100644
--- a/lib/MECON/Marco/MenuVertical.php
+++ b/lib/MECON/Marco/MenuVertical.php
@@ -1,72 +1,55 @@
-
-// +----------------------------------------------------------------------+
-//
-// $Id$
-// $Author$
-// $URL$
-// $Date$
-// $Rev$
-//
+
+-------------------------------------------------------------------------------
+$Id$
+-----------------------------------------------------------------------------*/
// +X2C includes
require_once 'MECON/Marco/Menu.php';
// ~X2C
-// +X2C Class 103 :MenuVertical
+// +X2C Class 103 :MECON_Marco_MenuVertical
/**
* Clase que se encarga del manejo de los menues verticales
*
+ * @package MECON_Marco
* @access public
*/
-class MenuVertical extends Menu {
+class MECON_Marco_MenuVertical extends MECON_Marco_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
/**
* 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) // ~X2C
{
$c= count($this->_componentes);
@@ -74,24 +57,60 @@ class MenuVertical extends Menu {
$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.'
';
+ $row = array ($menutmp);
+ $TABLA->addRow($row,'align="left"');
$TABLA->updateCellAttributes(0,0,'colspan="2"');
+
+ $SEP = array('',
+ ''
+ );
+ $TABLA->addRow($SEP);
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($SEP);
}
$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='
';
+
+ $this->_tabla->addRow($row,'width=152 align="left" bgcolor="#FFFFFF" valign="top"');
+
+//AGREGO EL CUERPO
+ $TABLA2 = new HTML_Table('width="600"align="right" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"');
+ $row = array();
+ $tmp = '';
+ //AGREGO EL MENU VERTICAL
+ 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 = '';
+ //Agrego si corresponde el espacio al inicio
+ if ($this->_configuracion['espacios']) {
+ $tmp.='
';
+ }
+ //
+
foreach ($body as $bod) {
if (is_object($bod)) {
if (method_exists($bod,'toHtml')) {
@@ -105,14 +124,23 @@ class MenuVertical extends Menu {
$tmp.=$bod;
}
}
- $row = array ($tmp);
- $this->_tabla->setCellContents (1,1,$row);
- $this->_tabla->setCellAttributes(1,1,'align="center" bgcolor="#FFFFFF"');
+ //Agrego si corresponde el espacio al final
+ if ($this->_configuracion['espacios']) {
+ $tmp.='
';
+ }
+ //
+ $row[] = $tmp;
+ $TABLA2->addRow($row, 'valign="top"');
+ $row = array ($TABLA2->toHtml());
+ $this->_tabla->setCellContents (0,2,$row);
+ $this->_tabla->setCellAttributes(0,2,'align="center" bgcolor="#FFFFFF" valign="top"');
- $this->_tabla->updateColAttributes (1,'width="600"');
+ $this->_tabla->updateColAttributes (1,'width="8" bgcolor="#FFFFFF"');
+ $this->_tabla->updateColAttributes (2,'width="600" bgcolor="#FFFFFF"');
+//
}
// -X2C
-} // -X2C Class :MenuVertical
+} // -X2C Class :MECON_Marco_MenuVertical
?>
\ No newline at end of file