Ignorar:
Fecha y hora:
12/07/2016 11:41:18 (hace 8 años)
Autor:
lhernandez <lhernandez@…>
Branches:
stable, version-3.0
Children:
967f149
Parents:
19518f55
Mensaje:

se actualizo 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

    rc133e30 r5d18ac9  
    117117       <?php print("</th>"); ?>
    118118     <?php endforeach ?>
    119      <?php print("<tr>"); ?>
     119     <?php print("<tr class='odd'>"); ?>
    120120       <?php foreach($arreglo['gerente'] as $campo): ?>
    121121        <?php print("<td>"); ?>
     
    142142        <?php print("</th>"); ?>
    143143      <?php endforeach ?>
    144       <?php print("<tr>"); ?>
     144      <?php print("<tr class='odd'>"); ?>
    145145        <?php foreach($arreglo['tecnico'] as $campo): ?>
    146146          <?php print("<td>"); ?>
     
    167167        <?php print("</th>"); ?>
    168168      <?php endforeach ?>
    169       <?php print("<tr>"); ?>
     169      <?php print("<tr class='odd'>"); ?>
    170170        <?php foreach($arreglo['registrador'] as $campo): ?>
    171171         <?php print("<td>"); ?>
     
    192192       <?php print("</th>"); ?>
    193193     <?php endforeach ?>
    194      <?php print("<tr>"); ?>
     194     <?php print("<tr class='odd'>"); ?>
    195195       <?php foreach($arreglo['administrativo'] as $campo): ?>
    196196         <?php print("<td>"); ?>
     
    328328    $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d;
    329329    $valor_m = $valor ? number_format($valor, 0, $format_number['dec_point'], $format_number['thousands_sep']) : 0;
    330     $row[] = array('data' => t('Nuevos: ') . check_plain($valor_m), 'align' => 'left',);
     330    $row[] = array('data' => t('Directos Nuevos: ') . check_plain($valor_m), 'align' => 'left',);
    331331    $sum_fila += $valor;
    332332  }
     
    340340    $valor = isset($proyecto->{$campo}[0]['value']) ? $proyecto->{$campo}[0]['value'] : $valor_d;
    341341    $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',);
     342    $row[] = array('data' => t('Directos Sostenidos: ') . check_plain($valor_m), 'align' => 'left',);
    343343    $sum_fila += $valor;
    344344  }
     
    350350  $row = array();
    351351  $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',);
     352  $row[] = array('data' => t('Total de Empleos Directos Femeninos: ') . number_format($valor_t1, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
    353353
    354354  $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',);
     355  $row[] = array('data' => t('Total de Empleos Directos Masculinos: ') . number_format($valor_t2, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
    356356
    357357  $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',);
     358  $row[]= array('data' =>  t('Total de Empleos Directos: ') . number_format($valor_t, 0, $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'left',);
    359359
    360360  $rows[] = $row;
     
    522522        'field_balanc_anho' => 'Año',
    523523      );
    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']);
     524      $header = '';
     525      $element = array();
     526      foreach ($arreglo['servicios'] as $field_id => $label) {
     527        if (isset($proyecto->{$field_id})) {
     528          foreach ($proyecto->{$field_id} as $key => $field) {
     529            $field = content_fields($field_id);
     530            $value = check_plain($proyecto->{$field_id}[$key]['value']);
    532531            if ($options = optionwidgets_options($field)) {
    533               $value = $options[$proyecto->{$field_id}[$i]['value']];
     532              $value = $options[$proyecto->{$field_id}[$key]['value']];
    534533            }
    535             $row[] = array('data' => $value, 'align' => 'left',);
     534            $element[$key] .= '<td>' . $value . '</td>';
    536535          }
     536          $header .= '<th>' . $label . '</th>';
    537537        }
    538         $rows[] = $row;
    539       }
    540 
    541       print theme('table', $header, $rows, array('border' => '1'));
     538      }
     539      if (count($element)) {
     540        $output = '<table>';
     541        $output .= '<tr>'. $header . '</tr>';
     542        foreach ($element as $value) {
     543          $output .= '<tr class="odd">';
     544          $output .= $value;
     545          $output .= '</tr>';
     546        }
     547        $output .= '</table>';
     548        print $output;
     549      }
    542550    ?>
    543551  </fieldset>
     
    555563        'field_progrmcn_anual_anho' => 'Año',
    556564      );
    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
     566      $header = '';
     567      $element = array();
     568      foreach ($arreglo['programacion'] as $field_id => $label) {
     569        if (isset($proyecto->{$field_id})) {
     570          foreach ($proyecto->{$field_id} as $key => $field) {
     571            $field = content_fields($field_id);
     572            $value = check_plain($proyecto->{$field_id}[$key]['value']);
    565573            if ($options = optionwidgets_options($field)) {
    566               $value = $options[$proyecto->{$field_id}[$i]['value']];
     574              $value = $options[$proyecto->{$field_id}[$key]['value']];
    567575            }
    568             $row[] = array('data' => $value, 'align' => 'left',);
     576            $element[$key] .= '<td>' . $value . '</td>';
    569577          }
     578          $header .= '<th>' . $label . '</th>';
    570579        }
    571         $rows[] = $row;
    572       }
    573       print theme('table', $header, $rows, array('border' => '1'));
     580      }
     581      if (count($element)) {
     582        $output = '<table>';
     583        $output .= '<tr>'. $header . '</tr>';
     584        foreach ($element as $value) {
     585          $output .= '<tr class="odd">';
     586          $output .= $value;
     587          $output .= '</tr>';
     588        }
     589        $output .= '</table>';
     590        print $output;
     591      }
    574592    ?>
    575593  </fieldset>
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.