1 | <?php |
---|
2 | /** |
---|
3 | * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana |
---|
4 | * @file proyecto_operativo_seguimiento.module |
---|
5 | * Drupal part Module to code proyectos operativos module |
---|
6 | * Copyright 2012 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL) |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or modify |
---|
9 | * it under the terms of the GNU General Public License as published by |
---|
10 | * the Free Software Foundation; either version 2 of the License, or |
---|
11 | * (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
21 | * |
---|
22 | * @author CENDITEL Merida - Ing. Diego Uzcategui |
---|
23 | * @date 2013-02-07 // (anno-mes-dia) |
---|
24 | * Modificado |
---|
25 | * @author CENDITEL Merida - Msc. Juan Vizcarrondo |
---|
26 | * @date 2013-11-19 // (anno-mes-dia) |
---|
27 | * Correccion de meses y formato numerico |
---|
28 | * @version 0.1 |
---|
29 | * |
---|
30 | */ |
---|
31 | |
---|
32 | /** |
---|
33 | * Pagina que muestra los seguimientos de todos los meses de una ae (cuadro resumen de seguimientos) |
---|
34 | */ |
---|
35 | function seguimiento_proyecto_page($node) { |
---|
36 | |
---|
37 | drupal_set_title(t('Seguimiento y Control de Proyecto Operativo')); |
---|
38 | |
---|
39 | $output = ''; |
---|
40 | $output .= '<br>'; |
---|
41 | |
---|
42 | $output .= _mostrar_datos_proyecto($node); |
---|
43 | $output .= _mostrar_indicadores_metafisica_seg_proyecto($node); |
---|
44 | $output .= _mostrar_indicadores_financieros_seg_proyecto($node); |
---|
45 | if (variable_get('proyectos_operativos_muestra_beneficiario', TRUE)) { |
---|
46 | $output .= _mostrar_beneficiarios_seg_proyecto($node); |
---|
47 | } |
---|
48 | $output .= _mostrarleyendazonacritica(); |
---|
49 | return $output; |
---|
50 | } |
---|
51 | |
---|
52 | /** |
---|
53 | * Pagina que carga los datos generales de una accion especifica (datos del proyecto y datos de la accion) |
---|
54 | */ |
---|
55 | function _mostrar_datos_proyecto($node) { |
---|
56 | $output = ''; |
---|
57 | |
---|
58 | $output .= '<fieldset><legend>Datos del Proyecto Operativo</legend>'; |
---|
59 | $output .= '<b>Codigo del Proyecto:</b> '.$node->field_proyecto_codigo[0]['value'].'<br>'; |
---|
60 | $output .= '<b>Nombre del Proyecto:</b> '.$node->titulo_asignado.'<br>'; |
---|
61 | $id_field1 = 'field_proyecto_fecha_i'; |
---|
62 | $fecha = explode(' ', $node->{$id_field1}[0]['value']); |
---|
63 | $output .= '<b>Fecha de Inicio:</b> '.$fecha[0].'<br>'; |
---|
64 | $id_field1 = 'field_proyecto_fecha_f'; |
---|
65 | $fecha = explode(' ', $node->{$id_field1}[0]['value']); |
---|
66 | $output .= '<b>Fecha Fin:</b> ' . $fecha[0] . '<br>'; |
---|
67 | $term = taxonomy_get_term($node->field_proyecto_pndes[0]['value']); |
---|
68 | $output .= '<b>Estrategia MCTI:</b> '.$term->name.'<br>'; |
---|
69 | $output .= '<b>Objetivo PNDES:</b> '.'<br>'; |
---|
70 | $output .= '<b>Estrategia PNDES:</b> '.'<br>'; |
---|
71 | $output .= '<b>Politica PNDES:</b> '.'<br>'; |
---|
72 | $output .= '</fieldset>'; |
---|
73 | |
---|
74 | return $output; |
---|
75 | } |
---|
76 | |
---|
77 | /** |
---|
78 | * Pagina que carga la tabla de indicadores de meta fÃsica del proyecto |
---|
79 | * revisado 13 marzo 2013 |
---|
80 | */ |
---|
81 | function _mostrar_indicadores_metafisica_seg_proyecto($node) { |
---|
82 | $output = ''; |
---|
83 | $meses = array( |
---|
84 | 0 => t('January'), |
---|
85 | 1 => t('February'), |
---|
86 | 2 => t('March'), |
---|
87 | 3 => t('April'), |
---|
88 | 4 => t('May'), |
---|
89 | 5 => t('June'), |
---|
90 | 6 => t('July'), |
---|
91 | 7 => t('August'), |
---|
92 | 8 => t('September'), |
---|
93 | 9 => t('Octuber'), |
---|
94 | 10 => t('November'), |
---|
95 | 11 => t('December'), |
---|
96 | ); |
---|
97 | $format_number = array( |
---|
98 | 'decimals' => variable_get('proyectos_operativos_number_decimals', 0), |
---|
99 | 'dec_point' => variable_get('proyectos_operativos_number_dec_point', ','), |
---|
100 | 'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'), |
---|
101 | ); |
---|
102 | //tabla de indicadores financieros de la accion especifica |
---|
103 | $tablas = array(); |
---|
104 | |
---|
105 | $header = array(); |
---|
106 | $header[] = array('data' => t('Mes')); |
---|
107 | $header[] = array('data' => t('Planificado')); |
---|
108 | $header[] = array('data' => t('Ejecutado')); |
---|
109 | $header[] = array('data' => t('% de Logro')); |
---|
110 | $header[] = array('data' => t('Estatus de Ejecución')); |
---|
111 | $header[] = array('data' => t('Información Complementaria')); |
---|
112 | $header[] = array('data' => t('Opciones Disponibles'),); |
---|
113 | |
---|
114 | $seg_metafisica_todos = _seguimiento_metafisica_todosmes_proyecto_load($node); |
---|
115 | |
---|
116 | $rows = array(); |
---|
117 | for($i=0; $i<12; $i++){ |
---|
118 | |
---|
119 | //calcular variacion por reformulacion |
---|
120 | $variacion_planificado_mes = _seguimiento_mesactual_metafisica_proyecto_reformulaciones_load($node, $i); |
---|
121 | |
---|
122 | $planificadoMes = $seg_metafisica_todos['seguimiento_metafisica_todosmes'][$i]['planificadoMes'] + $variacion_planificado_mes; |
---|
123 | $Ejecutado = $seg_metafisica_todos['seguimiento_metafisica_todosmes'][$i]['ejecutadoMes']; |
---|
124 | $infocomplementaria_metafisica = $seg_metafisica_todos['seguimiento_metafisica_todosmes'][$i]['infocomplementaria_metafisica']; |
---|
125 | $estatus_ejecucion = _calcularzonacritica($planificadoMes, $Ejecutado); |
---|
126 | $porczonacritica = $estatus_ejecucion['porczonacritica']; |
---|
127 | $textozona = $estatus_ejecucion['textozona']; |
---|
128 | $colorzona = $estatus_ejecucion['colorzona']; |
---|
129 | $colorfontzona = $estatus_ejecucion['colorfontzona']; |
---|
130 | |
---|
131 | $row = array(); |
---|
132 | $row[] = array('data' => $meses[$i],); |
---|
133 | //si el mes esta dentro del periodo de duracion de la accion especifica |
---|
134 | if(_mes_dentro_de_duracion_proyecto($node, $i)){ |
---|
135 | $row[] = array('data' => number_format($planificadoMes, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
136 | $row[] = array('data' => number_format($Ejecutado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
137 | $row[] = array('data' => $porczonacritica,); |
---|
138 | $row[] = array('data' => $textozona, 'style' => 'font-weight: bold;background:' . $colorzona . '; color:' . $colorfontzona); |
---|
139 | $row[] = array('data' => $infocomplementaria_metafisica,); |
---|
140 | |
---|
141 | if(($node->_workflow == $estado_aprobado && _mes_habilitado_para_seguimiento($i))&&(_periodo_de_seguimiento_proyecto_y_aes_esta_activo())){ |
---|
142 | $links = array(); |
---|
143 | $links[] = '<b>'.l(t('Modificar'), 'node/' . $node->nid . '/seguimiento_proyecto/mes/' . $i . '/edit').'</b>'; |
---|
144 | $row[] = array('data' => theme('item_list', $links),); |
---|
145 | }else{ |
---|
146 | $row[] = array('data' => '',); |
---|
147 | } |
---|
148 | }else{ |
---|
149 | $row[] = array('data' => '-',);//planificado |
---|
150 | $row[] = array('data' => '-',);//ejecutado |
---|
151 | $row[] = array('data' => '-',);//porcentaje |
---|
152 | $row[] = array('data' => '-',);//estatus de ejecucion |
---|
153 | $row[] = array('data' => '-',);//info complementaria |
---|
154 | $row[] = array('data' => '-',); |
---|
155 | } |
---|
156 | $rows[] = $row; |
---|
157 | } |
---|
158 | $acumuladoPlanificado = $seg_metafisica_todos['acum']['acumuladoPlanificado']; |
---|
159 | $AcumuladoEjecutado = $seg_metafisica_todos['acum']['acumuladoEjecutado']; |
---|
160 | $row = array(); |
---|
161 | $row[] = array('data' => t('Acumulado'),); |
---|
162 | $row[] = array('data' => number_format($acumuladoPlanificado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
163 | $row[] = array('data' => number_format($AcumuladoEjecutado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),);//total ejecutado |
---|
164 | $row[] = array('data' => '', 'colspan' => 4); |
---|
165 | $rows[] = $row; |
---|
166 | $tablas[]= theme('table', $header, $rows); |
---|
167 | |
---|
168 | |
---|
169 | if (count($tablas)) { |
---|
170 | |
---|
171 | $output .= '<fieldset><legend>Indicadores de la Meta FÃsica del Proyecto</legend>'; |
---|
172 | |
---|
173 | $output .= '<b>Descripción del Bien y Servicio:</b> '.$node->field_proyecto_descripcion_bien[0]['value'].'<br>'; |
---|
174 | $term = taxonomy_get_term($node->field_proyecto_unidadm[0]['value']); |
---|
175 | $output .= '<b>Unidad de Medida:</b> '.$term->name.'<br><br>'; |
---|
176 | |
---|
177 | $output .= implode('', $tablas).'</fieldset>'; |
---|
178 | } |
---|
179 | |
---|
180 | return $output; |
---|
181 | } |
---|
182 | |
---|
183 | |
---|
184 | /** |
---|
185 | * Pagina que carga la tabla de indicadores de meta fÃsica de la accion especifica |
---|
186 | */ |
---|
187 | function _mostrar_indicadores_financieros_seg_proyecto($node) { |
---|
188 | $estado_aprobado = variable_get('proyectos_operativos_state_aprobado', NULL); |
---|
189 | $seguimiento_todos_meses_financiero = _seguimiento_financiero_todosmes_proyecto_load($node); |
---|
190 | |
---|
191 | $meses = array( |
---|
192 | 0 => t('January'), |
---|
193 | 1 => t('February'), |
---|
194 | 2 => t('March'), |
---|
195 | 3 => t('April'), |
---|
196 | 4 => t('May'), |
---|
197 | 5 => t('June'), |
---|
198 | 6 => t('July'), |
---|
199 | 7 => t('August'), |
---|
200 | 8 => t('September'), |
---|
201 | 9 => t('Octuber'), |
---|
202 | 10 => t('November'), |
---|
203 | 11 => t('December'), |
---|
204 | ); |
---|
205 | $format_number = array( |
---|
206 | 'decimals' => variable_get('proyectos_operativos_number_decimals', 0), |
---|
207 | 'dec_point' => variable_get('proyectos_operativos_number_dec_point', ','), |
---|
208 | 'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'), |
---|
209 | ); |
---|
210 | //tabla de indicadores financieros del proyecto |
---|
211 | $tablas = array(); |
---|
212 | |
---|
213 | $header = array(); |
---|
214 | $header[] = array('data' => t('Mes')); |
---|
215 | $header[] = array('data' => t('Asignado')); |
---|
216 | $header[] = array('data' => t('Comprometido')); |
---|
217 | $header[] = array('data' => t('Causado')); |
---|
218 | $header[] = array('data' => t('Pagado')); |
---|
219 | $header[] = array('data' => t('% de Inversión')); |
---|
220 | $header[] = array('data' => t('Estatus de la Inversión')); |
---|
221 | $header[] = array('data' => t('Información Complementaria')); |
---|
222 | $header[] = array('data' => t('Opciones Disponibles'),); |
---|
223 | |
---|
224 | |
---|
225 | $rows = array(); |
---|
226 | for($mes=0; $mes<12; $mes++){ |
---|
227 | |
---|
228 | //calcular variación por reformulación |
---|
229 | $variacion_total_ref_asignado = _seguimiento_mesactual_total_proyecto_reformulaciones_load($node, $mes); |
---|
230 | |
---|
231 | $asignadoMes = $seguimiento_todos_meses_financiero['seguimiento_financiero_todosmes'][$mes]['asignadoMes'] + $variacion_total_ref_asignado; |
---|
232 | $totalComprometido = $seguimiento_todos_meses_financiero['seguimiento_financiero_todosmes'][$mes]['comprometidoMes']; |
---|
233 | $totalCausado = $seguimiento_todos_meses_financiero['seguimiento_financiero_todosmes'][$mes]['causadoMes']; |
---|
234 | $totalPagado = $seguimiento_todos_meses_financiero['seguimiento_financiero_todosmes'][$mes]['pagadoMes']; |
---|
235 | $infocomplementaria_financiera = $seguimiento_todos_meses_financiero['seguimiento_financiero_todosmes'][$mes]['infocomplementaria_metafinanciera']; |
---|
236 | $estatus_inversion = _calcularzonacritica($asignadoMes, $totalCausado); |
---|
237 | $porczonacritica = $estatus_inversion['porczonacritica']; |
---|
238 | $textozona = $estatus_inversion['textozona']; |
---|
239 | $colorzona = $estatus_inversion['colorzona']; |
---|
240 | $colorfontzona = $estatus_inversion['colorfontzona']; |
---|
241 | |
---|
242 | $row = array(); |
---|
243 | $row[] = array('data' => $meses[$mes],); |
---|
244 | //si el mes esta dentro del periodo de duracion del proyecto |
---|
245 | if(_mes_dentro_de_duracion_proyecto($node, $mes)){ |
---|
246 | $row[] = array('data' => number_format($asignadoMes, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
247 | $row[] = array('data' => number_format($totalComprometido, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
248 | $row[] = array('data' => number_format($totalCausado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
249 | $row[] = array('data' => number_format($totalPagado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
250 | $row[] = array('data' => $porczonacritica,); |
---|
251 | $row[] = array('data' => $textozona, 'style' => 'font-weight: bold;background:' . $colorzona . '; color:' . $colorfontzona); |
---|
252 | $row[] = array('data' => $infocomplementaria_financiera,); |
---|
253 | $links = array(); |
---|
254 | if(($node->_workflow == $estado_aprobado && _mes_habilitado_para_seguimiento($mes))&&(_periodo_de_seguimiento_proyecto_y_aes_esta_activo())){ |
---|
255 | $links[] = '<b>'.l(t('Modificar'), 'node/' . $node->nid . '/seguimiento_proyecto/mes/' . $mes . '/edit').'</b>'; |
---|
256 | } |
---|
257 | $row[] = array('data' => theme('item_list', $links),); |
---|
258 | }else{ |
---|
259 | $row[] = array('data' => '-',); |
---|
260 | $row[] = array('data' => '-',); |
---|
261 | $row[] = array('data' => '-',); |
---|
262 | $row[] = array('data' => '-',); |
---|
263 | $row[] = array('data' => '-',); |
---|
264 | $row[] = array('data' => '-',); |
---|
265 | $row[] = array('data' => '-',); |
---|
266 | $row[] = array('data' => '-',); |
---|
267 | } |
---|
268 | $rows[] = $row; |
---|
269 | } |
---|
270 | |
---|
271 | $acumuladoAsignado = $seguimiento_todos_meses_financiero['acum']['acumuladoAsignado']; |
---|
272 | $AcumuladoTotalComprometido = $seguimiento_todos_meses_financiero['acum']['acumuladoComprometido']; |
---|
273 | $AcumuladoTotalCausado = $seguimiento_todos_meses_financiero['acum']['acumuladoCausado']; |
---|
274 | $AcumuladoTotalPagado = $seguimiento_todos_meses_financiero['acum']['acumuladoPagado']; |
---|
275 | $row = array(); |
---|
276 | $row[] = array('data' => t('Acumulado'),); |
---|
277 | $row[] = array('data' => number_format($acumuladoAsignado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
278 | $row[] = array('data' => number_format($AcumuladoTotalComprometido, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),);//total comprometido |
---|
279 | $row[] = array('data' => number_format($AcumuladoTotalCausado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),);//total causado |
---|
280 | $row[] = array('data' => number_format($AcumuladoTotalPagado, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),);//total pagado |
---|
281 | $row[] = array('data' => '', 'colspan' => 4); |
---|
282 | |
---|
283 | $rows[] = $row; |
---|
284 | $tablas[]= theme('table', $header, $rows); |
---|
285 | |
---|
286 | if (count($tablas)) { |
---|
287 | $output .= '<fieldset><legend>Indicadores Financieros del Proyecto</legend>' . implode('', $tablas); |
---|
288 | $output .= '<br><b>Nota</b>: Los valores de \'Comprometido\', \'Causado\' y \'Pagado\', corresponden al total de los seguimiento de las acciones especÃficas. Si desea modificar estos valores para algun mes, debe modificar los seguimientos de las acciones especÃficas para ese mes.'; |
---|
289 | $output .= '</fieldset>'; |
---|
290 | } |
---|
291 | |
---|
292 | return $output; |
---|
293 | } |
---|
294 | |
---|
295 | |
---|
296 | /** |
---|
297 | * Pagina que carga la tabla de seguimiento de beneficiarios |
---|
298 | */ |
---|
299 | function _mostrar_beneficiarios_seg_proyecto($node) { |
---|
300 | |
---|
301 | $seguimiento_todos_meses_beneficiario = _seguimiento_beneficiario_todosmes_proyecto_load($node); |
---|
302 | $format_number = array( |
---|
303 | 'decimals' => variable_get('proyectos_operativos_number_decimals', 0), |
---|
304 | 'dec_point' => variable_get('proyectos_operativos_number_dec_point', ','), |
---|
305 | 'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'), |
---|
306 | ); |
---|
307 | //tabla de indicadores financieros del proyecto |
---|
308 | $tablas = array(); |
---|
309 | |
---|
310 | $header = array(); |
---|
311 | $header[] = array('data' => t('Beneficiario')); |
---|
312 | $header[] = array('data' => t('ENE')); |
---|
313 | $header[] = array('data' => t('FEB')); |
---|
314 | $header[] = array('data' => t('MAR')); |
---|
315 | $header[] = array('data' => t('ABR')); |
---|
316 | $header[] = array('data' => t('MAY')); |
---|
317 | $header[] = array('data' => t('JUN')); |
---|
318 | $header[] = array('data' => t('JUL')); |
---|
319 | $header[] = array('data' => t('AGO')); |
---|
320 | $header[] = array('data' => t('SEP')); |
---|
321 | $header[] = array('data' => t('OCT')); |
---|
322 | $header[] = array('data' => t('NOV')); |
---|
323 | $header[] = array('data' => t('DIC')); |
---|
324 | $header[] = array('data' => t('TOTAL'),); |
---|
325 | |
---|
326 | |
---|
327 | $rows = array(); |
---|
328 | foreach($seguimiento_todos_meses_beneficiario as $seg_benef){ |
---|
329 | $row = array(); |
---|
330 | $row[] = array('data' => $seg_benef['nombre'],); |
---|
331 | for($mes=0; $mes<12; $mes++){ |
---|
332 | if(_mes_dentro_de_duracion_proyecto($node, $mes)){ |
---|
333 | $row[] = array('data' => number_format($seg_benef['cant_meses'][$mes], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
334 | }else{ |
---|
335 | $row[] = array('data' => '-',); |
---|
336 | } |
---|
337 | } |
---|
338 | $row[] = array('data' => number_format($seg_benef['total_benef'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); |
---|
339 | $rows[] = $row; |
---|
340 | } |
---|
341 | |
---|
342 | $tablas[]= theme('table', $header, $rows); |
---|
343 | |
---|
344 | if (count($tablas)) { |
---|
345 | $output .= '<fieldset><legend>Beneficiarios del Proyecto (Durante la Ejecución)</legend>' . implode('', $tablas); |
---|
346 | $output .= '</fieldset>'; |
---|
347 | } |
---|
348 | |
---|
349 | return $output; |
---|
350 | } |
---|
351 | |
---|
352 | /** |
---|
353 | * Pagina que muestra la lsita de los seguimientos de las acciones especificas del proyecto |
---|
354 | */ |
---|
355 | function seguimiento_proyecto_y_aes_lista_page($node) { |
---|
356 | |
---|
357 | drupal_set_title(t('Seguimiento y Control del Proyecto y sus Acciones EspecÃficas')); |
---|
358 | |
---|
359 | $output = ''; |
---|
360 | $output .= '<br>'; |
---|
361 | |
---|
362 | //acciones especificas |
---|
363 | $output .= '<h4>Acciones EspecÃficas</h4>'; |
---|
364 | $header = array(); |
---|
365 | $header[] = array('data' => t('Nombre de la Acción EspecÃfica')); |
---|
366 | $header[] = array('data' => t('Enlace')); |
---|
367 | |
---|
368 | $rows = array(); |
---|
369 | |
---|
370 | foreach($node->field_proyecto_accion_esp as $accionEspecifica) {//recorrido por todas las acciones especificas |
---|
371 | $accion_esp_load = node_load($accionEspecifica['nid']); |
---|
372 | if ($accion_esp_load && $accion_esp_load->type == 'accion_especifica') {//accion especifica cargada |
---|
373 | $row = array(); |
---|
374 | $links = array(); |
---|
375 | $row[] = array('data' => $accion_esp_load->titulo_asignado,); |
---|
376 | $links[] = '<b>'.l(t('Seguimiento de la AE'), 'node/' . $accion_esp_load->nid . '/seguimiento_aeproyecto').'</b>'; |
---|
377 | $row[] = array('data' => theme('item_list', $links),); |
---|
378 | $rows[] = $row; |
---|
379 | } |
---|
380 | } |
---|
381 | |
---|
382 | $output .= theme('table', $header, $rows); |
---|
383 | |
---|
384 | //proyecto |
---|
385 | $output .= '<h4>Proyecto Operativo</h4>'; |
---|
386 | $header = array(); |
---|
387 | $header[] = array('data' => t('Nombre del Proyecto')); |
---|
388 | $header[] = array('data' => t('Enlace')); |
---|
389 | |
---|
390 | $rows = array(); |
---|
391 | |
---|
392 | $row = array(); |
---|
393 | $links = array(); |
---|
394 | $row[] = array('data' => $node->titulo_asignado,); |
---|
395 | $links[] = '<b>'.l(t('Seguimiento del Proyecto'), 'node/' . $node->nid . '/seguimiento_proyecto').'</b>'; |
---|
396 | $row[] = array('data' => theme('item_list', $links),); |
---|
397 | $rows[] = $row; |
---|
398 | |
---|
399 | $output .= theme('table', $header, $rows); |
---|
400 | |
---|
401 | |
---|
402 | //$nodo_proyecto = node_load($proyecto->nid); |
---|
403 | if(_proyectooperativo_esta_aprobado($node)){ |
---|
404 | |
---|
405 | $meses = array( |
---|
406 | 0 => t('January'), |
---|
407 | 1 => t('February'), |
---|
408 | 2 => t('March'), |
---|
409 | 3 => t('April'), |
---|
410 | 4 => t('May'), |
---|
411 | 5 => t('June'), |
---|
412 | 6 => t('July'), |
---|
413 | 7 => t('August'), |
---|
414 | 8 => t('September'), |
---|
415 | 9 => t('Octuber'), |
---|
416 | 10 => t('November'), |
---|
417 | 11 => t('December'), |
---|
418 | ); |
---|
419 | |
---|
420 | $mes_fase_seg = _obtener_mes_fase_seguimiento_proyecto($node); |
---|
421 | $enlace_fase_seg = '<b>'.l(t('Fase de Seguimiento ').'('.$meses[$mes_fase_seg].')', 'node/' . $node->nid."/fase_de_seguimiento_proyecto_y_aes/mes/".$mes_fase_seg).'</b>'; |
---|
422 | $output .= '<br><br>'; |
---|
423 | $output .= 'También puede consultar la <i>fase de seguimiento</i> del mes actual para este proyecto operativo a través del siguiente enlace '.$enlace_fase_seg.'.'; |
---|
424 | $output .= '<br>'; |
---|
425 | } |
---|
426 | |
---|
427 | |
---|
428 | return $output; |
---|
429 | } |
---|