Author: ftoledo Date: 2009-06-08 18:24:37 -0300 (Mon, 08 Jun 2009) New Revision: 6225 Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/_mostrar.php prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/boletinListadoSuccess.php prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php prosistem/alba/trunk/alba/data/fixtures/00_datos_desde_cero.yml prosistem/alba/trunk/alba/web/css/informes.css Log: fix estilos y dupes de los fixtures Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2009-06-08 21:24:37 UTC (rev 6225) @@ -29,7 +29,7 @@ <h2><?php echo __($sf_user->getFlash('notice')) ?></h2> </div> <?php endif; ?> - <?php if ($sf_request->getParameter('action') == 'edit'): ?> + <?php if ($sf_request->getParameter('action') == 'edit' && !$alumno->isNew()): ?> <?php include_component('alumno', 'verfoto', array('alumno'=>$alumno))?> <?php endif;?> <?php echo form_tag('alumno/edit', 'id=sf_admin_edit_form name=sf_admin_edit_form multipart=true') ?> Modified: prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/_mostrar.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/_mostrar.php 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/_mostrar.php 2009-06-08 21:24:37 UTC (rev 6225) @@ -1,155 +1,97 @@ <?php use_helper("AlbaTools")?> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> - <title>Boletine</title> -</head> -<style> -.etiquetas -{ - color: #000; - font-family: "Trebuchet MS", Arial, Verdana, sans-serif; - font-size: 12px; - font-weight: bold; - text-align: center; -} -</style> -<body> - -<?php if ($sf_user->hasFlash('notice')) { ?> +<?php if ($sf_user->hasFlash('notice')):?> <div class="save-ok"> <h2><?php echo $sf_user->getFlash('notice')?></h2> </div> -<?php } else { ?> +<?php else:?> +<br/> +<div align="center" style="border: 1px solid; padding: 1px;"> + <div align="center" style="font-size: 12px; font-weight: bold; text-transform: uppercase"> + <?php echo $establecimiento->getNombre()?><br> + <?php echo $establecimiento->getDireccion()?> + <?php echo $establecimiento->getCiudad()?> + <?php echo $establecimiento->getCodigoPostal()?> + <?php echo $establecimiento->getTelefono()?> + </div> + <br/>BOLETÍN Ciclo Lectivo + <br/><br/><b>Alumno: <?php echo $alumno->getNombre()." ".$alumno->getApellido()?></b> + <b>Curso: <?php echo ($division->getAnio())?$division->getAnio()->getDescripcion():""?> <?php echo $division->getDescripcion()?> </b> + <br/><br/> + <table style="text-align: left; width: 766px; height: 143px; border-collapse: collapse; border: solid;" border="1" cellpadding="2" cellspacing="2"> + <tbody> + <tr> + <td> </td> + <?php foreach($optionsActividad as $actividad):?> + <td><div><?php echo text2img($actividad);?></div></td> + <?php endforeach;?> -<!-- -<div style="text-align: center;"><?php echo image_tag('small/escudo_bsas_chico.jpg')?></div> -<div style="text-align: center;" class="titulo"> -<span style="font-weight: bold;" class="titulo">GOBIERNO DE LA CIUDAD DE BUENOS AIRES</span><br style="font-weight: bold;"> -<span style="font-weight: bold;" class="titulo">SECRETARíA DE EDUCACION</span><br> -<br> -<span class="subtitulo">Educación General Básica<br>Documento de evaluación</span><br> -</div> + <?php foreach($optionsConcepto as $concepto):?> + <td><div><?php echo text2img($concepto);?></div></td> + <?php endforeach;?> ---> + <?php if(count($aAsistencia)>0): ?> + <?php foreach(current($aAsistencia) as $grupo => $valor):?> + <td><div><?php echo text2img($grupo);?></div></td> + <?php endforeach;?> + <?php endif;?> + </tr> -<div align="center"> -<?php echo $establecimiento->getNombre()?><br> -<?php echo $establecimiento->getDireccion()?> -<?php echo $establecimiento->getCiudad()?> -<?php echo $establecimiento->getCodigoPostal()?> -<?php echo $establecimiento->getTelefono()?> -</div> + <?php foreach($optionsPeriodo as $periodo_id => $periodo):?> + <tr> + <td><div class="etiquetas"><?php echo $periodo?></div></td> + <?php foreach($optionsActividad as $actividad_id => $actividad):?> + <td> + <div style="text-align: center;"><?php echo (array_key_exists($periodo_id, $notaAlumno) AND array_key_exists($actividad_id, $notaAlumno[$periodo_id]))?$notaAlumno[$periodo_id][$actividad_id]:"";?></div> + </td> + <?php endforeach;?> + <?php foreach($optionsConcepto as $concepto_id => $concepto): ?> + <td> + <div style="text-align: center;"><?php echo (array_key_exists($periodo_id, $conceptoAlumno) AND array_key_exists($concepto_id, $conceptoAlumno[$periodo_id]))?$conceptoAlumno[$periodo_id][$concepto_id]:"";?></div> + </td> + <?php endforeach;?> + <?php if(count($aAsistencia)>0): ?> + <?php foreach( $aAsistencia[$periodo_id] as $grupo => $valor): ?> + <td><div style="text-align: center;"><?php echo $valor?></div></td> + <?php endforeach;?> + <?php endif;?> -<br> -<div align="center"> -BOLETÍN Ciclo Lectivo <br><br> -<b>Alumno: <?php echo $alumno->getNombre()." ".$alumno->getApellido()?></b> -<b>Curso: <?php echo ($division->getAnio())?$division->getAnio()->getDescripcion():""?> <?php echo $division->getDescripcion()?> </b> -<!-- - -TURNO: <b> <?php echo ($division->getTurno())?$division->getTurno()->getDescripcion():""?> </b><br> - ---> -<br><br> -<table style="text-align: left; width: 766px; height: 143px; border-collapse: collapse; border: solid;" border="1" cellpadding="2" cellspacing="2"> - <tbody> -<!-- - <tr> - <td colspan="1" rowspan="2"><div class="etiquetas">PERIODO</div></td> - <td colspan="<?php echo $cantOptionsActividad?>" rowspan="1"><div class="etiquetas">AREAS FORMATIVAS</div></td> - <td colspan="<?php echo $cantOptionsConcepto?>" rowspan="1"><div class="etiquetas">APRECIACION PERSONAL</div></td> - <td colspan="<?php echo $cantOptionsAsistencia?>" rowspan="1"><div class="etiquetas">CONTROL DE ASISTENCIAS</div></td> - <td colspan="2" rowspan="1"><div class="etiquetas">FIRMAS</div></td> - </tr> ---> - <tr> -<td></td> - <?php foreach($optionsActividad as $actividad) { ?> - <td><div class="etiquetas"><?php echo text2img($actividad);?></div></td> - <?php } ?> - - <?php foreach($optionsConcepto as $concepto) { ?> - <td><div class="etiquetas"><?php echo text2img($concepto);?></div></td> - <?php } ?> - -<?php - if(count($aAsistencia)>0) { - foreach( current($aAsistencia) as $grupo => $valor) { ?> - <td><div class="etiquetas"><?php echo text2img($grupo);?></div></td> - <?php - } - } ?> -<!-- - <td><div class="etiquetas">Maestro</div></td> - <td><div class="etiquetas">Director</div></td> ---> - </tr> - - - -<?php foreach($optionsPeriodo as $periodo_id => $periodo) { ?> - <tr> - <td><div class="etiquetas"><?php echo $periodo?></div></td> - <?php foreach($optionsActividad as $actividad_id => $actividad) { ?> - <td><div style="text-align: center;"><?php echo (array_key_exists($periodo_id, $notaAlumno) AND array_key_exists($actividad_id, $notaAlumno[$periodo_id]))?$notaAlumno[$periodo_id][$actividad_id]:"";?> - </div></td> - <?php } ?> - <?php foreach($optionsConcepto as $concepto_id => $concepto) { ?> - <td><div style="text-align: center;"><?php echo (array_key_exists($periodo_id, $conceptoAlumno) AND array_key_exists($concepto_id, $conceptoAlumno[$periodo_id]))?$conceptoAlumno[$periodo_id][$concepto_id]:"";?></div></td> - <?php } ?> - -<?php if(count($aAsistencia)>0) { - foreach( $aAsistencia[$periodo_id] as $grupo => $valor) { ?> - <td><div style="text-align: center;"><?php echo $valor?></div></td> - <?php - } - } ?> - - <td><div></div></td> - <td><div></div></td> - </tr> -<?php } ?> + <td> </td> + <td> </td> + </tr> + <?php endforeach;?> </tbody> </table> -<br> -<br> +<br/> +<br/> - <table width="100%"> -<tr> -<td>Observaciones:</td> -<td></td> -<td>Pendientes:</td> -</tr> + <tr> + <td>Observaciones:</td> + <td> </td> + <td>Pendientes:</td> + </tr> -<tr> -<td></td> -<td></td> -<td></td> -</tr> + <tr> + <td> </td> + <td> </td> + <td> </td> + </tr> + <tr> + <td><hr width="100px"/></td> + <td><hr width="100px"/></td> + <td><hr width="100px"/></td> + </tr> - -<tr> -<td><hr width="100px"></td> -<td><hr width="100px"></td> -<td><hr width="100px"></td> -</tr> - - -<tr> -<td align="center"><?php echo $establecimiento->getRector()?>, Rector</td> -<td align="center">Alumno</td> -<td align="center">Padre, Madre o Tutor</td> -</tr> + <tr> + <td align="center"><?php echo $establecimiento->getRector()?>, Rector</td> + <td align="center">Alumno</td> + <td align="center">Padre, Madre o Tutor</td> + </tr> </table> </div> -<br> -<?php } ?> -</body> -</html> +<br/> +<?php endif; ?> Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php 2009-06-08 21:24:37 UTC (rev 6225) @@ -42,14 +42,14 @@ $doc->mergeXmlField('field2', array('id' => 55, 'name' => 'bob')); */ - + // $doc->mergeXmlField('field4', AlumnoPeer::doSelect(new Criteria())); - - - - + + + + // $doc->mergeXmlBlock('block1', AlumnoPeer::doSelectJoinAsistencia = array(); $nbr_col = 10; @@ -59,7 +59,7 @@ for ($col=1;$col<=$nbr_col;$col++) { $columns[$col] = 'column_'.$col; } - + // Creating data $data = array(); for ($row=1;$row<=$nbr_row;$row++) { @@ -68,7 +68,7 @@ $record[$columns[$col]] = $row * $col * 2; } $data[$row] = $record; - } + } $doc->mergeXmlBlock('c0,c1,c2', $columns); $doc->mergeXmlBlock('r', $data); @@ -131,10 +131,10 @@ $realFileName = $this->getRequest()->getFileName('file'); $uniqueFileName = uniqid(rand()) . $ext; $this->getRequest()->moveFile('file', sfConfig::get('sf_informe_dir').'/'.$uniqueFileName); - $adjunto = new Adjunto(); + $adjunto = new Adjunto(); $adjunto->setFecha(date('Y-m-d')); $adjunto->setNombreArchivo($realFileName); - $adjunto->setTipoArchivo($mimetype); + $adjunto->setTipoArchivo($mimetype); $adjunto->setRuta($uniqueFileName); $adjunto->save(); $this->informe->setFkAdjuntoId($adjunto->getId()); @@ -363,7 +363,7 @@ $establecimiento_id = $this->getUser()->getAttribute('fk_establecimiento_id'); switch($informe->getTipoInforme()->getNombre()) { - case 'Alumnos': + case 'Alumnos': if($informe->getListado() != 1) { $this->redirect('informes/busquedaAlumnos?id='.$informe->getId()); break; } else { @@ -374,7 +374,7 @@ $this->redirect('informes/busquedaDocentes?id='.$informe->getId()); break; break; case 'General': - $this->redirect('informes/mostrar?id='.$informe->getId()); + $this->redirect('informes/mostrar?id='.$informe->getId()); break; default: $this->redirect('informes/busquedaAlumnos?id='.$informe->getId()); } @@ -443,7 +443,7 @@ // inicializando variables $optionsDivision = array(); - + // tomando los datos del formulario $division_id = $this->getRequestParameter('division_id'); @@ -468,7 +468,7 @@ // inicializando variables $optionsDivision = array(); - $aAlumno = array(); + $aAlumno = array(); // tomando los datos del formulario $division_id = $this->getRequestParameter('division_id'); @@ -496,7 +496,7 @@ $this->forward404Unless($informe); // inicializando variables - $aDocente = array(); + $aDocente = array(); // tomando los datos del formulario $txt = $this->getRequestParameter('txt'); @@ -579,7 +579,7 @@ * @returns array */ private function leerTemplate($fuente) { - // Saco del template todas las variables del tipo [sssss.rrrrr], tambien las del ciclo y además + // Saco del template todas las variables del tipo [sssss.rrrrr], tambien las del ciclo y además // evitando las variables del tbs con ; $matches = $results = array(); if( preg_match_all("/\[[^];]*[;.][^]]*\]/", $fuente, $matches)) { @@ -589,7 +589,7 @@ $tag = str_replace('[','',$tag); $tag = str_replace(']','',$tag); if (sizeof($aTag =explode('.', $tag)) > 1) { // Breakdown into components - $aTag =explode('.', $tag); + $aTag =explode('.', $tag); $tail = array_pop($aTag); if(strpos($tail, "frm=") !== false) { continue; @@ -640,7 +640,7 @@ } break; - case 'responsable': + case 'responsable': if( array_key_exists('loop', $result) AND $result['loop'] == 1) { $criteria = new Criteria(); if($this->getRequestParameter('fk_cuenta_id')) { @@ -686,7 +686,7 @@ } break; - case 'division': + case 'division': if($this->getRequestParameter('division_id')) { $d = DivisionPeer::retrieveByPK($this->getRequestParameter('division_id')); } else { @@ -698,14 +698,14 @@ $aDato['division'] = $d->toArrayInforme(); break; - case 'establecimiento': + case 'establecimiento': if($this->getUser()->getAttribute('fk_establecimiento_id')) { $establecimiento = EstablecimientoPeer::retrieveByPk($this->getUser()->getAttribute('fk_establecimiento_id')); $aDato['establecimiento'] = $establecimiento->toArrayInforme(); } break; - case 'ciclolectivo': + case 'ciclolectivo': if($this->getUser()->getAttribute('fk_ciclolectivo_id')) { $ciclolectivo_id = $this->getUser()->getAttribute('fk_ciclolectivo_id'); $ciclolectivo = CiclolectivoPeer::retrieveByPk($ciclolectivo_id); @@ -732,7 +732,7 @@ } break; - case 'espacio': + case 'espacio': if( array_key_exists('loop', $result) AND $result['loop'] == 1 AND $this->getUser()->getAttribute('fk_establecimiento_id')) { $c = new Criteria(); $c->add(RelEstablecimientoLocacionPeer::FK_ESTABLECIMIENTO_ID, $this->getUser()->getAttribute('fk_establecimiento_id')); @@ -755,7 +755,7 @@ } break; - case 'organizacion': + case 'organizacion': if($this->getUser()->getAttribute('fk_establecimiento_id')) { $c = new Criteria(); $c->add(EstablecimientoPeer::ID, $this->getUser()->getAttribute('fk_establecimiento_id')); @@ -784,7 +784,7 @@ $aDato['docente'][] = $docente->toArray(); } } else { - + if($this->getRequestParameter('docente_id')) { $docente = DocentePeer::retrieveByPK($this->getRequestParameter('docente_id')); $aDato['docente'] = $docente->toArray(); @@ -793,8 +793,8 @@ break; case 'boletin': - + break; default: } @@ -822,7 +822,7 @@ /** - * Informe: Alumnos por Division + * Informe: Alumnos por Division * */ @@ -873,7 +873,7 @@ } return $aAlumno; - } + } private function _getDocentes($txt = '') { $aDocente = array(); @@ -891,7 +891,7 @@ } */ return $aDocente; - } + } @@ -1003,7 +1003,7 @@ if ($this->getRequest()->getMethod() == sfRequest::POST) { // buscando alumnos - $aAlumno = $this->_getAlumnosPorDivision($division_id, $txt); + $aAlumno = $this->_getAlumnosPorDivision($division_id, $txt); } // asignando variables para ser usadas en el template @@ -1018,7 +1018,8 @@ public function executeBoletinListado() { $this->checks = $this->getRequestParameter('boletin'); - $this->setLayout(false); + $this->setLayout('layout_sinmenu'); + $this->getResponse()->addStyleSheet('impresion', 'last', array('media' =>'print')); } public function executeAyuda() { Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/boletinListadoSuccess.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/boletinListadoSuccess.php 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/boletinListadoSuccess.php 2009-06-08 21:24:37 UTC (rev 6225) @@ -1,12 +1,9 @@ -<?php - $i = 0; - foreach($checks as $alumno_id => $division_id) { - $h = ++$i%2; - include_component('boletin','mostrar', array( 'alumno_id' => $alumno_id, 'division_id' => $division_id)); - if($h == 0) { -?> - <div class="pageBreak"></div> -<? - } - } -?> +<?php $i = 0; ?> +<?php foreach($checks as $alumno_id => $division_id): ?> + <?php $h = ++$i%2; ?> + <?php include_component('boletin','mostrar', array( 'alumno_id' => $alumno_id, 'division_id' => $division_id)); ?> + <hr style="border: 1px dotted #dddddd"/> + <?php if($h == 0): ?> + <p style="page-break-after: always;"/> + <?php endif;?> +<?php endforeach;?> Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php 2009-06-08 21:24:37 UTC (rev 6225) @@ -246,7 +246,7 @@ // return $this->redirect('relAlumnoDivision/edit?id='.$usuarioId); } - +/* public function executeDelete($request) { $aAlumno = $this->getRequest()->getParameterHolder()->get('alumno'); @@ -262,14 +262,15 @@ try { RelAlumnoDivisionPeer::doDelete($c); + return $this->redirect('relAlumnoDivision/list'); } catch (PropelException $e) { $this->getRequest()->setError('delete', 'Could not delete the selected Rel alumno division. Make sure it does not have any associated items.'); // return $this->forward('relAlumnoDivision', 'list'); } -// return $this->redirect('relAlumnoDivision/list'); } + */ public function executeAsignarAlumno(){ $division_id = $this->getRequestParameter('division_id'); $tmp = split('_', $this->getRequestParameter('id', '')); Modified: prosistem/alba/trunk/alba/data/fixtures/00_datos_desde_cero.yml =================================================================== --- prosistem/alba/trunk/alba/data/fixtures/00_datos_desde_cero.yml 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/data/fixtures/00_datos_desde_cero.yml 2009-06-08 21:24:37 UTC (rev 6225) @@ -11,32 +11,20 @@ ciudad: - Pais: Pais_0: - nombre_largo: Nombre Pais - nombre_corto: XXX + nombre_largo: No definido + nombre_corto: No def. orden: 100 Provincia: Provincia_0: - nombre_corto: Prov. - nombre_largo: Provincia + nombre_corto: No def. + nombre_largo: No definido fk_pais_id: Pais_0 orden: 0 Tipoiva: - Tipoiva_1: - nombre: Exento - descripcion: Exento de IVA + Tipoiva_0: + nombre: No definido + descripcion: No definido orden: 0 - Tipoiva_2: - nombre: Responsable Inscripto - descripcion: Responsable inscripto - orden: 0 - Tipoiva_3: - nombre: Monotributo - descripcion: Monotributo - orden: 0 - Tipoiva_4: - nombre: CF - descripcion: Consumidor Final - orden: 0 Niveltipo: Niveltipo_1: nombre: Jardín @@ -60,26 +48,10 @@ nombre: Otros descripcion: Otros Tipodocumento: - Tipodocumento_1: - nombre: DNI - descripcion: Documento Nacional de Identidad + Tipodocumento_0: + nombre: No definido + descripcion: No definido orden: 1 - Tipodocumento_2: - nombre: LC - descripcion: Libreta Cívica - orden: 2 - Tipodocumento_3: - nombre: LE - descripcion: Libreta de enrolamiento - orden: 3 - Tipodocumento_6: - nombre: CI - descripcion: Cédula de Identidad - orden: 0 - Tipodocumento_7: - nombre: Pasaporte - descripcion: Pasaporte - orden: 0 Repeticion: Repeticion_1: descripcion: Semanal @@ -381,7 +353,7 @@ codigo_postal: Tu CP telefono: fk_provincia_id: Provincia_0 - fk_tipoiva_id: Tipoiva_1 + fk_tipoiva_id: Tipoiva_0 Establecimiento: Establecimiento_1: nombre: Nombre de Escuela Modified: prosistem/alba/trunk/alba/web/css/informes.css =================================================================== --- prosistem/alba/trunk/alba/web/css/informes.css 2009-06-08 20:20:47 UTC (rev 6224) +++ prosistem/alba/trunk/alba/web/css/informes.css 2009-06-08 21:24:37 UTC (rev 6225) @@ -20,3 +20,15 @@ font-family: "Trebuchet MS", Arial, Verdana, sans-serif; font-size: 17px; } + +#sfWebDebug { + display : none; +} +.etiquetas +{ + color: #000; + font-family: "Trebuchet MS", Arial, Verdana, sans-serif; + font-size: 12px; + font-weight: bold; + text-align: center; +}