]> git.llucax.com Git - mecon/intranet.git/blob - sistema/local_lib/HTML_Noticia.php
bbbf2002f6157f84cdc3384c3e531ff2cda32eec
[mecon/intranet.git] / sistema / local_lib / HTML_Noticia.php
1 <?php
2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // |                      Ministerio de Economía                        |
5 // |                             Intranet                              |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet.                                    |
8 // |                                                                    |
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.                             |
13 // |                                                                    |
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.                           |
18 // |                                                                    |
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: Thu Jul 3 14:43:38 2003                                   |
24 // | Autor:  Gonzalo Merayo <gmeray@mecon.gov.ar>                                                    |
25 // +--------------------------------------------------------------------+
26 //
27 // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $
28 //
29
30
31
32 // +X2C includes
33 require_once 'HTML/Table.php';
34 // ~X2C
35
36 // +X2C Class 162 :HTML_Noticia
37 /**
38  * @access public
39  */
40 class HTML_Noticia extends HTML_Table {
41     /**
42      * @var    noticia $noticia
43      * @access public
44      */
45     var $noticia;
46
47     /**
48      * @var    bool $completa
49      * @access public
50      */
51     var $completa;
52
53     /**
54      * @var    int $nuevo
55      * @access public
56      */
57     var $nuevo;
58
59     // ~X2C
60
61     // +X2C Operation 166
62     /**
63      * @return void
64      * @access public
65      */
66     function toHTML() // ~X2C
67     {
68         $this->addRow(array($this->noticia->getTitulo2()), array('class' => 'subtitulo'));
69         $img_str = null;
70         if($this->nuevo)
71         {
72           $nuevo = new HTML_Image('images/nuevo.gif');
73           $img_str = $nuevo->toHTML();
74         }
75         $this->addRow(array($this->noticia->getTitulo().$img_str), array('class' => 'titulo_noticia'));
76         $tmp = $this->noticia->getFecha();
77         $this->addRow(array($tmp->format('(%d/%m/%Y)')),
78                                  array('class' => 'fecha_noticia'));
79         $mas = new HTML_Image('images/mas.gif');
80         $this->addRow(array($mas->toHTML().'ver más'),
81                                  array('class' => 'ver_mas'));
82         $this->addRow(array(new HTML_Image('images/linea_puntos.gif')),
83                                  array('class' => 'ver_mas'));
84         return parent::toHTML();    
85     }
86     // -X2C
87
88     // +X2C Operation 167
89     /**
90      * @param  noticia $noticia 
91      *
92      * @return void
93      * @access public
94      */
95     function HTML_Noticia($noticia) // ~X2C
96     {
97         $this->noticia = $noticia;
98         $params = array('width'      => '280',
99                         'border'     =>'0',
100                         'cellPadding'=>'0');
101         parent::HTML_Table($params);
102     }
103     // -X2C
104
105
106     // +X2C Operation 175
107     /**
108      * @param  bool $completa 
109      *
110      * @return void
111      * @access public
112      */
113     function setCompleta($completa) // ~X2C
114     {
115         $this->completa = $completa;
116     }
117     // -X2C
118
119     // +X2C Operation 176
120     /**
121      * @param  bool $nuevo 
122      *
123      * @return void
124      * @access public
125      */
126     function setNuevo($nuevo) // ~X2C
127     {
128         $this->nuevo = $nuevo;
129     }
130     // -X2C
131
132 } // -X2C Class :HTML_Noticia
133 ?>