/JEF/sites/all/themes/unicauca_vice/unicauca_vice/print--pdf--node--acta.tpl.php
PHP | 340 lines | 304 code | 26 blank | 10 comment | 6 complexity | 0b1ccd83861c265e6f4289efee0c8412 MD5 | raw file
Possible License(s): AGPL-3.0, AGPL-1.0, LGPL-2.1, LGPL-3.0, GPL-3.0, GPL-2.0
- <?php
- $node = $print['node'];
- function variables($nomCampo, $node){
- $arrFormApi = field_view_field('node', $node, $nomCampo);
- $arrFormApi['#label_display'] = 'hidden';
- return render($arrFormApi);
- }
-
- function usuarios($nomCampo, $node){
- $arrFormApi = field_view_field('user', $node, $nomCampo);
- $arrFormApi['#label_display'] = 'hidden';
- return render($arrFormApi);
- }
- $i = 1;
- $x = 1;
- $y = 1;
- $z = 1;
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $print['language']; ?>" xml:lang="<?php print $print['language']; ?>">
- <head>
- <?php print $print['head']; ?>
- <?php print $print['base_href']; ?>
- <title><?php //print $print['title']; ?></title>
- <?php print $print['scripts']; ?>
- <?php print $print['sendtoprinter']; ?>
- <?php print $print['robots_meta']; ?>
- <?php print $print['favicon']; ?>
- <?php print $print['css']; ?>
- </head>
- <body >
- <?php
- $ciudad = variables('field_crear_acta_ciudad',$node);
- $fecha = variables('field_crear_acta_fecha',$node);
- $horainicio = variables('field_hora_inicio',$node);
- $horafin = variables('field_hora_fin',$node);
- $lugar = variables('field_crear_lugar_desarrollo',$node);
- $observaciones = variables('field_observaciones',$node);
- //$dpto = variables('field_acta_departamento', $node);
- $arrFormApi = field_view_field('node', $node, 'field_acta_departamento');
- $dpto = $arrFormApi[0]["#title"];
-
- $arreglo = explode(',', $fecha);
- $var1 = $arreglo[0];
- $var2 = $arreglo[1];
- $aux = explode(' ',$var2);
-
- //$arrFormApi = field_view_field('node', $node, 'field_acta_departamento');
- //echo $arrFormApi[0]["#title"];
-
- ?>
-
- <div><table border="1">
- <tr height="30%">
- <td width="30%" align="center"><?php print $print['logo']; ?> </td>
- <td width="70%" align="center" valign="middle">
- <tr>
- <td></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- <tr>
- <td><h3>UNIVERSIDAD DEL CAUCA</h3></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- <tr>
- <td><h3>Acta para Reuniones</h3></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- </td>
- </tr>
- </table>
- </div>
- <div>
- <table border="1">
- <tr height="30%">
- <td width="12%"><strong>Ciudad</strong></td>
- <td width="18%"><?php print $ciudad; ?></td>
- <td width="35%"><strong>Dependencia(s) responsable(s) de la reunión</strong></td>
- <td width="35%"><?php echo "Departamento de ".$dpto;
- ?></td>
- </tr>
- <tr>
- <td rowspan="2" valign="middle" width="12% "><strong>Fecha</strong></td>
- <td width="6%"><?php print $aux[1]; ?></td>
- <td width="6%"><?php print $aux[2]; ?></td>
- <td width="6%"><?php echo $aux[3][0];echo $aux[3][1];echo $aux[3][2];echo $aux[3][3];?></td>
- <td width="12%"><strong>Hora Inicio</strong></td>
- <td width="12%"><strong>Hora Finalización</strong></td>
- <td width="28%"><strong>Lugar de desarrollo</strong></td>
- <td width="18%"><strong>ACTA No</strong></td>
- </tr>
- <tr>
- <td width="6%"><strong>Dia</strong></td>
- <td width="6%"><strong>Mes</strong></td>
- <td width="6%"><strong>Año</strong></td>
- <td width="12%"><?php print $horainicio ?></td>
- <td width="12%"><?php print $horafin ?></td>
- <td width="28%"><?php print $lugar ?></td>
- <td width="18%"><?php print $print['title'] ?></td>
- </tr>
- </table>
- </div>
-
- <table><tr><td width=100%><h4>ORDEN DEL DÍA:</h4></td></tr>
- <tr><td width="5%"></td><td width="95%"><h4>1. Verificación de Asistencia</h4></td></tr>
- <tr><td width="5%"></td><td width="95%"><h4>2. Lectura de acta anterior SI <input type="radio" name="option" value="Milk"> NO <input type="radio" name="option" value="Milk"></h4></td></tr>
- <tr><td width="5%"></td><td width="95%"><h4>3. Temas a tratar</h4></td></tr>
- <tr><td></td></tr>
- <table>
-
- <div>
- <table border="1">
- <tr>
- <td width="5%"><strong>No</strong></td>
- <td width="95%" align="center"><strong>Tema</strong></td>
- </tr>
- <?php
- $wrapper = entity_metadata_wrapper('node', $node);
- $formtype = field_get_items('node', $node, 'field_crear_temas_reunion');
- foreach($formtype as $itemid) {
- ?>
- <tr>
- <td width="5%"><?php print $x++ ?></td>
- <?php $item = field_collection_field_get_entity($itemid); ?>
- <td width="95%">
- <?php
- print ' '.$item->field_tema['und'][0]['safe_value'];
- //print $item->field_desarrollo_reunion['und'][0]['safe_value'];
- ?>
- </td>
- </tr>
- <?php
- }
- ?>
- <tr>
- <td width="5%">
- <?php print $x;?>
- </td>
- <td width="95%">
- Varios
- </td>
- </tr>
- </table>
- </div>
-
- <h4><strong>Desarrollo de la reunion:</strong></h4>
- <div>
- <table border="1">
- <?php
- $wrapper = entity_metadata_wrapper('node', $node);
- $formtype = field_get_items('node', $node, 'field_crear_temas_reunion');
- foreach($formtype as $itemid) {
- ?>
- <tr>
- <td><?php
- $item = field_collection_field_get_entity($itemid);
- ?><strong><?php print $i++.". ".$item->field_tema['und'][0]['safe_value'];?></strong>
- <?php $var = $item->field_desarrollo_reunion['und'][0]['safe_value'];
- print $var;
- ?>
- </td>
- </tr>
-
- <?php }
- $wrapper1 = entity_metadata_wrapper('node', $node);
- $formtype1 = field_get_items('node', $node, 'field_acta_varios_docente');
- echo "<tr><td>";
- echo "<strong>".$i.". ".'VARIOS'."</strong>";
- echo "<br/>";
- if (is_array($formtype1)) {
- foreach($formtype1 as $itemid1) {
- ?>
- <?php
- $item1 = field_collection_field_get_entity($itemid1);
-
- $user=user_load($item1->field_user_docente['und'][0]['target_id']);
- $arrFormApi = field_view_field('user',$user,'field_user_nombre');
- $arrFormApi['#label_display'] = 'hidden';
- $nombre= drupal_render($arrFormApi);
- ?><?php print 'Varios del profesor(a): '.$nombre;?>
- <?php $var = $item1->field_user_desarrollo['und'][0]['safe_value'];
- print "- ".$var;
- ?>
- <br/><br/>
-
- <?php
- }
- }
- echo "</td></tr>";
- ?>
-
-
- </table>
- </div>
-
- <h4><strong>ASISTENTES</strong></h4>
- <div>
- <table border="1">
- <tr>
- <td width="5%"><strong>No.</strong></td>
- <td width="35%" align="center"><strong>Nombre y Apellido</strong></td>
- <td width="34%" align="center"><strong>Cargo y Dependencia</strong></td>
- <td width="26%" align="center"><strong>Firma</strong></td>
- </tr>
-
-
- <?php
- $fieldAsistentes = $node->field_asistentes;
- $arrFieldAsistentes = $fieldAsistentes['und'];
-
- /*echo "<pre>";
- var_dump($fieldAsistentes);
- echo "</pre>";*/
-
- $arrAsistentes = array();
-
- foreach ($arrFieldAsistentes as $fieldAsistente) {
- ?>
- <tr>
- <td><?php print $y++ ?></td>
- <td>
- <?php
- $userid=$fieldAsistente['target_id'];
- $user=user_load($userid);
- $arrFormApi = field_view_field('user',$user,'field_user_nombre');
- $arrFormApi['#label_display'] = 'hidden';
- $nombre= drupal_render($arrFormApi);
- print ' '.$nombre;
- ?>
- </td>
- <td><?php
- $arrFormApi = field_view_field('user',$user,'field_user_cargo');
- $arrFormApi['#label_display'] = 'hidden';
- $cargo= drupal_render($arrFormApi);
- $auxiliar2 = $arrFormApi[0]["#title"];
- print ' '.$auxiliar2.'- '.$dpto;
- ?></td>
- <td></td>
- </tr>
- <?php
- }
- //var_dump($arrAsistentes);
-
- //print $arrAsistentes[0];
- ?>
-
- </table>
- </div>
- <h4><strong>COMPROMISOS</strong></h4>
- <div>
- <table border="1">
- <tr>
- <td width="5%"><strong>No.</strong></td>
- <td width="30%" align="center"><strong>Compromiso</strong></td>
- <td width="25%" align="center"><strong>Responsable</strong></td>
- <td width="20%" align="center"><strong>Fecha de Compromiso</strong></td>
- <td width="20%" align="center"><strong>Fecha de Realización</strong></td>
- </tr>
- <?php
- $wrapper1 = entity_metadata_wrapper('node', $node);
- //var_dump($wrapper);
- $formtype1 = field_get_items('node', $node, 'field_compromisos');
- if (is_array($formtype1)) {
- foreach($formtype1 as $itemid1) {
- ?>
- <tr>
- <td width="5%"><?php print $z++ ?></td>
- <?php $item1 = field_collection_field_get_entity($itemid1); ?>
- <td width="30%">
- <?php
- $cont=0;
- $compromiso=$item1->field_compromiso['und'][0]['safe_value'];
- $responsable=$item1->field_responsable['und'][0]['safe_value'];
- $fecha_compromiso=$item1->field_fecha_compromiso['und'][0]['value'];
- $fecha_realizacion=$item1->field_fecha_realizacion['und'][0]['value'];
- print $compromiso;
- ?>
- </td>
- <td width="25%">
- <?php
- print $responsable;
- ?>
- </td>
- <td width="20%">
- <?php
- if($compromiso!=" "){
- for($i=0;$i<10;$i++){
- print $fecha_compromiso[$i];
- }
- }
-
- ?>
- </td>
- <td width="20%">
- <?php
- if($compromiso!=" "){
- for($i=0;$i<10;$i++){
- print $fecha_realizacion[$i];
- }
- }
- ?>
- </td>
- </tr>
- <?php
- }
- }
- ?>
- <pre>
- <?php
- ?>
- </pre>
-
- </table>
- </div>
- <pre>
- </pre>
- <h4><strong>OBSERVACIONES</strong></h4>
- <div>
- <table border="1">
- <tr>
- <td><?php print $observaciones ?></td>
- </tr>
- </table>
- </div>
-
- <div class="print-site_name"><?php //print $print['site_name']; ?></div>
- <div class="print-footer"><?php print $print['footer_message']; ?></div>
-
- </body>
- </html>