[Alba-desarrollo] SVN Alba r4404 - in prosistem/alba/trunk/alba:
apps/principal/modules/asistencia/actions
apps/principal/modules/division/config
apps/principal/modules/informes/actions config data/sql
lib/model/map lib/model/om
commits en pressenter.com.ar
commits en pressenter.com.ar
Mie Mar 7 21:52:29 CET 2007
Author: josx
Date: 2007-03-07 17:52:24 -0300 (Wed, 07 Mar 2007)
New Revision: 4404
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php
prosistem/alba/trunk/alba/config/schema.xml
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0b_a_1.0rc.sql
prosistem/alba/trunk/alba/data/sql/schema.sql
prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php
Log:
Se sumo el campo orden y el orden en divisiones por ese campo (ticket #168 #161 )
Modified: prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/actions.class.php 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/actions.class.php 2007-03-07 20:52:24 UTC (rev 4404)
@@ -115,15 +115,14 @@
$criteria = new Criteria();
$criteria->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);
+ $criteria->addAscendingOrderByColumn(DivisionPeer::ORDEN);
$divisiones = DivisionPeer::doSelectJoinAnio($criteria); // divisiones a mostrar
foreach ($divisiones as $division) {
$optionsDivision[$division->getId()] = $division->getAnio()->getDescripcion()." ".$division->getDescripcion();
}
- asort($optionsDivision);
-
if ($this->getRequestParameter('division_id')) {
$division_id = $this->getRequestParameter('division_id');
} else {
Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml 2007-03-07 20:52:24 UTC (rev 4404)
@@ -9,13 +9,14 @@
division: { name: División }
fk_turnos_id: { name: Turnos }
descripcion: { name: Descripción }
+ orden: { name: Orden }
edit:
title: Editar División
- display: [ _fk_anio_id, descripcion, _fk_turnos_id ]
+ display: [ _fk_anio_id, descripcion, _fk_turnos_id, orden ]
list:
title: Listado de Divisiones
- display: [ anio, descripcion, turnos ]
+ display: [ anio, descripcion, turnos, orden ]
object_actions:
_edit: -
_delete: -
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 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php 2007-03-07 20:52:24 UTC (rev 4404)
@@ -49,12 +49,12 @@
$optionsDivision = array();
$criteria = new Criteria();
$criteria->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);
+ $criteria->addAscendingOrderByColumn(DivisionPeer::ORDEN);
$divisiones = DivisionPeer::doSelectJoinAnio($criteria);
$optionsDivision[''] = "";
foreach($divisiones as $division) {
$optionsDivision[$division->getId()] = $division->getAnio()->getDescripcion()." ".$division->getDescripcion();
}
- asort($optionsDivision);
return $optionsDivision;
}
Modified: prosistem/alba/trunk/alba/config/schema.xml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.xml 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/config/schema.xml 2007-03-07 20:52:24 UTC (rev 4404)
@@ -514,6 +514,7 @@
<column name="fk_anio_id" type="integer" size="11" required="true" default="0"/>
<column name="descripcion" type="varchar" size="255" required="true" default=""/>
<column name="fk_turnos_id" type="integer" size="11" required="true" default="0"/>
+ <column name="orden" type="INTEGER" required="false" default="0"/>
<foreign-key foreignTable="anio">
<reference local="fk_anio_id" foreign="id"/>
</foreign-key>
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0b_a_1.0rc.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0b_a_1.0rc.sql 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0b_a_1.0rc.sql 2007-03-07 20:52:24 UTC (rev 4404)
@@ -109,5 +109,7 @@
ADD `fk_pais_id` INT NOT NULL AFTER `lugar_nacimiento` ;
ALTER TABLE `alumno` CHANGE `fk_conceptobaja_id` `fk_conceptobaja_id` INT NULL;
+ALTER TABLE `division` ADD `orden` INT NOT NULL DEFAULT '0';
+
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/data/sql/schema.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/schema.sql 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/data/sql/schema.sql 2007-03-07 20:52:24 UTC (rev 4404)
@@ -994,6 +994,7 @@
`fk_anio_id` INTEGER(11) default 0 NOT NULL,
`descripcion` VARCHAR(255) default '' NOT NULL,
`fk_turnos_id` INTEGER(11) default 0 NOT NULL,
+ `orden` INTEGER default 0,
PRIMARY KEY (`id`),
INDEX `division_FI_1` (`fk_anio_id`),
CONSTRAINT `division_FK_1`
Modified: prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php 2007-03-07 20:52:24 UTC (rev 4404)
@@ -39,6 +39,8 @@
$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addForeignKey('FK_TURNOS_ID', 'FkTurnosId', 'int', CreoleTypes::INTEGER, 'turnos', 'ID', true, 11);
+
+ $tMap->addColumn('ORDEN', 'Orden', 'int', CreoleTypes::INTEGER, false);
}
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php 2007-03-07 20:52:24 UTC (rev 4404)
@@ -23,7 +23,11 @@
protected $fk_turnos_id = 0;
+
+ protected $orden = 0;
+
+
protected $aAnio;
@@ -76,6 +80,13 @@
}
+ public function getOrden()
+ {
+
+ return $this->orden;
+ }
+
+
public function setId($v)
{
@@ -124,6 +135,16 @@
}
+ public function setOrden($v)
+ {
+
+ if ($this->orden !== $v || $v === 0) {
+ $this->orden = $v;
+ $this->modifiedColumns[] = DivisionPeer::ORDEN;
+ }
+
+ }
+
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
@@ -136,11 +157,13 @@
$this->fk_turnos_id = $rs->getInt($startcol + 3);
+ $this->orden = $rs->getInt($startcol + 4);
+
$this->resetModified();
$this->setNew(false);
- return $startcol + 4;
+ return $startcol + 5;
} catch (Exception $e) {
throw new PropelException("Error populating Division object", $e);
}
@@ -341,6 +364,9 @@
case 3:
return $this->getFkTurnosId();
break;
+ case 4:
+ return $this->getOrden();
+ break;
default:
return null;
break;
@@ -355,6 +381,7 @@
$keys[1] => $this->getFkAnioId(),
$keys[2] => $this->getDescripcion(),
$keys[3] => $this->getFkTurnosId(),
+ $keys[4] => $this->getOrden(),
);
return $result;
}
@@ -382,6 +409,9 @@
case 3:
$this->setFkTurnosId($value);
break;
+ case 4:
+ $this->setOrden($value);
+ break;
} }
@@ -393,6 +423,7 @@
if (array_key_exists($keys[1], $arr)) $this->setFkAnioId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDescripcion($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setFkTurnosId($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setOrden($arr[$keys[4]]);
}
@@ -404,6 +435,7 @@
if ($this->isColumnModified(DivisionPeer::FK_ANIO_ID)) $criteria->add(DivisionPeer::FK_ANIO_ID, $this->fk_anio_id);
if ($this->isColumnModified(DivisionPeer::DESCRIPCION)) $criteria->add(DivisionPeer::DESCRIPCION, $this->descripcion);
if ($this->isColumnModified(DivisionPeer::FK_TURNOS_ID)) $criteria->add(DivisionPeer::FK_TURNOS_ID, $this->fk_turnos_id);
+ if ($this->isColumnModified(DivisionPeer::ORDEN)) $criteria->add(DivisionPeer::ORDEN, $this->orden);
return $criteria;
}
@@ -440,7 +472,9 @@
$copyObj->setFkTurnosId($this->fk_turnos_id);
+ $copyObj->setOrden($this->orden);
+
if ($deepCopy) {
$copyObj->setNew(false);
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php 2007-03-07 20:34:09 UTC (rev 4403)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php 2007-03-07 20:52:24 UTC (rev 4404)
@@ -13,7 +13,7 @@
const CLASS_DEFAULT = 'lib.model.Division';
- const NUM_COLUMNS = 4;
+ const NUM_COLUMNS = 5;
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -32,23 +32,26 @@
const FK_TURNOS_ID = 'division.FK_TURNOS_ID';
+ const ORDEN = 'division.ORDEN';
+
+
private static $phpNameMap = null;
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'Descripcion', 'FkTurnosId', ),
- BasePeer::TYPE_COLNAME => array (DivisionPeer::ID, DivisionPeer::FK_ANIO_ID, DivisionPeer::DESCRIPCION, DivisionPeer::FK_TURNOS_ID, ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'descripcion', 'fk_turnos_id', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+ BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'Descripcion', 'FkTurnosId', 'Orden', ),
+ BasePeer::TYPE_COLNAME => array (DivisionPeer::ID, DivisionPeer::FK_ANIO_ID, DivisionPeer::DESCRIPCION, DivisionPeer::FK_TURNOS_ID, DivisionPeer::ORDEN, ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'descripcion', 'fk_turnos_id', 'orden', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'Descripcion' => 2, 'FkTurnosId' => 3, ),
- BasePeer::TYPE_COLNAME => array (DivisionPeer::ID => 0, DivisionPeer::FK_ANIO_ID => 1, DivisionPeer::DESCRIPCION => 2, DivisionPeer::FK_TURNOS_ID => 3, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'descripcion' => 2, 'fk_turnos_id' => 3, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+ BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'Descripcion' => 2, 'FkTurnosId' => 3, 'Orden' => 4, ),
+ BasePeer::TYPE_COLNAME => array (DivisionPeer::ID => 0, DivisionPeer::FK_ANIO_ID => 1, DivisionPeer::DESCRIPCION => 2, DivisionPeer::FK_TURNOS_ID => 3, DivisionPeer::ORDEN => 4, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'descripcion' => 2, 'fk_turnos_id' => 3, 'orden' => 4, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
@@ -110,6 +113,8 @@
$criteria->addSelectColumn(DivisionPeer::FK_TURNOS_ID);
+ $criteria->addSelectColumn(DivisionPeer::ORDEN);
+
}
const COUNT = 'COUNT(division.ID)';
Más información sobre la lista de distribución Alba-desarrollo