2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // | Ministerio de Economía |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet. |
9 // | Intranet is free software; you can redistribute it and/or modify |
10 // | it under the terms of the GNU General Public License as published |
11 // | by the Free Software Foundation; either version 2 of the License, |
12 // | or (at your option) any later version. |
14 // | Intranet is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Creado: Mon Nov 3 16:53:37 2003
24 // | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
25 // +--------------------------------------------------------------------+
27 // $Id: HTML_Mensaje.php 295 2004-01-30 17:20:58Z llucar $
30 require_once 'MECON/HTML/Image.php';
31 require_once 'MECON/HTML/Link.php';
32 require_once 'HTML/Table.php';
35 * Clase para mostrar mensajes en Intranet.
39 class HTML_Institucional extends HTML_Table {
59 * Ancho de la ventana js que se abre.
67 * Alto de la ventana js que se abre.
77 * @param string $pagina Ruta a la página del institucional.
78 * @param string $texto Texto del mensaje.
79 * @param int $ancho Ancho del mensaje.
80 * @param int $ancho_js Ancho de la ventana nueva.
81 * @param int $alto_js Alto de la ventana nueva.
86 function HTML_Institucional($pagina, $texto, $ancho = 180, $ancho_js = 500,
89 $this->_pagina = $pagina;
90 $this->_texto = $texto;
91 $this->_ancho = $ancho;
92 $this->_ancho_js = $ancho_js;
93 $this->_alto_js = $alto_js;
104 //Ajusto el ancho del mensaje
105 $ancho_msg = $this->_ancho - 30;
108 $IMG_Izquierda =& new MECON_HTML_Image(
109 '/sistemas/intranet/images/institucional_icono.gif');
112 $attrs = 'width='. $this->_ancho_js .',height='. $this->_alto_js
113 .',screenX=50,screenY=50,scrollbars=yes';
115 $attribute = "window.open('". $this->_pagina ."', '', '". $attrs
116 ."');return(false);";
117 $link = new MECON_HTML_Link('', $this->_texto);
118 $link->updateAttributes(array ('onClick' => $attribute));
120 //Armo la tabla contenedora
121 $tabla =& new HTML_Table (
124 'cellpadding' => '0',
125 'cellspacing' => '0',
126 'width' => $this->_ancho
133 array ('valign'=>'top')
135 $tabla->updateColAttributes(0, array('width'=>'30'));
136 $tabla->updateColAttributes(1,
138 'width' => $ancho_msg,
143 $tabla->updateCellAttributes(0, 1,
145 'class'=>'institucional'
149 return $tabla->toHtml();
153 * Obtener la hoja de estilos.
160 $css = '/sistemas/intranet/css/institucional.css';