[Alba-desarrollo] SVN Alba r5236 - in prosistem/alba/trunk/alba: apps/principal/modules/informes/actions apps/principal/modules/informes/templates apps/principal/templates data/sql web/uploads/informes

commits en pressenter.com.ar commits en pressenter.com.ar
Lun Oct 22 20:38:10 CEST 2007


Author: josx
Date: 2007-10-22 15:38:10 -0300 (Mon, 22 Oct 2007)
New Revision: 5236

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/va=
riablesSuccess.php
   prosistem/alba/trunk/alba/web/uploads/informes/certificado_de_estudios=
.odt
   prosistem/alba/trunk/alba/web/uploads/informes/solicitud_legajo.odt
Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/acti=
ons.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/bu=
squedaAlumnosSuccess.php
   prosistem/alba/trunk/alba/apps/principal/templates/menu.php
   prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
   prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
Log:
Nuevos dos informes: Solicitud de legajos y certificado de estudios

Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actio=
ns/actions.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php	2007-10-22 18:35:12 UTC (rev 5235)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php	2007-10-22 18:38:10 UTC (rev 5236)
@@ -312,7 +312,7 @@
         $establecimiento_id =3D $this->getUser()->getAttribute('fk_estab=
lecimiento_id');
=20
         switch($informe->getTipoInforme()->getNombre()) {
-            case 'alumno': $this->redirect('informes/busquedaAlumnos?id=3D=
'.$informe->getId()); break;
+            case 'Alumnos': $this->redirect('informes/busquedaAlumnos?id=
=3D'.$informe->getId()); break;
             default: $this->redirect('informes/busquedaAlumnos?id=3D'.$i=
nforme->getId());
         }
     }
@@ -321,17 +321,19 @@
=20
     public function executeMostrar() {
         $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
-       =20
+
         $this->forward404Unless($informe);
         $establecimiento_id =3D $this->getUser()->getAttribute('fk_estab=
lecimiento_id');
=20
-/*
-        if($informe->getVariables()) {
+
+        if(count($informe->getVariables())>0 AND $this->getRequestParame=
ter('v')!=3D 1) {
+
+            $this->redirect('informes/variables?id=3D'.$informe->getId()=
.'&alumno_id=3D'.$this->getRequestParameter('alumno_id'));
+
         } else {
-*/
-        $aDato =3D array();
-        switch($informe->getTipoInforme()->getNombre()) {
-            case 'Alumnos':=20
+            $aDato =3D array();
+            switch($informe->getTipoInforme()->getNombre()) {
+                case 'Alumnos':=20
                             $alumno =3D AlumnoPeer::retrieveByPk($this->=
getRequestParameter('alumno_id'));
                             $aDato['alumno'] =3D $alumno->toArray();
=20
@@ -359,9 +361,18 @@
                             $ciclolectivo_id =3D $this->getUser()->getAt=
tribute('fk_ciclolectivo_id');
                             $ciclolectivo =3D CiclolectivoPeer::retrieve=
ByPk($ciclolectivo_id);
                             $aDato['ciclolectivo'] =3D $ciclolectivo->to=
Array();
+
+                            if(count($informe->getVariables())>0) {
+                                $aDato['variable'] =3D array();
+                                $variables =3D explode(";",$informe->get=
Variables());
+                                foreach($variables as $variable) {
+                                    $aDato['variable'] =3D array_merge( =
$aDato['variable'], array ( $variable =3D> $this->getRequestParameter($va=
riable)));
+                                }
+                            }
                             break;
=20
-            default: $this->forward404();
+                default: $this->forward404();
+            }
         }
=20
         $this->reporteTBSOO($informe->getAdjunto()->getRuta(), $informe-=
>getTipoInforme()->getNombre(), $aDato);
@@ -369,8 +380,19 @@
     }
=20
=20
+    public function executeVariables() {
+        $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
+        $this->forward404Unless($informe);
=20
+        $alumno =3D AlumnoPeer::retrieveByPk($this->getRequestParameter(=
'alumno_id'));
+        $this->forward404Unless($alumno);
=20
+        $this->variables =3D explode(";",$informe->getVariables());
+        $this->alumno =3D $alumno;
+        $this->informe =3D $informe;
+    }
+
+
     public function executeBusquedaAlumnos() {
         $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
         $this->forward404Unless($informe);

Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templ=
ates/busquedaAlumnosSuccess.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/b=
usquedaAlumnosSuccess.php	2007-10-22 18:35:12 UTC (rev 5235)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/b=
usquedaAlumnosSuccess.php	2007-10-22 18:38:10 UTC (rev 5236)
@@ -44,7 +44,10 @@
     <td><?php echo $alumno->alumno_apellido." ".$alumno->alumno_nombre; =
?> ( <?php echo $alumno->anio_descripcion?> - <?php echo $alumno->divisio=
n_nombre?> ) </td>
     <td>
     <ul class=3D"sf_admin_td_actions">
-     <li><?php echo link_to(image_tag('/images/small/report_go.png', arr=
ay('alt' =3D> 'editar', 'title' =3D> 'Editar')) , 'informes?action=3Dmost=
rar&alumno_id=3D'.$alumno->alumno_id.'&id=3D'.$informe->getId()); ?></li>
+     <li>
+        <?php echo link_to(image_tag('/images/small/report_go.png', arra=
y('alt' =3D> 'editar', 'title' =3D> 'Editar')) , 'informes?action=3Dmostr=
ar&alumno_id=3D'.$alumno->alumno_id.'&id=3D'.$informe->getId());=20
+        ?>
+    </li>
     </ul>
     </td>
   </tr>

Added: prosistem/alba/trunk/alba/apps/principal/modules/informes/template=
s/variablesSuccess.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/v=
ariablesSuccess.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/v=
ariablesSuccess.php	2007-10-22 18:38:10 UTC (rev 5236)
@@ -0,0 +1,44 @@
+<?php use_helper('I18N'); ?>
+<div id=3D"sf_admin_container">
+<h1>Informe: <?php echo $informe->getNombre(); ?> para <?php echo $alumn=
o->getApellido().", ".$alumno->getNombre();?></h1>
+
+<?php if ($sf_request->hasErrors()) {?>
+<div class=3D"form-errors">
+<h2><?php echo __('There are some errors that prevent the form to valida=
te') ?></h2>
+<ul>
+<?php foreach ($sf_request->getErrorNames() as $name) { ?>
+  <li><?php echo $sf_request->getError($name) ?></li>
+<?php } ?>
+</ul>
+</div>
+<?php } ?>=20
+<?php echo form_tag('informes/mostrar', 'method=3Dget id=3Dsf_admin_edit=
_form name=3Dsf_admin_edit_form multipart=3Dtrue') ?>
+<legend>Debe completar los siguiente datos</legend>
+
+<fieldset id=3D"sf_fieldset_none" class=3D"">
+
+
+
+        <?php=20
+            foreach($variables as $variable) {
+                ?><div class=3D"form-row"><?php
+                echo label_for($variable, __($variable.':'));
+                echo input_tag($variable);
+                ?></div><?php
+            }
+        ?>
+   =20
+</fieldset>
+
+<?php echo input_hidden_tag('alumno_id', $alumno->getId()) ?>
+<?php echo input_hidden_tag('id', $informe->getId()) ?>
+<?php echo input_hidden_tag('v', '1') ?>
+
+ <ul class=3D"sf_admin_actions">
+  <li><?php echo submit_tag(__('Mostrar'), array (
+  'name' =3D> 'Mostrar',
+  'class' =3D> 'sf_admin_action_save',
+)) ?></li>
+</ul>
+</form>
+</div>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/inf=
ormes/templates/variablesSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Modified: prosistem/alba/trunk/alba/apps/principal/templates/menu.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2007-10-2=
2 18:35:12 UTC (rev 5235)
+++ prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2007-10-2=
2 18:38:10 UTC (rev 5236)
@@ -132,12 +132,9 @@
         </li>
 	    <li><span></span><a href=3D"#">Informes y Consultas</a>
             <ul>
-	            <li><span></span><?php echo link_to("Constancia Alumno Regu=
lar","informes/constanciaAlumnoRegularFormulario",'target=3D_blank')?></l=
i>
-	            <li><span></span><?php echo link_to("Constancia Egreso 7mo"=
,"informes/certificadoPrimariaFormulario",'target=3D_blank')?></li>
+                <li><span></span><?php echo link_to("Listado de informes=
","informes")?></li>
 	            <li><span></span><?php echo link_to("Alumnos por divisi&oac=
ute;n","informes/alumnosPorDivisionFormulario",'target=3D_blank')?></li>
 	            <li><span></span><?php echo link_to("Boletines","informes/b=
oletinFormulario","target=3D_blank")?></li>
-	            <li><span></span><?php echo link_to("Certificado de Estudio=
s","informes/certificadoEstudiosBusquedaFormulario","target=3D_blank")?><=
/li>
-	            <li><span></span><?php echo link_to("Solicitud de Legajo","=
informes/solicitudLegajoBusquedaFormulario",'target=3D_blank')?></li>
 	            <li><span></span><?php echo link_to("Biblioteca de contenid=
os","sfMediaLibrary")?></li>
             </ul>
         </li>

Modified: prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql	2007-10-22 18=
:35:12 UTC (rev 5235)
+++ prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql	2007-10-22 18=
:38:10 UTC (rev 5236)
@@ -320,9 +320,16 @@
=20
 INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (2, NULL, NULL, 'certificado_de_t=
erminacion_de_estudios_primarios.odt', 'application/vnd.oasis.opendocumen=
t.text', 'certificado_de_terminacion_de_estudios_primarios.odt', '2007-10=
-17 00:00:00');
=20
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (3, NULL, NULL, 'solicitud_legajo=
.odt', 'application/vnd.oasis.opendocument.text', 'solicitud_legajo.odt',=
 '2007-10-17 00:00:00');
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (4, NULL, NULL, 'certificado_de_e=
studios.odt', 'application/vnd.oasis.opendocument.text', 'certificado_de_=
estudios.odt', '2007-10-17 00:00:00');
+
 INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (1, 'Constancia de Alu=
mno regular', 'Constancia de Alumno regular', 1, 1, 0, '');
=20
 INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (2, 'Certificado de te=
rminacion de estudios primarios', 'Certificado de terminacion de estudios=
 primarios', 2, 1, 0, '');
=20
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (3, 'Solicitud de Lega=
jo', 'Solicitud de Legajo', 3, 1, 0, 'origen');
=20
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (4, 'Certificado de Es=
tudios', 'Certificado de Estudios', 4, 1, 0, 'grado;a=C3=B1o');
+
 SET FOREIGN_KEY_CHECKS =3D 1;

Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2007-10-22 18:35=
:12 UTC (rev 5235)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2007-10-22 18:38=
:10 UTC (rev 5236)
@@ -3459,10 +3459,18 @@
=20
 INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (2, NULL, NULL, 'certificado_de_t=
erminacion_de_estudios_primarios.odt', 'application/vnd.oasis.opendocumen=
t.text', 'certificado_de_terminacion_de_estudios_primarios.odt', '2007-10=
-17 00:00:00');
=20
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (3, NULL, NULL, 'solicitud_legajo=
.odt', 'application/vnd.oasis.opendocument.text', 'solicitud_legajo.odt',=
 '2007-10-17 00:00:00');
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (4, NULL, NULL, 'certificado_de_e=
studios.odt', 'application/vnd.oasis.opendocument.text', 'certificado_de_=
estudios.odt', '2007-10-17 00:00:00');
+
 INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (1, 'Constancia de Alu=
mno regular', 'Constancia de Alumno regular', 1, 1, 0, '');
=20
 INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (2, 'Certificado de te=
rminacion de estudios primarios', 'Certificado de terminacion de estudios=
 primarios', 2, 1, 0, '');
=20
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (3, 'Solicitud de Lega=
jo', 'Solicitud de Legajo', 3, 1, 0, 'origen');
=20
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (4, 'Certificado de Es=
tudios', 'Certificado de Estudios', 4, 1, 0, 'grado;a=C3=B1o');
+
+
 SET FOREIGN_KEY_CHECKS =3D 1;
=20

Added: prosistem/alba/trunk/alba/web/uploads/informes/certificado_de_estu=
dios.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/uploads/informes/certi=
ficado_de_estudios.odt
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/uploads/informes/solicitud_legajo.od=
t
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/uploads/informes/solic=
itud_legajo.odt
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


--=20
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que est=E1 limpio.
For all your IT requirements visit: http://www.transtec.co.uk




Más información sobre la lista de distribución Alba-desarrollo