Conjunto c133e30 en sipes


Ignorar:
Fecha y hora:
07/07/2016 10:15:20 (hace 8 años)
Autor:
lhernandez <lhernandez@…>
Branches:
stable, version-3.0
Children:
364e0b2
Parents:
7e7f08d
Mensaje:

se modifico la ficha

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • 0.3-modules/proyectos_operativos_mcti/templates/proyectos-operativos-mcti-ficha-proyecto.tpl.php

    r2db5c18 rc133e30  
    7979  <?php print drupal_render($content->content[$campo]); ?>
    8080<?php endforeach ?>
    81 <?php
    82   $arreglo['gerente'] = array(
    83     'field_proyecto_nombre_gere' => 'field_proyecto_nombre_gere',
    84     'field_proyecto_cedul_gere' => 'field_proyecto_cedul_gere',
    85     'field_proyecto_corre_gere' => 'field_proyecto_corre_gere',
    86     'field_proyecto_telef_gere' => 'field_proyecto_telef_gere',
    87   );
    88   $arreglo['tecnico'] = array(
    89     'field_proyecto_nom_r_tec' => 'field_proyecto_nom_r_tec',
    90     'field_proyecto_ced_r_tec' => 'field_proyecto_ced_r_tec',
    91     'field_proyecto_cor_r_tec' => 'field_proyecto_cor_r_tec',
    92     'field_proyecto_tel_r_tec' => 'field_proyecto_tel_r_tec',
    93     'field_proyecto_und_r_tec' => 'field_proyecto_und_r_tec',
    94   );
    95   $arreglo['registrador'] = array(
    96     'field_proyecto_nom_r_reg' => 'field_proyecto_nom_r_reg',
    97     'field_proyecto_ced_r_reg' => 'field_proyecto_ced_r_reg',
    98     'field_proyecto_cor_r_reg' => 'field_proyecto_cor_r_reg',
    99     'field_proyecto_tel_r_reg' => 'field_proyecto_tel_r_reg',
    100   );
    101   $arreglo['administrativo'] = array(
    102     'field_proyecto_nom_r_adm' => 'field_proyecto_nom_r_adm',
    103     'field_proyecto_ced_r_adm' => 'field_proyecto_ced_r_adm',
    104     'field_proyecto_cor_r_adm' => 'field_proyecto_cor_r_adm',
    105     'field_proyecto_tel_r_adm' => 'field_proyecto_tel_r_adm',
    106     'field_proyecto_und_r_adm' => 'field_proyecto_und_r_adm',
    107   );
    108 ?>
    109 <!-- Responsable Gerente -->
    110 <?php print ("<th><h3>Datos del Gerente</h3></th>"); ?>
    111 <?php print("<table>"); ?>
    112    <?php foreach($arreglo['gerente'] as $campo): ?>
    113      <?php print("<th>"); ?>
    114      <?php print $content->content[$campo]['field']['#title']; ?>
    115      <?php print("</th>"); ?>
    116    <?php endforeach ?>
    117    <?php print("<tr>"); ?>
     81
     82<?php if (variable_get('proyectos_operativos_muestra_responsables', TRUE)):  ?>
     83  <?php
     84    $arreglo['gerente'] = array(
     85      'field_proyecto_nombre_gere' => 'field_proyecto_nombre_gere',
     86      'field_proyecto_cedul_gere' => 'field_proyecto_cedul_gere',
     87      'field_proyecto_corre_gere' => 'field_proyecto_corre_gere',
     88      'field_proyecto_telef_gere' => 'field_proyecto_telef_gere',
     89    );
     90    $arreglo['tecnico'] = array(
     91      'field_proyecto_nom_r_tec' => 'field_proyecto_nom_r_tec',
     92      'field_proyecto_ced_r_tec' => 'field_proyecto_ced_r_tec',
     93      'field_proyecto_cor_r_tec' => 'field_proyecto_cor_r_tec',
     94      'field_proyecto_tel_r_tec' => 'field_proyecto_tel_r_tec',
     95      'field_proyecto_und_r_tec' => 'field_proyecto_und_r_tec',
     96    );
     97    $arreglo['registrador'] = array(
     98      'field_proyecto_nom_r_reg' => 'field_proyecto_nom_r_reg',
     99      'field_proyecto_ced_r_reg' => 'field_proyecto_ced_r_reg',
     100      'field_proyecto_cor_r_reg' => 'field_proyecto_cor_r_reg',
     101      'field_proyecto_tel_r_reg' => 'field_proyecto_tel_r_reg',
     102    );
     103    $arreglo['administrativo'] = array(
     104      'field_proyecto_nom_r_adm' => 'field_proyecto_nom_r_adm',
     105      'field_proyecto_ced_r_adm' => 'field_proyecto_ced_r_adm',
     106      'field_proyecto_cor_r_adm' => 'field_proyecto_cor_r_adm',
     107      'field_proyecto_tel_r_adm' => 'field_proyecto_tel_r_adm',
     108      'field_proyecto_und_r_adm' => 'field_proyecto_und_r_adm',
     109    );
     110  ?>
     111  <!-- Responsable Gerente -->
     112  <?php print ("<th><h3>Datos del Gerente</h3></th>"); ?>
     113  <?php print("<table>"); ?>
    118114     <?php foreach($arreglo['gerente'] as $campo): ?>
    119       <?php print("<td>"); ?>
    120         <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
     115       <?php print("<th>"); ?>
     116       <?php print $content->content[$campo]['field']['#title']; ?>
     117       <?php print("</th>"); ?>
     118     <?php endforeach ?>
     119     <?php print("<tr>"); ?>
     120       <?php foreach($arreglo['gerente'] as $campo): ?>
     121        <?php print("<td>"); ?>
     122          <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
     123            <?php if (isset($value['email'])): ?>
     124              <?php $values = $value['email']; ?>
     125            <?php else: ?>
     126              <?php $values = $value['value']; ?>
     127            <?php endif; ?>
     128          <?php endforeach ?>
     129          <?php print $values; ?>
     130        <?php print("</td>"); ?>
     131      <?php endforeach ?>
     132    <?php print("<tr>"); ?>
     133  <?php print("</table>"); ?>
     134  <!-- end Responsable Gerente -->
     135
     136  <!-- Responsable tecnico -->
     137  <?php print ("<th><h3>Datos del Responsable tecnico</h3></th>"); ?>
     138    <?php print("<table>"); ?>
     139      <?php foreach($arreglo['tecnico'] as $campo): ?>
     140        <?php print("<th>"); ?>
     141          <?php print $content->content[$campo]['field']['#title']; ?>
     142        <?php print("</th>"); ?>
     143      <?php endforeach ?>
     144      <?php print("<tr>"); ?>
     145        <?php foreach($arreglo['tecnico'] as $campo): ?>
     146          <?php print("<td>"); ?>
     147            <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
     148            <?php if (isset($value['email'])): ?>
     149              <?php $values = $value['email']; ?>
     150            <?php else: ?>
     151              <?php $values = $value['value']; ?>
     152            <?php endif; ?>
     153          <?php endforeach ?>
     154          <?php print $values; ?>
     155      <?php print("</td>"); ?>
     156      <?php endforeach ?>
     157    <?php print("<tr>"); ?>
     158  <?php print("</table>"); ?>
     159  <!-- end Responsable tecnico -->
     160
     161  <!-- Responsable registrador -->
     162  <?php print ("<th><h3>Datos del Responsable Registrador</h3></th>"); ?>
     163    <?php print("<table>"); ?>
     164      <?php foreach($arreglo['registrador'] as $campo): ?>
     165        <?php print("<th>"); ?>
     166          <?php print $content->content[$campo]['field']['#title']; ?>
     167        <?php print("</th>"); ?>
     168      <?php endforeach ?>
     169      <?php print("<tr>"); ?>
     170        <?php foreach($arreglo['registrador'] as $campo): ?>
     171         <?php print("<td>"); ?>
     172           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
     173             <?php if (isset($value['email'])): ?>
     174               <?php $values = $value['email']; ?>
     175             <?php else: ?>
     176               <?php $values = $value['value']; ?>
     177             <?php endif; ?>
     178           <?php endforeach ?>
     179           <?php print $values; ?>
     180         <?php print("</td>"); ?>
     181      <?php endforeach ?>
     182    <?php print("<tr>"); ?>
     183  <?php print("</table>"); ?>
     184  <!-- end Responsable registrador -->
     185
     186  <!-- Responsable administrador -->
     187  <?php print ("<th><h3>Datos del Responsable Administrativo</h3></th>"); ?>
     188    <?php print("<table>"); ?>
     189      <?php foreach($arreglo['administrativo'] as $campo): ?>
     190       <?php print("<th>"); ?>
     191       <?php print $content->content[$campo]['field']['#title']; ?>
     192       <?php print("</th>"); ?>
     193     <?php endforeach ?>
     194     <?php print("<tr>"); ?>
     195       <?php foreach($arreglo['administrativo'] as $campo): ?>
     196         <?php print("<td>"); ?>
     197         <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    121198          <?php if (isset($value['email'])): ?>
    122199            <?php $values = $value['email']; ?>
     
    125202          <?php endif; ?>
    126203        <?php endforeach ?>
    127         <?php implode(',', $values); ?>
    128         <?php print($values); ?>
    129       <?php print("</td>"); ?>
    130     <?php endforeach ?>
    131   <?php print("<tr>"); ?>
    132 <?php print("</table>"); ?>
    133 <!-- end Responsable Gerente -->
    134 
    135 <!-- Responsable tecnico -->
    136 <?php print ("<th><h3>Datos del Responsable tecnico</h3></th>"); ?>
    137   <?php print("<table>"); ?>
    138     <?php foreach($arreglo['tecnico'] as $campo): ?>
    139       <?php print("<th>"); ?>
    140         <?php print $content->content[$campo]['field']['#title']; ?>
    141       <?php print("</th>"); ?>
    142     <?php endforeach ?>
     204        <?php print $values; ?>
     205        <?php print("</td>"); ?>
     206      <?php endforeach ?>
    143207    <?php print("<tr>"); ?>
    144       <?php foreach($arreglo['tecnico'] as $campo): ?>
    145         <?php print("<td>"); ?>
    146           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    147           <?php if (isset($value['email'])): ?>
    148             <?php $values = $value['email']; ?>
    149           <?php else: ?>
    150             <?php $values = $value['value']; ?>
    151           <?php endif; ?>
    152         <?php endforeach ?>
    153         <?php implode(',', $values); ?>
    154         <?php print($values); ?>
    155       <?php print("</td>"); ?>
    156     <?php endforeach ?>
    157   <?php print("<tr>"); ?>
    158 <?php print("</table>"); ?>
    159 <!-- end Responsable tecnico -->
    160 
    161 <!-- Responsable registrador -->
    162 <?php print ("<th><h3>Datos del Responsable Registrador</h3></th>"); ?>
    163   <?php print("<table>"); ?>
    164     <?php foreach($arreglo['registrador'] as $campo): ?>
    165       <?php print("<th>"); ?>
    166         <?php print $content->content[$campo]['field']['#title']; ?>
    167       <?php print("</th>"); ?>
    168     <?php endforeach ?>
    169     <?php print("<tr>"); ?>
    170       <?php foreach($arreglo['registrador'] as $campo): ?>
    171        <?php print("<td>"); ?>
    172          <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    173            <?php if (isset($value['email'])): ?>
    174              <?php $values = $value['email']; ?>
    175            <?php else: ?>
    176              <?php $values = $value['value']; ?>
    177            <?php endif; ?>
    178          <?php endforeach ?>
    179          <?php implode(',', $values); ?>
    180          <?php print($values); ?>
    181        <?php print("</td>"); ?>
    182     <?php endforeach ?>
    183   <?php print("<tr>"); ?>
    184 <?php print("</table>"); ?>
    185 <!-- end Responsable registrador -->
    186 
    187 <!-- Responsable administrador -->
    188 <?php print ("<th><h3>Datos del Responsable Administrativo</h3></th>"); ?>
    189   <?php print("<table>"); ?>
    190     <?php foreach($arreglo['administrativo'] as $campo): ?>
    191      <?php print("<th>"); ?>
    192      <?php print $content->content[$campo]['field']['#title']; ?>
    193      <?php print("</th>"); ?>
    194    <?php endforeach ?>
    195    <?php print("<tr>"); ?>
    196      <?php foreach($arreglo['administrativo'] as $campo): ?>
    197     <?php print("<td>"); ?>
    198       <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    199         <?php if (isset($value['email'])): ?>
    200           <?php $values = $value['email']; ?>
    201         <?php else: ?>
    202           <?php $values = $value['value']; ?>
    203         <?php endif; ?>
    204       <?php endforeach ?>
    205       <?php implode(',', $values); ?>
    206       <?php print($values); ?>
    207       <?php print("</td>"); ?>
    208     <?php endforeach ?>
    209   <?php print("<tr>"); ?>
    210 <?php print("</table>"); ?>
     208  <?php print("</table>"); ?>
    211209<!-- end Responsable administrador -->
    212210</fieldset>
     211<?php endif ?>
     212
    213213<?php
    214214  $pndes = variable_get('proyectos_operativos_muestra_pndes', TRUE);
     
    302302<h3><?php print t('Instituciones');?></h3>
    303303<?php print drupal_render($content->content['field_proyecto_relacion']); ?>
    304 <h3><?php print t('Empleos Generados');?></h3>
     304<h3><?php print t('Nro Estimados de Empleos Generados');?></h3>
    305305<?php
    306306  $labels = array(
     
    398398      foreach($arreglo as $campo) {
    399399        if ($campo != 'field_proyecto_beneficiario') {
    400         $valor_d = ($field_id == 'field_proyecto_esfuerzo') ? 0 : '';
    401         $valor = isset($proyecto->{$campo}[$i]['value']) ? $proyecto->{$campo}[$i]['value'] : $valor_d;
    402         $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    403         $row[] = array('data' => check_plain($valor_m), 'align' => 'center',);
     400          $valor_d = ($field_id == 'field_proyecto_esfuerzo') ? 0 : '';
     401          $valor = isset($proyecto->{$campo}[$i]['value']) ? $proyecto->{$campo}[$i]['value'] : $valor_d;
     402          $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
     403          $row[] = array('data' => check_plain($valor_m), 'align' => 'center',);
    404404          $sum_fila += $valor;
    405405          $suma_arreglo[$campo] += $valor;
     
    420420      }
    421421      else {
    422         $valor_m = $suma_arreglo[$campo] ? number_format($suma_arreglo[$campo], 0, '', ',') : 0;
     422        $valor_m = $suma_arreglo[$campo] ? number_format($suma_arreglo[$campo], 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    423423        $row[] = array('data' => check_plain($valor_m), 'align' => 'center',);
    424424        $sum_fila += $suma_arreglo[$campo];
    425425      }
    426426    }
    427     $valor_m = $sum_fila ? number_format($sum_fila, 0, '', ',') : 0;
     427    $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    428428    $row[] = array('data' => $valor_m, 'align' => 'center',);
    429429    $rows[] = $row;
     
    459459  <h3><?php print t('Alcance del Proyecto');?></h3>
    460460  <?php print drupal_render($content->content['field_proyecto_alcance']); ?>
     461<?php endif ?>
     462<?php if (variable_get('proyectos_operativos_muestra_servicios_balance', TRUE)): ?>
     463  <fieldset><legend><h3><?php print t('Impacto Ambiental del Proyecto');?></h3></legend>
     464    <h4><?php print t('Tipo de impacto');?></h4>
     465    <?php print drupal_render($content->content['field_tipo_factores']); ?>
     466    <?php print drupal_render($content->content['field_factor_impact_multifc']); ?>
     467    <?php print drupal_render($content->content['field_factor_segun_origen']); ?>
     468    <?php print drupal_render($content->content['field_factor_impact_multiog']); ?>
     469    <hr>
     470    <h4><?php print t('Caracterización cualitativa de los efectos');?></h4>
     471    <?php
     472      $arreglo = array();
     473      $arreglo[] = array(
     474        'field_factor_naturaleza' => 'Naturaleza',
     475        'field_factor_intensidad' => 'Intensidad',
     476        'field_factor_momento' => 'Momento',
     477        'field_factor_persistencia' => 'Persistencia',
     478        'field_factor_reversibilidad' => 'Reversibilidad',
     479      );
     480      $arreglo[] = array(
     481        'field_factor_extension' => 'Extensión',
     482        'field_factor_sinergismo' => ' Sinergismo',
     483        'field_factor_acumulacion' => 'Acumulación',
     484        'field_factor_relacion' =>' Relación causa-efecto',
     485        'field_factor_recuperabilidad' => ' Recuperabilidad',
     486      );
     487      $arreglo[] = array(
     488        'field_factor_importancia' => 'Importancia',
     489        'field_factor_medids_impact' => '¿Cuales serán las medidas para mitigar o eliminar los impactos ambientales de este proyecto?',
     490      );
     491
     492      foreach ($arreglo as $values) {
     493        $row = array(); $rows = array();
     494        $header = array();
     495        foreach ($values as $key => $value) {
     496          $field = content_fields($key);
     497          $header[] = array('data' => $value, 'align' => 'center');
     498          $value = check_plain($proyecto->{$field['field_name']}[0]['value']);
     499          if ($options = optionwidgets_options($field)) {
     500            $value = $options[$proyecto->{$field['field_name']}[0]['value']];
     501          }
     502          $row[] = array('data' => $value, 'align' => 'left',);
     503        }
     504        $rows[] = $row;
     505        print theme('table', $header, $rows, array('border' => '1'));
     506      }
     507    ?>
     508  </fieldset>
     509<?php endif ?>
     510<?php if (variable_get('proyectos_operativos_muestra_servicios_balance', TRUE)): ?>
     511  <fieldset><legend><h3><?php print t('Balance Estimado Nacional de Servicios Energéticos');?></h3></legend>
     512    <?php
     513      $arreglo = array();
     514      $rows = array();
     515      $arreglo['servicios'] = array(
     516        'field_balnc_progrmn_anu' => 'Tipo de Instalación',
     517        'field_balance_fuente' => 'Fuente',
     518        'field_balanc_tipofuent' => 'Tipo de Fuente',
     519        'field_balanc_tipoprod' => 'Tipo de Producto',
     520        'field_balanc_unidmed' => 'Unidad de Medida',
     521        'field_balanc_capacid' => 'Capacidad',
     522        'field_balanc_anho' => 'Año',
     523      );
     524      for ($i = 0; $i < count($arreglo['servicios']); $i++) {
     525        $row = array();
     526        $header = array();
     527        foreach ($arreglo['servicios'] as $field_id => $label) {
     528          $header[] = array('data' => $label, 'align' => 'center');
     529          $field = content_fields($field_id);
     530          if (is_array($proyecto->{$field_id}[$i])) {
     531            $value = check_plain($proyecto->{$field_id}[$i]['value']);
     532            if ($options = optionwidgets_options($field)) {
     533              $value = $options[$proyecto->{$field_id}[$i]['value']];
     534            }
     535            $row[] = array('data' => $value, 'align' => 'left',);
     536          }
     537        }
     538        $rows[] = $row;
     539      }
     540
     541      print theme('table', $header, $rows, array('border' => '1'));
     542    ?>
     543  </fieldset>
     544<?php endif ?>
     545
     546<?php if (variable_get('proyectos_operativos_muestra_programacion_anual', TRUE)): ?>
     547  <fieldset><legend><h3><?php print t('Programacion Anual por Consumidor');?></h3></legend>
     548    <?php
     549      $arreglo = array();
     550      $rows = array();
     551      $arreglo['programacion'] = array(
     552        'field_progrmcn_anual_prog' => 'Tipo de Instalación',
     553        'field_progrmcn_anual_unid' => 'Unidad de Medida',
     554        'field_progrmcn_anual_cap' => 'Capacidad',
     555        'field_progrmcn_anual_anho' => 'Año',
     556      );
     557      for ($i = 0; $i < count($arreglo['programacion']); $i++) {
     558        $row = array();
     559        $header = array();
     560        foreach ($arreglo['programacion'] as $field_id => $label) {
     561          $field = content_fields($field_id);
     562          $header[] = array('data' => $label, 'align' => 'center');
     563          if (isset($proyecto->{$field_id}[$i]['value'])) {
     564            $value = check_plain($proyecto->{$field_id}[$i]['value']);
     565            if ($options = optionwidgets_options($field)) {
     566              $value = $options[$proyecto->{$field_id}[$i]['value']];
     567            }
     568            $row[] = array('data' => $value, 'align' => 'left',);
     569          }
     570        }
     571        $rows[] = $row;
     572      }
     573      print theme('table', $header, $rows, array('border' => '1'));
     574    ?>
     575  </fieldset>
    461576<?php endif ?>
    462577<?php
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.