[Alba-desarrollo] SVN Alba r4256 - in
prosistem/alba/trunk/alba/apps/principal/modules:
alumno/templates relAlumnoDivision/actions
commits en pressenter.com.ar
commits en pressenter.com.ar
Mie Feb 21 16:08:15 CET 2007
Author: ftoledo
Date: 2007-02-21 12:08:12 -0300 (Wed, 21 Feb 2007)
New Revision: 4256
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php
prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php
Log:
filtro x alumnos x establecimiento
comprobacion de la cuenta para autocompletar los datos
Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2007-02-21 14:58:05 UTC (rev 4255)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2007-02-21 15:08:12 UTC (rev 4256)
@@ -1,5 +1,5 @@
<?php
- if($datosCuenta) {
+ if(isset($datosCuenta)) {
?>
<script type="text/javascript">
function completaDatos()
@@ -197,7 +197,7 @@
<h2><?php echo __('Donde vive') ?></h2>
<br>
<?php
- if($datosCuenta) {
+ if(isset($datosCuenta)) {
echo button_to("Cargar datos de la cuenta", "#", array("class" => "sf_admin_action_sava", "onClick" => "javascript:completaDatos()"));
}
?>
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 2007-02-21 14:58:05 UTC (rev 4255)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/actions/actions.class.php 2007-02-21 15:08:12 UTC (rev 4256)
@@ -36,6 +36,31 @@
public function preExecute() {
$this->vista = $this->getRequestParameter('vista');
}
+ protected function addFiltersCriteria (&$c)
+ {
+ $c->add(AlumnoPeer::FK_ESTABLECIMIENTO_ID,$this->getUser()->getAttribute('fk_establecimiento_id'));
+ $c->addJoin(AlumnoPeer::ID,RelAlumnoDivisionPeer::FK_ALUMNO_ID);
+ if (isset($this->filters['fk_alumno_id_is_empty']))
+ {
+ $criterion = $c->getNewCriterion(RelAlumnoDivisionPeer::FK_ALUMNO_ID, '');
+ $criterion->addOr($c->getNewCriterion(RelAlumnoDivisionPeer::FK_ALUMNO_ID, null, Criteria::ISNULL));
+ $c->add($criterion);
+ }
+ else if (isset($this->filters['fk_alumno_id']) && $this->filters['fk_alumno_id'] !== '')
+ {
+ $c->add(RelAlumnoDivisionPeer::FK_ALUMNO_ID, $this->filters['fk_alumno_id']);
+ }
+ if (isset($this->filters['fk_division_id_is_empty']))
+ {
+ $criterion = $c->getNewCriterion(RelAlumnoDivisionPeer::FK_DIVISION_ID, '');
+ $criterion->addOr($c->getNewCriterion(RelAlumnoDivisionPeer::FK_DIVISION_ID, null, Criteria::ISNULL));
+ $c->add($criterion);
+ }
+ else if (isset($this->filters['fk_division_id']) && $this->filters['fk_division_id'] !== '')
+ {
+ $c->add(RelAlumnoDivisionPeer::FK_DIVISION_ID, $this->filters['fk_division_id']);
+ }
+ }
+
}
-
-?>
\ No newline at end of file
+?>
Más información sobre la lista de distribución Alba-desarrollo