Ignorar:
Fecha y hora:
09/06/2016 11:30:03 (hace 8 años)
Autor:
eramirez <eramirez@…>
Branches:
stable, version-3.0
Children:
1d97659
Parents:
3b8331b
Mensaje:

se modifico la ficha del proyecto

Fichero:
1 editado

Leyenda

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

    r303fae2 r2db5c18  
    4646  $arreglo = array(
    4747    'field_proyecto_codigo' => 'field_proyecto_codigo',
     48    'field_descripcin_proyect' => 'field_descripcin_proyect',
    4849    'field_proyecto_fecha_i' => 'field_proyecto_fecha_i',
    4950    'field_proyecto_fecha_f' => 'field_proyecto_fecha_f',
     
    6364<?php print drupal_render($content->content[$campo]); ?>
    6465<?php endforeach ?> 
    65 <h3><?php print t('Responsables del proyecto');?></h3>
     66<fieldset><legend><h3><?php print t('Responsables del proyecto');?></h3></legend>
    6667<?php print drupal_render($content->content['field_proyecto_ente']); ?>
    6768<?php
     
    8990    'field_proyecto_ced_r_tec' => 'field_proyecto_ced_r_tec',
    9091    'field_proyecto_cor_r_tec' => 'field_proyecto_cor_r_tec',
    91     'field_proyecto_tel_r_tec' => 'field_proyecto_cor_r_tec',
     92    'field_proyecto_tel_r_tec' => 'field_proyecto_tel_r_tec',
    9293    'field_proyecto_und_r_tec' => 'field_proyecto_und_r_tec',
    9394  );
     
    109110<?php print ("<th><h3>Datos del Gerente</h3></th>"); ?>
    110111<?php print("<table>"); ?>
    111         <?php foreach($arreglo['gerente'] as $campo): ?>
     112   <?php foreach($arreglo['gerente'] as $campo): ?>
    112113     <?php print("<th>"); ?>
    113114     <?php print $content->content[$campo]['field']['#title']; ?>
    114115     <?php print("</th>"); ?>
    115         <?php endforeach ?>
    116   <?php print("<tr>"); ?>
    117         <?php foreach($arreglo['gerente'] as $campo): ?>
    118     <?php print("<td>"); ?>
    119           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    120       <?php $values = $value['value']; ?>
    121           <?php endforeach ?>
    122     <?php implode(',', $values); ?>
    123     <?php print($values); ?>
    124     <?php print("</td>"); ?>
    125         <?php endforeach ?>
     116   <?php endforeach ?>
     117   <?php print("<tr>"); ?>
     118     <?php foreach($arreglo['gerente'] as $campo): ?>
     119      <?php print("<td>"); ?>
     120        <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
     121          <?php if (isset($value['email'])): ?>
     122            <?php $values = $value['email']; ?>
     123          <?php else: ?>
     124            <?php $values = $value['value']; ?>
     125          <?php endif; ?>
     126        <?php endforeach ?>
     127        <?php implode(',', $values); ?>
     128        <?php print($values); ?>
     129      <?php print("</td>"); ?>
     130    <?php endforeach ?>
    126131  <?php print("<tr>"); ?>
    127132<?php print("</table>"); ?>
     
    130135<!-- Responsable tecnico -->
    131136<?php print ("<th><h3>Datos del Responsable tecnico</h3></th>"); ?>
    132 <?php print("<table>"); ?>
    133         <?php foreach($arreglo['tecnico'] as $campo): ?>
     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 ?>
     143    <?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): ?>
    134191     <?php print("<th>"); ?>
    135192     <?php print $content->content[$campo]['field']['#title']; ?>
    136193     <?php print("</th>"); ?>
    137         <?php endforeach ?>
    138   <?php print("<tr>"); ?>
    139         <?php foreach($arreglo['tecnico'] as $campo): ?>
     194   <?php endforeach ?>
     195   <?php print("<tr>"); ?>
     196     <?php foreach($arreglo['administrativo'] as $campo): ?>
    140197    <?php print("<td>"); ?>
    141           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    142       <?php $values = $value['value']; ?>
    143           <?php endforeach ?>
    144     <?php implode(',', $values); ?>
    145     <?php print($values); ?>
    146     <?php print("</td>"); ?>
    147         <?php endforeach ?>
    148   <?php print("<tr>"); ?>
    149 <?php print("</table>"); ?>
    150 <!-- end Responsable tecnico -->
    151 
    152 <!-- Responsable registrador -->
    153 <?php print ("<th><h3>Datos del Responsable Registrador</h3></th>"); ?>
    154 <?php print("<table>"); ?>
    155         <?php foreach($arreglo['registrador'] as $campo): ?>
    156      <?php print("<th>"); ?>
    157      <?php print $content->content[$campo]['field']['#title']; ?>
    158      <?php print("</th>"); ?>
    159         <?php endforeach ?>
    160   <?php print("<tr>"); ?>
    161         <?php foreach($arreglo['registrador'] as $campo): ?>
    162     <?php print("<td>"); ?>
    163           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    164       <?php $values = $value['value']; ?>
    165           <?php endforeach ?>
    166     <?php implode(',', $values); ?>
    167     <?php print($values); ?>
    168     <?php print("</td>"); ?>
    169         <?php endforeach ?>
    170   <?php print("<tr>"); ?>
    171 <?php print("</table>"); ?>
    172 <!-- end Responsable registrador -->
    173 
    174 <!-- Responsable administrador -->
    175 <?php print ("<th><h3>Datos del Responsable Administrativo</h3></th>"); ?>
    176 <?php print("<table>"); ?>
    177         <?php foreach($arreglo['administrativo'] as $campo): ?>
    178      <?php print("<th>"); ?>
    179      <?php print $content->content[$campo]['field']['#title']; ?>
    180      <?php print("</th>"); ?>
    181         <?php endforeach ?>
    182   <?php print("<tr>"); ?>
    183         <?php foreach($arreglo['administrativo'] as $campo): ?>
    184     <?php print("<td>"); ?>
    185           <?php foreach($content->content[$campo]['field']['#node']->$campo as $id => $value): ?>
    186       <?php $values = $value['value']; ?>
    187           <?php endforeach ?>
    188     <?php implode(',', $values); ?>
    189     <?php print($values); ?>
    190     <?php print("</td>"); ?>
    191         <?php endforeach ?>
     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 ?>
    192209  <?php print("<tr>"); ?>
    193210<?php print("</table>"); ?>
    194211<!-- end Responsable administrador -->
    195 
     212</fieldset>
    196213<?php
    197214  $pndes = variable_get('proyectos_operativos_muestra_pndes', TRUE);
     
    286303<?php print drupal_render($content->content['field_proyecto_relacion']); ?>
    287304<h3><?php print t('Empleos Generados');?></h3>
    288 <p><?php print t('Nro Estimados de Empleos:'); ?></p>
    289305<?php
    290306  $labels = array(
    291     'field_proyectos_femenino_i' => t('Empleos Directos Nuevos Femeninos'),
    292     'field_proyectos_femenino_d'=> t('Empleos Directos Sostenidos Femeninos'),
    293     'field_proyectos_masculino_d' => t('Empleos Directos Nuevos Masculinos'),
    294     'field_proyectos_masculino_i' => t('Empleos Directos Sostenidos Masculinos'),
    295   );
    296   $arreglo = array(
     307    'field_proyectos_femenino_i' => t('Empleos Femeninos'),
     308    'field_proyectos_femenino_d'=> t('Empleos Masculinos'),
     309    'field_proyectos_masculino_d' => t('Total'),
     310  );
     311  $arreglo1 = array(
     312    'field_proyecto_efdirecto' => 'field_proyecto_efdirecto',
    297313    'field_proyecto_emdirecto' => 'field_proyecto_emdirecto',
    298     'field_proyecto_efdirecto' => 'field_proyecto_efdirecto',
     314  );
     315  $arreglo2 = array(
    299316    'field_proyecto_emindirecto' => 'field_proyecto_emindirecto',
    300317    'field_proyecto_efindirecto' => 'field_proyecto_efindirecto',
     
    307324    $header[] = array('data' => $label, 'align' => 'center');
    308325  }
    309   foreach($arreglo as $campo) {
     326  foreach($arreglo1 as $campo) {
    310327    $valor_d = 0;
    311328    $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d;
    312329    $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    313     $row[] = array('data' => check_plain($valor_m), 'align' => 'center',);
     330    $row[] = array('data' => t('Nuevos: ') . check_plain($valor_m), 'align' => 'left',);
    314331    $sum_fila += $valor;
    315332  }
    316   $header[] = array('data' => t('TOTAL'), 'align' => 'center');
    317333  $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    318   $row[] = array('data' => $valor_m, 'align' => 'center',);
     334  $row[] = array('data' => t('Empleos Nuevos: ') . $valor_m, 'align' => 'left',);
    319335  $rows[] = $row;
    320   print theme('table', $header, $rows, array('border' => '1'));
     336  $row = array();
     337  $sum_fila = 0;
     338  foreach($arreglo2 as $campo) {
     339    $valor_d = 0;
     340    $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d;
     341    $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
     342    $row[] = array('data' => t('Sostenidos: ') . check_plain($valor_m), 'align' => 'left',);
     343    $sum_fila += $valor;
     344  }
     345  $valor_m = $sum_fila ? number_format($sum_fila, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
     346  $row[] = array('data' => t('Empleos Sostenidos: ') . $valor_m, 'align' => 'left',);
     347
     348  $rows[] = $row;
     349
     350  $row = array();
     351  $valor_t1 = $proyecto->field_proyecto_efdirecto[0]['value'] + $proyecto->field_proyecto_emindirecto[0]['value'];
     352  $row[] = array('data' => t('Total de Empleos Directos: ') . number_format($valor_t1, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
     353
     354  $valor_t2 = $proyecto->field_proyecto_emdirecto[0]['value'] + $proyecto->field_proyecto_efindirecto[0]['value'];
     355  $row[] = array('data' => t('Total de Empleos Directos: ') . number_format($valor_t2, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
     356
     357  $valor_t = $valor_t1 + $valor_t2;
     358  $row[]= array('data' =>  t('Empleos Directos: ') . number_format($valor_t, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
     359
     360  $rows[] = $row;
     361  print '<fieldset><legend>Nro Estimados de Empleos</legend>' . theme('table', $header, $rows, array('border' => '1')) . '</fieldset>';
    321362?>
    322363<?php if (variable_get('proyectos_operativos_muestra_beneficiario', TRUE)): ?>
     
    365406        }
    366407        else {
    367             $row[] = array('data' => check_plain($proyecto->{$campo}[$i]['value']), 'align' => 'center',);
     408            $row[] = array('data' => check_plain($proyecto->{$campo}[$i]['value']), 'align' => 'left',);
    368409        }
    369410      }
     
    376417    foreach($arreglo as $campo) {
    377418      if ($campo == 'field_proyecto_beneficiario') {
    378         $row[] = array('data' => t('TOTAL'), 'align' => 'right',);
     419        $row[] = array('data' => t('TOTAL DE BENEFICIARIOS'), 'align' => 'right',);
    379420      }
    380421      else {
     
    447488      $arreglo = array(
    448489        'field_proyecto_so_descripcion' => 'field_proyecto_so_descripcion',
    449         'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',
    450490        'field_proyecto_tiempoi' => 'field_proyecto_tiempoi',
    451491      );
     
    460500  $arreglo = array(
    461501    'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien',
     502    'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',
    462503    'field_proyecto_unidadm' => 'field_proyecto_unidadm',
    463504    'field_proyecto_meta_fisica' => 'field_proyecto_meta_fisica',
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.