1 | <?php |
---|
2 | /** |
---|
3 | * Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
4 | * @file proyectos-operativos-ficha-proyecto.tpl.php |
---|
5 | * Drupal part Module to Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
6 | * Copyright 2011 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 - Msc. Juan Vizcarrondo |
---|
23 | * @date 2013-08-02 // (año-mes-dia) |
---|
24 | * @version 0.1 // (0.1) |
---|
25 | */ |
---|
26 | |
---|
27 | $node_type = content_types('proyectos_operativos'); |
---|
28 | $campos_proyectos = $node_type['fields']; |
---|
29 | $content = node_build_content($proyecto); |
---|
30 | $format_number = array( |
---|
31 | 'decimals' => variable_get('proyectos_operativos_number_decimals', 0), |
---|
32 | 'dec_point' => variable_get('proyectos_operativos_number_dec_point', ','), |
---|
33 | 'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'), |
---|
34 | ); |
---|
35 | $arreglo = array( |
---|
36 | 'field_proyecto_fecha_i' => 'field_proyecto_fecha_i', |
---|
37 | 'field_proyecto_fecha_f' => 'field_proyecto_fecha_f', |
---|
38 | 'field_proyecto_plurianual' => 'field_proyecto_plurianual', |
---|
39 | 'field_proyecto_status' => 'field_proyecto_status', |
---|
40 | 'field_proyecto_status' => 'field_proyecto_status', |
---|
41 | 'field_proyecto_situacion_p' => 'field_proyecto_situacion_p', |
---|
42 | 'field_proyecto_monto_anual' => 'field_proyecto_monto_anual', |
---|
43 | 'field_proyecto_total' => 'field_proyecto_total', |
---|
44 | 'field_proyecto_monto_ant' => 'field_proyecto_monto_ant', |
---|
45 | 'field_proyecto_monto_prox' => 'field_proyecto_monto_prox', |
---|
46 | 'field_proyecto_esp_monto_finan' => 'field_proyecto_esp_monto_finan', |
---|
47 | 'field_montos_otras_moneds' => 'field_montos_otras_moneds', |
---|
48 | 'field_proyecto_poan' => 'field_proyecto_poan', |
---|
49 | 'field_proyecto_pndes' => 'field_proyecto_pndes', |
---|
50 | 'field_proyecto_mcti' => 'field_proyecto_mcti', |
---|
51 | 'field_proyecto_ubicaci_inter' => 'field_proyecto_ubicaci_inter', |
---|
52 | 'field_proyecto_ubicaci_comu' => 'field_proyecto_ubicaci_comu', |
---|
53 | 'field_proyecto_codigo_comu' => 'field_proyecto_codigo_comu', |
---|
54 | 'field_proyecto_nombres_cum' => 'field_proyecto_nombres_cum', |
---|
55 | 'field_proyecto_sector' => 'field_proyecto_sector', |
---|
56 | 'field_proyecto_relacion' => 'field_proyecto_relacion', |
---|
57 | 'field_proyecto_causas' => 'field_proyecto_causas', |
---|
58 | 'field_proyecto_justificacion' => 'field_proyecto_justificacion', |
---|
59 | 'field_proyecto_alcance' => 'field_proyecto_alcance', |
---|
60 | 'field_tipo_factores' => 'field_tipo_factores', |
---|
61 | 'field_factor_impact_multifc' => 'field_factor_impact_multifc', |
---|
62 | 'field_factor_segun_origen' => 'field_factor_segun_origen', |
---|
63 | 'field_factor_impact_multiog' => 'field_factor_impact_multiog', |
---|
64 | 'field_proyecto_sa_descripcion' => 'field_proyecto_sa_descripcion', |
---|
65 | 'field_proyecto_sa_formulai' => 'field_proyecto_sa_formulai', |
---|
66 | 'field_proyecto_sa_fuentei' => 'field_proyecto_sa_fuentei', |
---|
67 | 'field_proyecto_sa_fecha' => 'field_proyecto_sa_fecha', |
---|
68 | 'field_proyecto_sa_cuantificacion' => 'field_proyecto_sa_cuantificacion', |
---|
69 | 'field_proyecto_so_descripcion' => 'field_proyecto_so_descripcion', |
---|
70 | 'field_proyecto_tiempoi' => 'field_proyecto_tiempoi', |
---|
71 | 'field_proyecto_unidadm' => 'field_proyecto_unidadm', |
---|
72 | 'field_proyecto_meta_fisica' => 'field_proyecto_meta_fisica', |
---|
73 | 'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien', |
---|
74 | 'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien', |
---|
75 | 'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien', |
---|
76 | |
---|
77 | ); |
---|
78 | foreach($arreglo as $campo) { |
---|
79 | $content->content[$campo]['field']['#label_display'] = 'hidden'; |
---|
80 | } |
---|
81 | $plurianual = ($proyecto->field_proyecto_plurianual[0]['value'] == variable_get('proyectos_operativos_plurianual', 0)); |
---|
82 | $pndes = variable_get('proyectos_operativos_muestra_pndes', TRUE); |
---|
83 | $mcti = variable_get('proyectos_operativos_muestra_mcti', TRUE); |
---|
84 | $sa = variable_get('proyectos_operativos_muestra_sa', TRUE); |
---|
85 | $so = variable_get('proyectos_operativos_muestra_so', TRUE); |
---|
86 | $unidad_m = module_exists('proyectos_reformulacion') ? 'proyectos_operativos_unidad_medida_reformulado' : 'field_proyecto_unidadm'; |
---|
87 | $meta = module_exists('proyectos_reformulacion') && ($content->proyectos_operativos_meta_fisica_reformulado) ? 'proyectos_operativos_meta_fisica_reformulado' : 'field_proyecto_meta_fisica'; |
---|
88 | //$result = preg_replace('/(<div.*?class="field-label"[^>]*>)(.*?)(<\/div>)/i', "<b>$1:</b>$3", $content->content[$campo]); |
---|
89 | ?> |
---|
90 | <table id="ficha-proyecto-presupuesto" border="1"> |
---|
91 | <tr><td colspan="2" align="center" ><h2><? print t('Datos Básicos');?></h2></td></tr> |
---|
92 | <tr><td colspan="2" align="center" ><h3><? print t('Datos Básicos de Identificación del Proyecto');?></h3></td></tr> |
---|
93 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_titulo']['field']['#title'];?>:</b> </td></tr> |
---|
94 | <tr><td colspan="2" align="justify"> <?php print check_plain($proyecto->titulo_asignado);?> </td></tr> |
---|
95 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_codigo']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_plurianual']['field']['#title'];?>:</b> </td></tr> |
---|
96 | <tr><td align="center"> <?php print check_plain($proyecto->field_proyecto_codigo[0]['value']);?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_plurianual']));?> </td></tr> |
---|
97 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_descripcin_proyect']['field']['#title'];?>:</b> </td></tr> |
---|
98 | <tr><td colspan="2" align="justify"> <?php print check_plain($proyecto->field_descripcin_proyect[0]['value']);?> </td></tr> |
---|
99 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_fecha_i']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_fecha_f']['field']['#title'];?>:</b> </td></tr> |
---|
100 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_fecha_i']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_fecha_f']));?> </td></tr> |
---|
101 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_status']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_situacion_p']['field']['#title'];?>:</b> </td></tr> |
---|
102 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_status']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_situacion_p']));?> </td></tr> |
---|
103 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_monto_anual']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_total']['field']['#title'];?>:</b> </td></tr> |
---|
104 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_monto_anual']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_total']));?> </td></tr> |
---|
105 | <?php if ($plurianual):?> |
---|
106 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_monto_ant']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_monto_prox']['field']['#title'];?>:</b> </td></tr> |
---|
107 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_monto_ant']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_monto_prox']));?> </td></tr> |
---|
108 | <?php endif ?> |
---|
109 | <!-- montos en otras monedas: --> |
---|
110 | <tr><td align="center" colspan="2"> <b><?php print $content->content['field_montos_otras_moneds']['field']['#title'];?>:</b> </td></tr> |
---|
111 | <tr><td align="center" colspan="2"> <?php print strip_tags(drupal_render($content->content['field_montos_otras_moneds']));?> </td></tr> |
---|
112 | |
---|
113 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_esp_monto_finan']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_poan']['field']['#title'];?>:</b> </td></tr> |
---|
114 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_esp_monto_finan']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_poan']));?> </td></tr> |
---|
115 | <?php |
---|
116 | if (variable_get('proyectos_operativos_muestra_responsables', TRUE)): ?> |
---|
117 | <tr><td colspan="2" align="center" ><h3><? print t('Responsable del Proyecto');?></h3></td></tr> |
---|
118 | <?php |
---|
119 | $arreglo['gerente'] = array( |
---|
120 | 'field_proyecto_nombre_gere' => 'field_proyecto_nombre_gere', |
---|
121 | 'field_proyecto_cedul_gere' => 'field_proyecto_cedul_gere', |
---|
122 | 'field_proyecto_corre_gere' => 'field_proyecto_corre_gere', |
---|
123 | 'field_proyecto_telef_gere' => 'field_proyecto_telef_gere', |
---|
124 | ); |
---|
125 | $arreglo['tecnico'] = array( |
---|
126 | 'field_proyecto_nom_r_tec' => 'field_proyecto_nom_r_tec', |
---|
127 | 'field_proyecto_ced_r_tec' => 'field_proyecto_ced_r_tec', |
---|
128 | 'field_proyecto_cor_r_tec' => 'field_proyecto_cor_r_tec', |
---|
129 | 'field_proyecto_tel_r_tec' => 'field_proyecto_tel_r_tec', |
---|
130 | 'field_proyecto_und_r_tec' => 'field_proyecto_und_r_tec', |
---|
131 | ); |
---|
132 | $arreglo['registrador'] = array( |
---|
133 | 'field_proyecto_nom_r_reg' => 'field_proyecto_nom_r_reg', |
---|
134 | 'field_proyecto_ced_r_reg' => 'field_proyecto_ced_r_reg', |
---|
135 | 'field_proyecto_cor_r_reg' => 'field_proyecto_cor_r_reg', |
---|
136 | 'field_proyecto_tel_r_reg' => 'field_proyecto_tel_r_reg', |
---|
137 | ); |
---|
138 | $arreglo['administrativo'] = array( |
---|
139 | 'field_proyecto_nom_r_adm' => 'field_proyecto_nom_r_adm', |
---|
140 | 'field_proyecto_ced_r_adm' => 'field_proyecto_ced_r_adm', |
---|
141 | 'field_proyecto_cor_r_adm' => 'field_proyecto_cor_r_adm', |
---|
142 | 'field_proyecto_tel_r_adm' => 'field_proyecto_tel_r_adm', |
---|
143 | 'field_proyecto_und_r_adm' => 'field_proyecto_und_r_adm', |
---|
144 | ); |
---|
145 | ?> |
---|
146 | |
---|
147 | <tr><td colspan="2" align="center" ><?php print ("<h4>Datos del Gerente</h4>"); ?></td></tr> |
---|
148 | <tr><td colspan="2" align="center" > |
---|
149 | <?php print("<table><thead><tr>"); ?> |
---|
150 | <?php foreach($arreglo['gerente'] as $campo): ?> |
---|
151 | <?php print("<th>"); ?> |
---|
152 | <?php print $content->content[$campo]['field']['#title']; ?> |
---|
153 | <?php print("</th>"); ?> |
---|
154 | <?php endforeach ?> |
---|
155 | <?php print("</tr></thead><tbody><tr class='odd'>"); ?> |
---|
156 | <?php foreach($arreglo['gerente'] as $campo): ?> |
---|
157 | <?php print("<td>"); ?> |
---|
158 | <?php foreach($content->content[$campo]['field']['#node']->{$campo} as $id => $value): ?> |
---|
159 | <?php if (isset($value['email'])): ?> |
---|
160 | <?php $values = $value['email']; ?> |
---|
161 | <?php else: ?> |
---|
162 | <?php $values = $value['value']; ?> |
---|
163 | <?php endif; ?> |
---|
164 | <?php endforeach ?> |
---|
165 | <?php print $values; ?> |
---|
166 | <?php print("</td>"); ?> |
---|
167 | <?php endforeach ?> |
---|
168 | <?php print("</tr></tbody>"); ?> |
---|
169 | <?php print("</table>"); ?> |
---|
170 | <!-- end Responsable Gerente --> |
---|
171 | </td></tr> |
---|
172 | <!-- Responsable tecnico --> |
---|
173 | <tr><td colspan="2" align="center" ><?php print ("<h4>Datos del Responsable tecnico</h4>"); ?></td></tr> |
---|
174 | <tr><td colspan="2" align="center" > |
---|
175 | <?php print("<table><thead><tr>"); ?> |
---|
176 | <?php foreach($arreglo['tecnico'] as $campo): ?> |
---|
177 | <?php print("<th>"); ?> |
---|
178 | <?php print $content->content[$campo]['field']['#title']; ?> |
---|
179 | <?php print("</th>"); ?> |
---|
180 | <?php endforeach ?> |
---|
181 | <?php print("</tr></thead><tbody><tr class='odd'>"); ?> |
---|
182 | <?php foreach($arreglo['tecnico'] as $campo): ?> |
---|
183 | <?php print("<td>"); ?> |
---|
184 | <?php foreach($content->content[$campo]['field']['#node']->{$campo} as $id => $value): ?> |
---|
185 | <?php if (isset($value['email'])): ?> |
---|
186 | <?php $values = $value['email']; ?> |
---|
187 | <?php else: ?> |
---|
188 | <?php $values = $value['value']; ?> |
---|
189 | <?php endif; ?> |
---|
190 | <?php endforeach ?> |
---|
191 | <?php print $values; ?> |
---|
192 | <?php print("</td>"); ?> |
---|
193 | <?php endforeach ?> |
---|
194 | <?php print("</tr></tbody>"); ?> |
---|
195 | <?php print("</table>"); ?> |
---|
196 | </td></tr> |
---|
197 | <!-- end Responsable tecnico --> |
---|
198 | <!-- Responsable registrador --> |
---|
199 | <tr><td colspan="2" align="center" ><?php print ("<h4>Datos del Responsable Registrador</h4>"); ?></td></tr> |
---|
200 | <tr><td colspan="2" align="center" > |
---|
201 | <?php print("<table><thead><tr>"); ?> |
---|
202 | <?php foreach($arreglo['registrador'] as $campo): ?> |
---|
203 | <?php print("<th>"); ?> |
---|
204 | <?php print $content->content[$campo]['field']['#title']; ?> |
---|
205 | <?php print("</th>"); ?> |
---|
206 | <?php endforeach ?> |
---|
207 | <?php print("</tr></thead><tbody><tr class='odd'>"); ?> |
---|
208 | <?php foreach($arreglo['registrador'] as $campo): ?> |
---|
209 | <?php print("<td>"); ?> |
---|
210 | <?php foreach($content->content[$campo]['field']['#node']->{$campo} as $id => $value): ?> |
---|
211 | <?php if (isset($value['email'])): ?> |
---|
212 | <?php $values = $value['email']; ?> |
---|
213 | <?php else: ?> |
---|
214 | <?php $values = $value['value']; ?> |
---|
215 | <?php endif; ?> |
---|
216 | <?php endforeach ?> |
---|
217 | <?php print $values; ?> |
---|
218 | <?php print("</td>"); ?> |
---|
219 | <?php endforeach ?> |
---|
220 | <?php print("</tr></tbody>"); ?> |
---|
221 | <?php print("</table>"); ?> |
---|
222 | </td></tr> |
---|
223 | <!-- end Responsable registrador --> |
---|
224 | <!-- Responsable administrador --> |
---|
225 | <tr><td colspan="2" align="center" ><?php print ("<h4>Datos del Responsable Administrativo</h4>"); ?></td></tr> |
---|
226 | <tr><td colspan="2" align="center" > |
---|
227 | <?php print("<table><thead><tr>"); ?> |
---|
228 | <?php foreach($arreglo['administrativo'] as $campo): ?> |
---|
229 | <?php print("<th>"); ?> |
---|
230 | <?php print $content->content[$campo]['field']['#title']; ?> |
---|
231 | <?php print("</th>"); ?> |
---|
232 | <?php endforeach ?> |
---|
233 | <?php print("</tr></thead><tbody><tr class='odd'>"); ?> |
---|
234 | <?php foreach($arreglo['administrativo'] as $campo): ?> |
---|
235 | <?php print("<td>"); ?> |
---|
236 | <?php foreach($content->content[$campo]['field']['#node']->{$campo} as $id => $value): ?> |
---|
237 | <?php if (isset($value['email'])): ?> |
---|
238 | <?php $values = $value['email']; ?> |
---|
239 | <?php else: ?> |
---|
240 | <?php $values = $value['value']; ?> |
---|
241 | <?php endif; ?> |
---|
242 | <?php endforeach ?> |
---|
243 | <?php print $values; ?> |
---|
244 | <?php print("</td>"); ?> |
---|
245 | <?php endforeach ?> |
---|
246 | <?php print("</tr></tbody>"); ?> |
---|
247 | <?php print("</table>"); ?> |
---|
248 | </td></tr> |
---|
249 | <!-- end Responsable administrador --> |
---|
250 | <?php endif ?> |
---|
251 | |
---|
252 | <!-- PNDS --> |
---|
253 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_pndes']['field']['#title'];?>:</b> </td></tr> |
---|
254 | |
---|
255 | <?php |
---|
256 | $datos = array(); |
---|
257 | foreach ($proyecto->field_proyecto_pndes as $valor) { |
---|
258 | $parents = taxonomy_get_parents($datos[] = $valor['value']); |
---|
259 | |
---|
260 | $pndes = taxonomy_get_term($datos[] = $valor['value'], $reset = FALSE); |
---|
261 | $des_pndes[] = $pndes->description; |
---|
262 | $des_pndes2 = array_reverse($des_pndes); |
---|
263 | } |
---|
264 | $contenido = '<ul>'; |
---|
265 | $contenido .= ($des_pndes2[0]) ? '<li> <i><b>Objetivo Histórico:</b></i><br>'. $des_pndes2[0] . '</li>' : ''; |
---|
266 | $contenido .= ($des_pndes2[1]) ?'<li> <i><b>Objetivo Nacional:</b></i><br>'. $des_pndes2[1] . '</li>' : ''; |
---|
267 | $contenido .= ($des_pndes2[2]) ?'<li> <i><b>Objetivo Estratégico:</b></i><br>'. $des_pndes2[2] . '</li>' : ''; |
---|
268 | $contenido .= ($des_pndes2[3]) ?'<li> <i><b>Objetivo General:</b></i><br>'. $des_pndes2[3] . '</li>' : ''; |
---|
269 | $contenido .= ($des_pndes2[4]) ?'<li> <i><b>Objetivos EspecÃficos:</b></i><br>'. $des_pndes2[4] . '</li>' : ''; |
---|
270 | $contenido .= '</ul>'; |
---|
271 | ?> |
---|
272 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
273 | <!-- end PNDS --> |
---|
274 | |
---|
275 | <!-- Politicas Ministeriales --> |
---|
276 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_poli_ministeriales']['field']['#title'];?>:</b> </td></tr> |
---|
277 | <?php |
---|
278 | $datos = array(); |
---|
279 | foreach ($proyecto->field_poli_ministeriales as $valor) { |
---|
280 | $datos[] = $valor['value']; |
---|
281 | } |
---|
282 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado politicas ministeriales a este proyecto'); |
---|
283 | ?> |
---|
284 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
285 | <!-- end Politicas Ministeriales --> |
---|
286 | |
---|
287 | <!-- Programas --> |
---|
288 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyectos_programas']['field']['#title'];?>:</b> </td></tr> |
---|
289 | <?php |
---|
290 | $datos = array(); |
---|
291 | foreach ($proyecto->field_proyectos_programas as $valor) { |
---|
292 | $datos[] = $valor['value']; |
---|
293 | } |
---|
294 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado programa a este proyecto'); |
---|
295 | ?> |
---|
296 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
297 | <!-- end Programas --> |
---|
298 | <!-- problemas --> |
---|
299 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_problemas']['field']['#title'];?>:</b> </td></tr> |
---|
300 | <?php |
---|
301 | $datos = array(); |
---|
302 | foreach ($proyecto->field_proyecto_problemas as $valor) { |
---|
303 | $datos[] = check_plain($valor['value']); |
---|
304 | } |
---|
305 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado problemas para este proyecto'); |
---|
306 | ?> |
---|
307 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
308 | <!-- end problemas --> |
---|
309 | <!-- causas --> |
---|
310 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_causas']['field']['#title'];?>:</b> </td></tr> |
---|
311 | <?php |
---|
312 | $datos = array(); |
---|
313 | foreach ($proyecto->field_proyecto_causas as $valor) { |
---|
314 | $datos[] = check_plain($valor['value']); |
---|
315 | } |
---|
316 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado causas para este proyecto'); |
---|
317 | ?> |
---|
318 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
319 | <!-- end causas --> |
---|
320 | |
---|
321 | <!-- justificación & Alcance --> |
---|
322 | <?php if (variable_get('proyectos_operativos_muestra_justicacion', TRUE)): ?> |
---|
323 | <tr><td colspan="2" align="center" ><h3><? print t('Justificación');?></h3></td></tr |
---|
324 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_justificacion']['field']['#title'];?>:</b> </td></tr> |
---|
325 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_justificacion']));?> </td></tr> |
---|
326 | <?php endif ?> |
---|
327 | <?php if (variable_get('proyectos_operativos_muestra_alcance', TRUE)): ?> |
---|
328 | <tr><td colspan="2" align="center" ><h3><? print t('Alcance del Proyecto');?></h3></td></tr> |
---|
329 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_alcance']['field']['#title'];?>:</b> </td></tr> |
---|
330 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_alcance']));?> </td></tr> |
---|
331 | <?php endif ?> |
---|
332 | <!-- end justificación & Alcance --> |
---|
333 | |
---|
334 | <!-- Lineas estrategicas --> |
---|
335 | <tr><td align="center" colspan="2"> <b><?php print $content->content['field_lineas_estrategicas']['field']['#title'];?>:</b> </td></tr> |
---|
336 | <tr><td align="center" colspan="2"> <?php print strip_tags($x=drupal_render($content->content['field_lineas_estrategicas']));?> </td></tr> |
---|
337 | <!-- end Lineas estrategicas --> |
---|
338 | |
---|
339 | <tr><td colspan="2" align="center" ><h3><? print t('Localización del Proyecto');?></h3></td></tr> |
---|
340 | <tr><td colspan="2" align="center" ><h4><? print t('Localización Internacional o Nacional');?></h4></td></tr> |
---|
341 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_ubicaci_inter']['field']['#title'];?>:</b> </td></tr> |
---|
342 | <tr><td colspan="2" align="center"><?php print strip_tags(drupal_render($content->content['field_proyecto_ubicaci_inter']));?> </td></tr> |
---|
343 | <tr><td colspan="2" align="center" ><h4><? print t('Localización Comunal');?></h4></td></tr> |
---|
344 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_codigo_comu']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_nombres_cum']['field']['#title'];?>:</b> </td></tr> |
---|
345 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_codigo_comu']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_nombres_cum']));?> </td></tr> |
---|
346 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_ubicaci_comu']['field']['#title'];?>:</b> </td></tr> |
---|
347 | <tr><td colspan="2" align="center"><?php print strip_tags(drupal_render($content->content['field_proyecto_ubicaci_comu']));?> </td></tr> |
---|
348 | <tr><td colspan="2" align="center" ><h2><? print t('Datos Generales');?></h2></td></tr> |
---|
349 | <tr><td colspan="2" align="center" ><h3><? print t('Clasificación Sectorial');?></h3></td></tr> |
---|
350 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_sector']['field']['#title'];?>:</b> </td></tr> |
---|
351 | <tr><td colspan="2" align="center"><?php print strip_tags(drupal_render($content->content['field_proyecto_sector']));?> </td></tr> |
---|
352 | <?php if(variable_get('proyectos_operativos_muestra_talento', TRUE)) : ?> |
---|
353 | <tr><td colspan="2" align="center" ><h3><?php print t('Talento Humano');?></h3></td></tr> |
---|
354 | <tr><td colspan="2" align="center" > |
---|
355 | <?php |
---|
356 | $arreglo = array( |
---|
357 | 'field_proyecto_institucionth' => 'field_proyecto_institucionth', |
---|
358 | 'field_proyecto_nombres_a' => 'field_proyecto_nombres_a', |
---|
359 | 'field_proyecto_cargo_th' => 'field_proyecto_cargo_th', |
---|
360 | 'field_proyecto_rol_th' => 'field_proyecto_rol_th', |
---|
361 | 'field_proyecto_esfuerzo' => 'field_proyecto_esfuerzo', |
---|
362 | 'field_proyecto_formacion' => 'field_proyecto_formacion', |
---|
363 | ); |
---|
364 | $header = array(); |
---|
365 | foreach($arreglo as $campo) { |
---|
366 | $header[] = array('data' => check_plain($campos_proyectos[$campo]['widget']['label']), 'align' => 'center'); |
---|
367 | } |
---|
368 | $tamano_array = array(); |
---|
369 | foreach($arreglo as $field_id => $field) { |
---|
370 | $tamano_array[] = count($proyecto->{$field_id}); |
---|
371 | } |
---|
372 | $cantidad_talento = max($tamano_array); |
---|
373 | $rows = array(); |
---|
374 | for ($i = 0; $i < $cantidad_talento; $i++) { |
---|
375 | $row = array(); |
---|
376 | foreach($arreglo as $campo) { |
---|
377 | $valor_d = ($campo == 'field_proyecto_esfuerzo') ? 0 : ''; |
---|
378 | $valor = isset($proyecto->{$campo}[$i]) ? $proyecto->{$field_id}[$i]['value'] : $valor_d; |
---|
379 | $row[] = array('data' => check_plain($valor), 'align' => 'center',); |
---|
380 | } |
---|
381 | $rows[] = $row; |
---|
382 | } |
---|
383 | if (!count($rows)) { |
---|
384 | $row[] = array('data' => t('No se ha ingresado la sección de Talento Humano'), 'colspan' => count($header), 'align' => 'center'); |
---|
385 | $rows[] = $row; |
---|
386 | } |
---|
387 | print theme('table', $header, $rows, array('border' => '1')); |
---|
388 | ?> |
---|
389 | </td></tr> |
---|
390 | <?php endif; ?> |
---|
391 | |
---|
392 | |
---|
393 | <?php if (variable_get('proyectos_operativos_muestra_capacidades', TRUE)): ?> |
---|
394 | <tr><td colspan="2" align="center" ><h3><?php print t('Capacidades');?></h3></td></tr> |
---|
395 | <tr><td colspan="2" align="center" > |
---|
396 | <?php |
---|
397 | $arreglo = array( |
---|
398 | 'field_proyecto_institucion_alc' => 'field_proyecto_institucion_alc', |
---|
399 | 'field_proyecto_infraestructura' => 'field_proyecto_infraestructura', |
---|
400 | 'field_proyecto_equipos' => 'field_proyecto_equipos', |
---|
401 | 'field_proyecto_insumos' => 'field_proyecto_insumos', |
---|
402 | 'field_proyectos_servicios' => 'field_proyectos_servicios', |
---|
403 | ); |
---|
404 | $header = array(); |
---|
405 | foreach($arreglo as $campo) { |
---|
406 | $header[] = array('data' => check_plain($campos_proyectos[$campo]['widget']['label']), 'align' => 'center'); |
---|
407 | } |
---|
408 | $tamano_array = array(); |
---|
409 | foreach($arreglo as $field_id => $field) { |
---|
410 | $tamano_array[] = count($proyecto->{$field_id}); |
---|
411 | } |
---|
412 | $cantidad_talento = max($tamano_array); |
---|
413 | $rows = array(); |
---|
414 | for ($i = 0; $i < $cantidad_talento; $i++) { |
---|
415 | $row = array(); |
---|
416 | foreach($arreglo as $campo) { |
---|
417 | $valor_d = ($campo == 'field_proyecto_esfuerzo') ? 0 : ''; |
---|
418 | $valor = isset($proyecto->{$campo}[$i]) ? $proyecto->{$campo}[$i]['value'] : $valor_d; |
---|
419 | $row[] = array('data' => check_plain($valor), 'align' => 'center',); |
---|
420 | } |
---|
421 | $rows[] = $row; |
---|
422 | } |
---|
423 | if (!count($rows)) { |
---|
424 | $row[] = array('data' => t('No se ha ingresado la sección de Capacidades'), 'colspan' => count($header), 'align' => 'center'); |
---|
425 | $rows[] = $row; |
---|
426 | } |
---|
427 | print theme('table', $header, $rows, array('border' => '1')); |
---|
428 | ?> |
---|
429 | </td></tr> |
---|
430 | <?php endif; ?> |
---|
431 | <tr><td colspan="2" align="center" ><h3><?php print t('Instituciones');?></h3></td></tr> |
---|
432 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_relacion']['field']['#title'];?>:</b> </td></tr> |
---|
433 | <tr><td colspan="2" align="center"><?php print strip_tags(drupal_render($content->content['field_proyecto_relacion']));?> </td></tr> |
---|
434 | <tr><td colspan="2" align="center" ><h3><?php print t('Nro Estimados de Empleos Generados');?></h3></td></tr> |
---|
435 | <tr><td colspan="2" align="center" > |
---|
436 | <?php |
---|
437 | $labels = array( |
---|
438 | 'field_proyectos_femenino_i' => t('Empleos Masculinos'), |
---|
439 | 'field_proyectos_femenino_d'=> t('Empleos Femeninos'), |
---|
440 | 'field_proyectos_masculino_d' => t('Total'), |
---|
441 | ); |
---|
442 | $arreglo1 = array( |
---|
443 | 'field_proyecto_efdirecto' => 'field_proyecto_efdirecto', |
---|
444 | 'field_proyecto_emdirecto' => 'field_proyecto_emdirecto', |
---|
445 | ); |
---|
446 | $arreglo2 = array( |
---|
447 | 'field_proyecto_emindirecto' => 'field_proyecto_emindirecto', |
---|
448 | 'field_proyecto_efindirecto' => 'field_proyecto_efindirecto', |
---|
449 | ); |
---|
450 | $header = array(); |
---|
451 | $rows = array(); |
---|
452 | $row = array(); |
---|
453 | $sum_fila = 0; |
---|
454 | foreach ($labels as $label) { |
---|
455 | $header[] = array('data' => $label, 'align' => 'center'); |
---|
456 | } |
---|
457 | foreach($arreglo1 as $campo) { |
---|
458 | $valor_d = 0; |
---|
459 | $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d; |
---|
460 | $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
461 | $row[] = array('data' => t('Directos Nuevos: ') . check_plain($valor_m), 'align' => 'left',); |
---|
462 | $sum_fila += $valor; |
---|
463 | } |
---|
464 | $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
465 | $row[] = array('data' => t('Empleos Nuevos: ') . $valor_m, 'align' => 'left',); |
---|
466 | $rows[] = $row; |
---|
467 | $row = array(); |
---|
468 | $sum_fila = 0; |
---|
469 | foreach($arreglo2 as $campo) { |
---|
470 | $valor_d = 0; |
---|
471 | $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d; |
---|
472 | $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
473 | $row[] = array('data' => t('Directos Sostenidos: ') . check_plain($valor_m), 'align' => 'left',); |
---|
474 | $sum_fila += $valor; |
---|
475 | } |
---|
476 | $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
477 | $row[] = array('data' => t('Empleos Sostenidos: ') . $valor_m, 'align' => 'left',); |
---|
478 | |
---|
479 | $rows[] = $row; |
---|
480 | |
---|
481 | $row = array(); |
---|
482 | $valor_t1 = $proyecto->field_proyecto_efdirecto[0]['value'] + $proyecto->field_proyecto_emindirecto[0]['value']; |
---|
483 | $row[] = array('data' => t('Total de Empleos Directos Masculinos: ') . number_format($valor_t1, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',); |
---|
484 | |
---|
485 | $valor_t2 = $proyecto->field_proyecto_emdirecto[0]['value'] + $proyecto->field_proyecto_efindirecto[0]['value']; |
---|
486 | $row[] = array('data' => t('Total de Empleos Directos Femeninos: ') . number_format($valor_t2, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',); |
---|
487 | |
---|
488 | $valor_t = $valor_t1 + $valor_t2; |
---|
489 | $row[]= array('data' => t('Total de Empleos Directos: ') . number_format($valor_t, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',); |
---|
490 | |
---|
491 | $rows[] = $row; |
---|
492 | print theme('table', $header, $rows, array('border' => '1')); |
---|
493 | ?> |
---|
494 | </td></tr> |
---|
495 | <?php if (variable_get('proyectos_operativos_muestra_beneficiario', TRUE)): ?> |
---|
496 | <tr><td colspan="2" align="center" ><h3><?php print t('Beneficiarios');?></h3></td></tr> |
---|
497 | <tr><td colspan="2" align="center" > |
---|
498 | <?php |
---|
499 | $labes = array( |
---|
500 | 'field_proyecto_beneficiario' => t('Beneficiario'), |
---|
501 | 'field_proyectos_masculino_d' => t('Número estimado de beneficiarios masculinos'), |
---|
502 | 'field_proyectos_femenino_i' => t('Número estimado de beneficiarios femeninos'), |
---|
503 | ); |
---|
504 | $arreglo = array( |
---|
505 | 'field_proyecto_beneficiario' => 'field_proyecto_beneficiario', |
---|
506 | 'field_proyectos_masculino_d' => 'field_proyectos_masculino_d', |
---|
507 | //'field_proyectos_femenino_d' => 'field_proyectos_femenino_d', |
---|
508 | ); |
---|
509 | if (variable_get('proyectos_operativos_muestra_beneficiarios_indirectos', TRUE)) { |
---|
510 | // $arreglo['field_proyectos_masculino_i'] = 'field_proyectos_masculino_i'; |
---|
511 | $arreglo['field_proyectos_femenino_i'] = 'field_proyectos_femenino_i'; |
---|
512 | } |
---|
513 | $header = array(); |
---|
514 | foreach($labes as $label) { |
---|
515 | $header[] = array('data' => $label, 'align' => 'center'); |
---|
516 | } |
---|
517 | $header[] = array('data' => t('TOTAL'), 'align' => 'center'); |
---|
518 | $tamano_array = array(); |
---|
519 | foreach($arreglo as $field_id => $field) { |
---|
520 | $tamano_array[] = count($proyecto->{$field_id}); |
---|
521 | } |
---|
522 | $cantidad_talento = max($tamano_array); |
---|
523 | $rows = array(); |
---|
524 | $suma_arreglo = array(); |
---|
525 | foreach($arreglo as $campo) { |
---|
526 | $suma_arreglo[$campo] = 0; |
---|
527 | } |
---|
528 | for ($i = 0; $i < $cantidad_talento; $i++) { |
---|
529 | $row = array(); |
---|
530 | $sum_fila = 0; |
---|
531 | foreach($arreglo as $campo) { |
---|
532 | if ($campo != 'field_proyecto_beneficiario') { |
---|
533 | $valor_d = ($field_id == 'field_proyecto_esfuerzo') ? 0 : ''; |
---|
534 | $valor = isset($proyecto->{$campo}[$i]['value']) ? $proyecto->{$campo}[$i]['value'] : $valor_d; |
---|
535 | $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
536 | $row[] = array('data' => check_plain($valor_m), 'align' => 'center',); |
---|
537 | $sum_fila += $valor; |
---|
538 | $suma_arreglo[$campo] += $valor; |
---|
539 | } |
---|
540 | else { |
---|
541 | $row[] = array('data' => check_plain($proyecto->{$campo}[$i]['value']), 'align' => 'left',); |
---|
542 | } |
---|
543 | } |
---|
544 | $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
545 | $row[] = array('data' => $valor_m, 'align' => 'center',); |
---|
546 | $rows[] = $row; |
---|
547 | } |
---|
548 | $sum_fila = 0; |
---|
549 | $row = array(); |
---|
550 | foreach($arreglo as $campo) { |
---|
551 | if ($campo == 'field_proyecto_beneficiario') { |
---|
552 | $row[] = array('data' => t('TOTAL DE BENEFICIARIOS'), 'align' => 'right',); |
---|
553 | } |
---|
554 | else { |
---|
555 | $valor_m = $suma_arreglo[$campo] ? number_format($suma_arreglo[$campo], 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
556 | $row[] = array('data' => check_plain($valor_m), 'align' => 'center',); |
---|
557 | $sum_fila += $suma_arreglo[$campo]; |
---|
558 | } |
---|
559 | } |
---|
560 | $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0; |
---|
561 | $row[] = array('data' => $valor_m, 'align' => 'center',); |
---|
562 | $rows[] = $row; |
---|
563 | print theme('table', $header, $rows, array('border' => '1')); |
---|
564 | ?> |
---|
565 | </td></tr> |
---|
566 | <?php endif ?> |
---|
567 | <tr><td colspan="2" align="center" ><h3><?php print t('Objetivos del Proyecto');?></h3></td></tr> |
---|
568 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_og']['field']['#title'];?>:</b> </td></tr> |
---|
569 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_og']));?> </td></tr> |
---|
570 | <tr><td colspan="2" align="left"><b><?php print $content->content['field_proyecto_oe']['field']['#title'];?>:</b> </td></tr> |
---|
571 | <?php |
---|
572 | $datos = array(); |
---|
573 | foreach ($proyecto->field_proyecto_oe as $valor) { |
---|
574 | $datos[] = $valor['value']; |
---|
575 | } |
---|
576 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado objetivos para este proyecto'); |
---|
577 | ?> |
---|
578 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
579 | <tr><td colspan="2" align="center" ><h2><? print t('Indicadores del Proyecto');?></h2></td></tr> |
---|
580 | <?php if (variable_get('proyectos_operativos_muestra_enunciado_problema', TRUE)): ?> |
---|
581 | <tr><td colspan="2" align="center" ><h3><? print t('Enunciado del Problema');?></h3></td></tr> |
---|
582 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_consecuencias']['field']['#title'];?>:</b> </td></tr> |
---|
583 | <?php |
---|
584 | $datos = array(); |
---|
585 | foreach ($proyecto->field_proyecto_consecuencias as $valor) { |
---|
586 | $datos[] = $valor['value']; |
---|
587 | } |
---|
588 | $contenido = (count($datos)) ? '<ul><li>' . implode('</li><li>', $datos) . '</li></ul>' : t('No se han ingresado consecuencias a este proyecto'); |
---|
589 | ?> |
---|
590 | <tr><td colspan="2" align="justify"><?php print $contenido;?> </td></tr> |
---|
591 | <?php endif ?> |
---|
592 | |
---|
593 | |
---|
594 | |
---|
595 | <?php if (variable_get('proyectos_operativos_muestra_servicios_balance', TRUE)): ?> |
---|
596 | <tr><td colspan="2" align="center" ><h3><? print t('Impacto Ambiental del Proyecto');?></h3></td></tr> |
---|
597 | <tr><td colspan="2" align="center" ><h4><? print t('Tipo de impacto');?></h4></td></tr> |
---|
598 | <tr><td align="center"> <b><?php print $content->content['field_tipo_factores']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_factor_impact_multifc']['field']['#title'];?>:</b> </td></tr> |
---|
599 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_tipo_factores']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_factor_impact_multifc']));?> </td></tr> |
---|
600 | <tr><td align="center"> <b><?php print $content->content['field_factor_segun_origen']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_factor_impact_multiog']['field']['#title'];?>:</b> </td></tr> |
---|
601 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_factor_segun_origen']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_factor_impact_multiog']));?> </td></tr> |
---|
602 | <tr><td colspan="2" align="center" ><h4><? print t('Caracterización cualitativa de los efectos');?></h4></td></tr> |
---|
603 | <tr><td colspan="2" align="center" > |
---|
604 | <?php |
---|
605 | |
---|
606 | $arreglo = array(); |
---|
607 | $arreglo[] = array( |
---|
608 | 'field_factor_naturaleza' => 'Naturaleza', |
---|
609 | 'field_factor_intensidad' => 'Intensidad', |
---|
610 | 'field_factor_momento' => 'Momento', |
---|
611 | 'field_factor_persistencia' => 'Persistencia', |
---|
612 | 'field_factor_reversibilidad' => 'Reversibilidad', |
---|
613 | ); |
---|
614 | $arreglo[] = array( |
---|
615 | 'field_factor_extension' => 'Extensión', |
---|
616 | 'field_factor_sinergismo' => ' Sinergismo', |
---|
617 | 'field_factor_acumulacion' => 'Acumulación', |
---|
618 | 'field_factor_relacion' =>' Relación causa-efecto', |
---|
619 | 'field_factor_recuperabilidad' => ' Recuperabilidad', |
---|
620 | ); |
---|
621 | $arreglo[] = array( |
---|
622 | 'field_factor_importancia' => 'Importancia', |
---|
623 | 'field_factor_medids_impact' => '¿Cuales serán las medidas para mitigar o eliminar los impactos ambientales de este proyecto?', |
---|
624 | ); |
---|
625 | |
---|
626 | foreach ($arreglo as $values) { |
---|
627 | $row = array(); $rows = array(); |
---|
628 | $header = array(); |
---|
629 | foreach ($values as $key => $value) { |
---|
630 | $field = content_fields($key); |
---|
631 | $header[] = array('data' => $value, 'align' => 'center'); |
---|
632 | $value = check_plain($proyecto->{$field['field_name']}[0]['value']); |
---|
633 | if ($options = optionwidgets_options($field)) { |
---|
634 | $value = $options[$proyecto->{$field['field_name']}[0]['value']]; |
---|
635 | } |
---|
636 | $row[] = array('data' => $value, 'align' => 'left',); |
---|
637 | } |
---|
638 | $rows[] = $row; |
---|
639 | print theme('table', $header, $rows, array('border' => '1')); |
---|
640 | } |
---|
641 | |
---|
642 | ?> |
---|
643 | </td></tr> |
---|
644 | <?php endif ?> |
---|
645 | <?php if (variable_get('proyectos_operativos_muestra_servicios_balance', TRUE)): ?> |
---|
646 | <tr><td colspan="2" align="center" ><h3><? print t('Balance Estimado Nacional de Servicios Energéticos');?></h3></td></tr> |
---|
647 | <tr><td colspan="2" align="center" > |
---|
648 | <?php |
---|
649 | $arreglo = array(); |
---|
650 | $rows = array(); |
---|
651 | $arreglo['servicios'] = array( |
---|
652 | 'field_balnc_progrmn_anu' => 'Tipo de Instalación', |
---|
653 | 'field_balance_fuente' => 'Fuente', |
---|
654 | 'field_balanc_tipofuent' => 'Tipo de Fuente', |
---|
655 | 'field_balanc_tipoprod' => 'Tipo de Producto', |
---|
656 | 'field_balanc_unidmed' => 'Unidad de Medida', |
---|
657 | 'field_balanc_capacid' => 'Capacidad', |
---|
658 | 'field_balanc_anho' => 'Año', |
---|
659 | ); |
---|
660 | $header = ''; |
---|
661 | $element = array(); |
---|
662 | foreach ($arreglo['servicios'] as $field_id => $label) { |
---|
663 | if (isset($proyecto->{$field_id})) { |
---|
664 | foreach ($proyecto->{$field_id} as $key => $field) { |
---|
665 | $field = content_fields($field_id); |
---|
666 | $value = check_plain($proyecto->{$field_id}[$key]['value']); |
---|
667 | if ($options = optionwidgets_options($field)) { |
---|
668 | $value = $options[$proyecto->{$field_id}[$key]['value']]; |
---|
669 | } |
---|
670 | $element[$key] .= '<td>' . $value . '</td>'; |
---|
671 | } |
---|
672 | $header .= '<th>' . $label . '</th>'; |
---|
673 | } |
---|
674 | } |
---|
675 | if (count($element)) { |
---|
676 | $output = '<table>'; |
---|
677 | $output .= '<tr>'. $header . '</tr>'; |
---|
678 | foreach ($element as $value) { |
---|
679 | $output .= '<tr class="odd">'; |
---|
680 | $output .= $value; |
---|
681 | $output .= '</tr>'; |
---|
682 | } |
---|
683 | $output .= '</table>'; |
---|
684 | print $output; |
---|
685 | } |
---|
686 | ?> |
---|
687 | </td></tr> |
---|
688 | <?php endif ?> |
---|
689 | <?php if (variable_get('proyectos_operativos_muestra_programacion_anual', TRUE)): ?> |
---|
690 | <tr><td colspan="2" align="center" ><h3><? print t('Programacion Anual por Consumidor');?></h3></td></tr> |
---|
691 | <tr><td colspan="2" align="center" > |
---|
692 | <?php |
---|
693 | $arreglo = array(); |
---|
694 | $rows = array(); |
---|
695 | $arreglo['programacion'] = array( |
---|
696 | 'field_progrmcn_anual_prog' => 'Tipo de Instalación', |
---|
697 | 'field_progrmcn_anual_unid' => 'Unidad de Medida', |
---|
698 | 'field_progrmcn_anual_cap' => 'Capacidad', |
---|
699 | 'field_progrmcn_anual_anho' => 'Año', |
---|
700 | ); |
---|
701 | |
---|
702 | $header = ''; |
---|
703 | $element = array(); |
---|
704 | foreach ($arreglo['programacion'] as $field_id => $label) { |
---|
705 | if (isset($proyecto->{$field_id})) { |
---|
706 | foreach ($proyecto->{$field_id} as $key => $field) { |
---|
707 | $field = content_fields($field_id); |
---|
708 | $value = check_plain($proyecto->{$field_id}[$key]['value']); |
---|
709 | if ($options = optionwidgets_options($field)) { |
---|
710 | $value = $options[$proyecto->{$field_id}[$key]['value']]; |
---|
711 | } |
---|
712 | $element[$key] .= '<td>' . $value . '</td>'; |
---|
713 | } |
---|
714 | $header .= '<th>' . $label . '</th>'; |
---|
715 | } |
---|
716 | } |
---|
717 | if (count($element)) { |
---|
718 | $output = '<table>'; |
---|
719 | $output .= '<tr>'. $header . '</tr>'; |
---|
720 | foreach ($element as $value) { |
---|
721 | $output .= '<tr class="odd">'; |
---|
722 | $output .= $value; |
---|
723 | $output .= '</tr>'; |
---|
724 | } |
---|
725 | $output .= '</table>'; |
---|
726 | print $output; |
---|
727 | } |
---|
728 | ?> |
---|
729 | </td></tr> |
---|
730 | <?php endif ?> |
---|
731 | <?php if ($sa || $so): ?> |
---|
732 | <tr><td colspan="2" align="center" ><h3><? print t('Indicador de la Situación');?></h3></td></tr> |
---|
733 | <?php if ($sa): ?> |
---|
734 | <tr><td colspan="2" align="center" ><h4><? print t('Situación Actual');?></h4></td></tr> |
---|
735 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_sa_descripcion']['field']['#title'];?>:</b> </td></tr> |
---|
736 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_sa_descripcion']));?> </td></tr> |
---|
737 | <tr><td align="center"> <b><?php print $content->content['field_proyecto_sa_formulai']['field']['#title'];?>:</b> </td><td align="center"> <b><?php print $content->content['field_proyecto_sa_fuentei']['field']['#title'];?>:</b> </td></tr> |
---|
738 | <tr><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_sa_formulai']));?> </td><td align="center"> <?php print strip_tags(drupal_render($content->content['field_proyecto_sa_fuentei']));?> </td></tr> |
---|
739 | <tr><td align="center" <?php if (!variable_get('proyectos_operativos_muestra_sa_cuantificacion', TRUE)) {print 'colspan="2"';}?>> <b><?php print $content->content['field_proyecto_sa_fecha']['field']['#title'];?>:</b> </td> |
---|
740 | <?php |
---|
741 | if (variable_get('proyectos_operativos_muestra_sa_cuantificacion', TRUE)) { |
---|
742 | print '<td align="center"> <b>' . print $content->content['field_proyecto_sa_cuantificacion']['field']['#title'] . ':</b> </td>'; |
---|
743 | } |
---|
744 | ?> |
---|
745 | </tr> |
---|
746 | <tr><td align="center" <?php if (!variable_get('proyectos_operativos_muestra_sa_cuantificacion', TRUE)) {print 'colspan="2"';}?>> <?php print strip_tags(drupal_render($content->content['field_proyecto_sa_fecha']));?> </td> |
---|
747 | <?php |
---|
748 | if (variable_get('proyectos_operativos_muestra_sa_cuantificacion', TRUE)) { |
---|
749 | print '<td align="center"> ' . strip_tags(drupal_render($content->content['field_proyecto_sa_cuantificacion'])) . ' </td></tr>'; |
---|
750 | } |
---|
751 | ?> |
---|
752 | </tr> |
---|
753 | <?php endif ?> |
---|
754 | |
---|
755 | <?php if ($so): ?> |
---|
756 | <tr><td colspan="2" align="center" ><h4><? print t('Situación Objetivo');?></h4></td></tr> |
---|
757 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_so_descripcion']['field']['#title'];?>:</b> </td></tr> |
---|
758 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_so_descripcion']));?> </td></tr> |
---|
759 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_tiempoi']['field']['#title'];?>:</b> </td></tr> |
---|
760 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_tiempoi']));?> </td></tr> |
---|
761 | <?php endif ?> |
---|
762 | <?php endif ?> |
---|
763 | <tr><td colspan="2" align="center" ><h3><? print t('Indicador del resultado del Proyecto');?></h3></td></tr> |
---|
764 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_descripcion_bien']['field']['#title'];?>:</b> </td></tr> |
---|
765 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content['field_proyecto_descripcion_bien']));?> </td></tr> |
---|
766 | <!-- Unidad de Medida --> |
---|
767 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_unidadm']['field']['#title'];?>:</b> </td></tr> |
---|
768 | <?php |
---|
769 | $datos = array(); |
---|
770 | foreach ($proyecto->field_proyecto_unidadm as $valor) { |
---|
771 | $datos[] = $valor['value']; |
---|
772 | $term = taxonomy_get_term($datos[0], $reset = FALSE); |
---|
773 | } |
---|
774 | ?> |
---|
775 | <tr><td colspan="2" align="center"><?php print $term->name;?> </td></tr> |
---|
776 | <!-- end Unidad de Medida --> |
---|
777 | <!-- Distribución de la meta fisÃca del proyecto --> |
---|
778 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_meta_fisica']['field']['#title'];?>:</b> </td></tr> |
---|
779 | <tr><td colspan="2" align="justify"><?php print strip_tags(drupal_render($content->content[$meta]), '<table><th><tbody><tr><td>');?> </td></tr> |
---|
780 | <!-- End Distribución de la meta fisÃca del proyecto --> |
---|
781 | |
---|
782 | <!-- Localización del Proyecto: --> |
---|
783 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_ubicaci_inter']['field']['#title'];?>:</b> </td></tr> |
---|
784 | <tr><td colspan="2" align="center"><b><?php print $content->content['field_proyecto_ubicaci_inter']['#children'];?></b> </td></tr> |
---|
785 | <!-- End Localización del Proyecto: --> |
---|
786 | <tr><td colspan="2" align="center" ><h3><? print t('Acciones EspecÃficas');?></h3></td></tr> |
---|
787 | <tr><td colspan="2" align="center" > |
---|
788 | <?php print drupal_render($content->content['field_proyecto_accion_esp']); ?> |
---|
789 | </td></tr> |
---|
790 | </table> |
---|
791 | |
---|
792 | <?php |
---|
793 | /* |
---|
794 | $unidad_m = module_exists('proyectos_reformulacion') ? 'proyectos_operativos_unidad_medida_reformulado' : 'field_proyecto_unidadm'; |
---|
795 | $meta = module_exists('proyectos_reformulacion') ? 'proyectos_operativos_meta_fisica_reformulado' : 'field_proyecto_meta_fisica'; |
---|
796 | <h3><?php print t('Indicador del resultado del Proyecto');?></h3> |
---|
797 | <?php |
---|
798 | $arreglo = array( |
---|
799 | 'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien', |
---|
800 | 'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion', |
---|
801 | 'field_proyecto_unidadm' => 'field_proyecto_unidadm', |
---|
802 | 'field_proyecto_meta_fisica' => 'field_proyecto_meta_fisica', |
---|
803 | ); |
---|
804 | if (module_exists('proyectos_reformulacion')) { |
---|
805 | $arreglo['field_proyecto_unidadm'] = 'proyectos_operativos_unidad_medida_reformulado'; |
---|
806 | $arreglo['field_proyecto_meta_fisica'] = 'proyectos_operativos_meta_fisica_reformulado'; |
---|
807 | } |
---|
808 | ?> |
---|
809 | <?php foreach($arreglo as $campo): ?> |
---|
810 | <?php print drupal_render($content->content[$campo]); ?> |
---|
811 | <?php endforeach ?> |
---|
812 | <h3><?php print t('Acciones EspecÃficas');?></h3> |
---|
813 | <?php print drupal_render($content->content['field_proyecto_accion_esp']); ?> |
---|
814 | */?> |
---|