Alba-desarrollo
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
April 2007
- 2 participants
- 97 discussions
SVN Alba r4593 - in prosistem/alba/trunk/alba/lib/model: map om
by commits@pressenter.com.ar 30 Apr '07
by commits@pressenter.com.ar 30 Apr '07
30 Apr '07
Author: hsanchez
Date: 2007-04-30 16:42:54 -0300 (Mon, 30 Apr 2007)
New Revision: 4593
Modified:
prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseCuenta.php
prosistem/alba/trunk/alba/lib/model/om/BaseProvincia.php
prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php
prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php
prosistem/alba/trunk/alba/lib/model/om/BaseTipodocumento.php
Log:
Agregando el campo relacion al responsable, genere el nuevo modelo
Modified: prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -65,6 +65,8 @@
$tMap->addColumn('AUTORIZACION_RETIRO', 'AutorizacionRetiro', 'boolean', CreoleTypes::BOOLEAN, true);
$tMap->addForeignKey('FK_CUENTA_ID', 'FkCuentaId', 'int', CreoleTypes::INTEGER, 'cuenta', 'ID', true, null);
+
+ $tMap->addForeignKey('FK_ROLRESPONSABLE_ID', 'FkRolresponsableId', 'int', CreoleTypes::INTEGER, 'rol_responsable', 'ID', true, null);
}
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseCuenta.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseCuenta.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseCuenta.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -1126,4 +1126,39 @@
return $this->collResponsables;
}
+
+
+ public function getResponsablesJoinRolResponsable($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_CUENTA_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_CUENTA_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseProvincia.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseProvincia.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseProvincia.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -1325,7 +1325,42 @@
return $this->collResponsables;
}
+
+ public function getResponsablesJoinRolResponsable($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_PROVINCIA_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_PROVINCIA_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
+
public function initDocentes()
{
if ($this->collDocentes === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -75,7 +75,11 @@
protected $fk_cuenta_id = 0;
+
+ protected $fk_rolresponsable_id = 1;
+
+
protected $aCuenta;
@@ -85,6 +89,9 @@
protected $aTipodocumento;
+ protected $aRolResponsable;
+
+
protected $collRelRolresponsableResponsables;
@@ -216,6 +223,13 @@
}
+ public function getFkRolresponsableId()
+ {
+
+ return $this->fk_rolresponsable_id;
+ }
+
+
public function setId($v)
{
@@ -398,6 +412,20 @@
}
+ public function setFkRolresponsableId($v)
+ {
+
+ if ($this->fk_rolresponsable_id !== $v || $v === 1) {
+ $this->fk_rolresponsable_id = $v;
+ $this->modifiedColumns[] = ResponsablePeer::FK_ROLRESPONSABLE_ID;
+ }
+
+ if ($this->aRolResponsable !== null && $this->aRolResponsable->getId() !== $v) {
+ $this->aRolResponsable = null;
+ }
+
+ }
+
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
@@ -436,11 +464,13 @@
$this->fk_cuenta_id = $rs->getInt($startcol + 16);
+ $this->fk_rolresponsable_id = $rs->getInt($startcol + 17);
+
$this->resetModified();
$this->setNew(false);
- return $startcol + 17;
+ return $startcol + 18;
} catch (Exception $e) {
throw new PropelException("Error populating Responsable object", $e);
}
@@ -519,7 +549,14 @@
$this->setTipodocumento($this->aTipodocumento);
}
+ if ($this->aRolResponsable !== null) {
+ if ($this->aRolResponsable->isModified()) {
+ $affectedRows += $this->aRolResponsable->save($con);
+ }
+ $this->setRolResponsable($this->aRolResponsable);
+ }
+
if ($this->isModified()) {
if ($this->isNew()) {
$pk = ResponsablePeer::doInsert($this, $con);
@@ -594,7 +631,13 @@
}
}
+ if ($this->aRolResponsable !== null) {
+ if (!$this->aRolResponsable->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aRolResponsable->getValidationFailures());
+ }
+ }
+
if (($retval = ResponsablePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -677,6 +720,9 @@
case 16:
return $this->getFkCuentaId();
break;
+ case 17:
+ return $this->getFkRolresponsableId();
+ break;
default:
return null;
break;
@@ -704,6 +750,7 @@
$keys[14] => $this->getObservacion(),
$keys[15] => $this->getAutorizacionRetiro(),
$keys[16] => $this->getFkCuentaId(),
+ $keys[17] => $this->getFkRolresponsableId(),
);
return $result;
}
@@ -770,6 +817,9 @@
case 16:
$this->setFkCuentaId($value);
break;
+ case 17:
+ $this->setFkRolresponsableId($value);
+ break;
} }
@@ -794,6 +844,7 @@
if (array_key_exists($keys[14], $arr)) $this->setObservacion($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setAutorizacionRetiro($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setFkCuentaId($arr[$keys[16]]);
+ if (array_key_exists($keys[17], $arr)) $this->setFkRolresponsableId($arr[$keys[17]]);
}
@@ -818,6 +869,7 @@
if ($this->isColumnModified(ResponsablePeer::OBSERVACION)) $criteria->add(ResponsablePeer::OBSERVACION, $this->observacion);
if ($this->isColumnModified(ResponsablePeer::AUTORIZACION_RETIRO)) $criteria->add(ResponsablePeer::AUTORIZACION_RETIRO, $this->autorizacion_retiro);
if ($this->isColumnModified(ResponsablePeer::FK_CUENTA_ID)) $criteria->add(ResponsablePeer::FK_CUENTA_ID, $this->fk_cuenta_id);
+ if ($this->isColumnModified(ResponsablePeer::FK_ROLRESPONSABLE_ID)) $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->fk_rolresponsable_id);
return $criteria;
}
@@ -880,7 +932,9 @@
$copyObj->setFkCuentaId($this->fk_cuenta_id);
+ $copyObj->setFkRolresponsableId($this->fk_rolresponsable_id);
+
if ($deepCopy) {
$copyObj->setNew(false);
@@ -1004,6 +1058,36 @@
}
+ public function setRolResponsable($v)
+ {
+
+
+ if ($v === null) {
+ $this->setFkRolresponsableId('1');
+ } else {
+ $this->setFkRolresponsableId($v->getId());
+ }
+
+
+ $this->aRolResponsable = $v;
+ }
+
+
+
+ public function getRolResponsable($con = null)
+ {
+ include_once 'lib/model/om/BaseRolResponsablePeer.php';
+
+ if ($this->aRolResponsable === null && ($this->fk_rolresponsable_id !== null)) {
+
+ $this->aRolResponsable = RolResponsablePeer::retrieveByPK($this->fk_rolresponsable_id, $con);
+
+
+ }
+ return $this->aRolResponsable;
+ }
+
+
public function initRelRolresponsableResponsables()
{
if ($this->collRelRolresponsableResponsables === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -13,7 +13,7 @@
const CLASS_DEFAULT = 'lib.model.Responsable';
- const NUM_COLUMNS = 17;
+ const NUM_COLUMNS = 18;
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -71,23 +71,26 @@
const FK_CUENTA_ID = 'responsable.FK_CUENTA_ID';
+ const FK_ROLRESPONSABLE_ID = 'responsable.FK_ROLRESPONSABLE_ID';
+
+
private static $phpNameMap = null;
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Apellido', 'Direccion', 'Ciudad', 'CodigoPostal', 'FkProvinciaId', 'Telefono', 'TelefonoMovil', 'NroDocumento', 'FkTipodocumentoId', 'Sexo', 'Email', 'Relacion', 'Observacion', 'AutorizacionRetiro', 'FkCuentaId', ),
- BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID, ResponsablePeer::NOMBRE, ResponsablePeer::APELLIDO, ResponsablePeer::DIRECCION, ResponsablePeer::CIUDAD, ResponsablePeer::CODIGO_POSTAL, ResponsablePeer::FK_PROVINCIA_ID, ResponsablePeer::TELEFONO, ResponsablePeer::TELEFONO_MOVIL, ResponsablePeer::NRO_DOCUMENTO, ResponsablePeer::FK_TIPODOCUMENTO_ID, ResponsablePeer::SEXO, ResponsablePeer::EMAIL, ResponsablePeer::RELACION, ResponsablePeer::OBSERVACION, ResponsablePeer::AUTORIZACION_RETIRO, ResponsablePeer::FK_CUENTA_ID, ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'apellido', 'direccion', 'ciudad', 'codigo_postal', 'fk_provincia_id', 'telefono', 'telefono_movil', 'nro_documento', 'fk_tipodocumento_id', 'sexo', 'email', 'relacion', 'observacion', 'autorizacion_retiro', 'fk_cuenta_id', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
+ BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Apellido', 'Direccion', 'Ciudad', 'CodigoPostal', 'FkProvinciaId', 'Telefono', 'TelefonoMovil', 'NroDocumento', 'FkTipodocumentoId', 'Sexo', 'Email', 'Relacion', 'Observacion', 'AutorizacionRetiro', 'FkCuentaId', 'FkRolresponsableId', ),
+ BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID, ResponsablePeer::NOMBRE, ResponsablePeer::APELLIDO, ResponsablePeer::DIRECCION, ResponsablePeer::CIUDAD, ResponsablePeer::CODIGO_POSTAL, ResponsablePeer::FK_PROVINCIA_ID, ResponsablePeer::TELEFONO, ResponsablePeer::TELEFONO_MOVIL, ResponsablePeer::NRO_DOCUMENTO, ResponsablePeer::FK_TIPODOCUMENTO_ID, ResponsablePeer::SEXO, ResponsablePeer::EMAIL, ResponsablePeer::RELACION, ResponsablePeer::OBSERVACION, ResponsablePeer::AUTORIZACION_RETIRO, ResponsablePeer::FK_CUENTA_ID, ResponsablePeer::FK_ROLRESPONSABLE_ID, ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'apellido', 'direccion', 'ciudad', 'codigo_postal', 'fk_provincia_id', 'telefono', 'telefono_movil', 'nro_documento', 'fk_tipodocumento_id', 'sexo', 'email', 'relacion', 'observacion', 'autorizacion_retiro', 'fk_cuenta_id', 'fk_rolresponsable_id', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
);
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Apellido' => 2, 'Direccion' => 3, 'Ciudad' => 4, 'CodigoPostal' => 5, 'FkProvinciaId' => 6, 'Telefono' => 7, 'TelefonoMovil' => 8, 'NroDocumento' => 9, 'FkTipodocumentoId' => 10, 'Sexo' => 11, 'Email' => 12, 'Relacion' => 13, 'Observacion' => 14, 'AutorizacionRetiro' => 15, 'FkCuentaId' => 16, ),
- BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID => 0, ResponsablePeer::NOMBRE => 1, ResponsablePeer::APELLIDO => 2, ResponsablePeer::DIRECCION => 3, ResponsablePeer::CIUDAD => 4, ResponsablePeer::CODIGO_POSTAL => 5, ResponsablePeer::FK_PROVINCIA_ID => 6, ResponsablePeer::TELEFONO => 7, ResponsablePeer::TELEFONO_MOVIL => 8, ResponsablePeer::NRO_DOCUMENTO => 9, ResponsablePeer::FK_TIPODOCUMENTO_ID => 10, ResponsablePeer::SEXO => 11, ResponsablePeer::EMAIL => 12, ResponsablePeer::RELACION => 13, ResponsablePeer::OBSERVACION => 14, ResponsablePeer::AUTORIZACION_RETIRO => 15, ResponsablePeer::FK_CUENTA_ID => 16, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'apellido' => 2, 'direccion' => 3, 'ciudad' => 4, 'codigo_postal' => 5, 'fk_provincia_id' => 6, 'telefono' => 7, 'telefono_movil' => 8, 'nro_documento' => 9, 'fk_tipodocumento_id' => 10, 'sexo' => 11, 'email' => 12, 'relacion' => 13, 'observacion' => 14, 'autorizacion_retiro' => 15, 'fk_cuenta_id' => 16, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
+ BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Apellido' => 2, 'Direccion' => 3, 'Ciudad' => 4, 'CodigoPostal' => 5, 'FkProvinciaId' => 6, 'Telefono' => 7, 'TelefonoMovil' => 8, 'NroDocumento' => 9, 'FkTipodocumentoId' => 10, 'Sexo' => 11, 'Email' => 12, 'Relacion' => 13, 'Observacion' => 14, 'AutorizacionRetiro' => 15, 'FkCuentaId' => 16, 'FkRolresponsableId' => 17, ),
+ BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID => 0, ResponsablePeer::NOMBRE => 1, ResponsablePeer::APELLIDO => 2, ResponsablePeer::DIRECCION => 3, ResponsablePeer::CIUDAD => 4, ResponsablePeer::CODIGO_POSTAL => 5, ResponsablePeer::FK_PROVINCIA_ID => 6, ResponsablePeer::TELEFONO => 7, ResponsablePeer::TELEFONO_MOVIL => 8, ResponsablePeer::NRO_DOCUMENTO => 9, ResponsablePeer::FK_TIPODOCUMENTO_ID => 10, ResponsablePeer::SEXO => 11, ResponsablePeer::EMAIL => 12, ResponsablePeer::RELACION => 13, ResponsablePeer::OBSERVACION => 14, ResponsablePeer::AUTORIZACION_RETIRO => 15, ResponsablePeer::FK_CUENTA_ID => 16, ResponsablePeer::FK_ROLRESPONSABLE_ID => 17, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'apellido' => 2, 'direccion' => 3, 'ciudad' => 4, 'codigo_postal' => 5, 'fk_provincia_id' => 6, 'telefono' => 7, 'telefono_movil' => 8, 'nro_documento' => 9, 'fk_tipodocumento_id' => 10, 'sexo' => 11, 'email' => 12, 'relacion' => 13, 'observacion' => 14, 'autorizacion_retiro' => 15, 'fk_cuenta_id' => 16, 'fk_rolresponsable_id' => 17, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
);
@@ -175,6 +178,8 @@
$criteria->addSelectColumn(ResponsablePeer::FK_CUENTA_ID);
+ $criteria->addSelectColumn(ResponsablePeer::FK_ROLRESPONSABLE_ID);
+
}
const COUNT = 'COUNT(responsable.ID)';
@@ -338,6 +343,34 @@
+ public static function doCountJoinRolResponsable(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $criteria = clone $criteria;
+
+ $criteria->clearSelectColumns()->clearOrderByColumns();
+ if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->addSelectColumn(ResponsablePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(ResponsablePeer::COUNT);
+ }
+
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+ $rs = ResponsablePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ return 0;
+ }
+ }
+
+
+
public static function doSelectJoinCuenta(Criteria $c, $con = null)
{
$c = clone $c;
@@ -479,6 +512,53 @@
+ public static function doSelectJoinRolResponsable(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ ResponsablePeer::addSelectColumns($c);
+ $startcol = (ResponsablePeer::NUM_COLUMNS - ResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ RolResponsablePeer::addSelectColumns($c);
+
+ $c->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = ResponsablePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = RolResponsablePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getRolResponsable(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addResponsable($obj1); break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initResponsables();
+ $obj2->addResponsable($obj1); }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+
public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
{
$criteria = clone $criteria;
@@ -501,6 +581,8 @@
$criteria->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $criteria->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = ResponsablePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -531,12 +613,17 @@
TipodocumentoPeer::addSelectColumns($c);
$startcol5 = $startcol4 + TipodocumentoPeer::NUM_COLUMNS;
+ RolResponsablePeer::addSelectColumns($c);
+ $startcol6 = $startcol5 + RolResponsablePeer::NUM_COLUMNS;
+
$c->addJoin(ResponsablePeer::FK_CUENTA_ID, CuentaPeer::ID);
$c->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
$c->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $c->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -618,6 +705,29 @@
$obj4->addResponsable($obj1);
}
+
+
+ $omClass = RolResponsablePeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj5 = new $cls();
+ $obj5->hydrate($rs, $startcol5);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj5 = $temp_obj1->getRolResponsable(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj5->addResponsable($obj1); break;
+ }
+ }
+
+ if ($newObject) {
+ $obj5->initResponsables();
+ $obj5->addResponsable($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -645,6 +755,8 @@
$criteria->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $criteria->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = ResponsablePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -675,6 +787,8 @@
$criteria->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $criteria->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = ResponsablePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -705,6 +819,8 @@
$criteria->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
+ $criteria->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = ResponsablePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -715,6 +831,38 @@
+ public static function doCountJoinAllExceptRolResponsable(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $criteria = clone $criteria;
+
+ $criteria->clearSelectColumns()->clearOrderByColumns();
+ if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->addSelectColumn(ResponsablePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(ResponsablePeer::COUNT);
+ }
+
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(ResponsablePeer::FK_CUENTA_ID, CuentaPeer::ID);
+
+ $criteria->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
+
+ $criteria->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+
+ $rs = ResponsablePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ return 0;
+ }
+ }
+
+
+
public static function doSelectJoinAllExceptCuenta(Criteria $c, $con = null)
{
$c = clone $c;
@@ -732,11 +880,16 @@
TipodocumentoPeer::addSelectColumns($c);
$startcol4 = $startcol3 + TipodocumentoPeer::NUM_COLUMNS;
+ RolResponsablePeer::addSelectColumns($c);
+ $startcol5 = $startcol4 + RolResponsablePeer::NUM_COLUMNS;
+
$c->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
$c->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $c->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -792,6 +945,28 @@
$obj3->addResponsable($obj1);
}
+ $omClass = RolResponsablePeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getRolResponsable(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initResponsables();
+ $obj4->addResponsable($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -816,11 +991,16 @@
TipodocumentoPeer::addSelectColumns($c);
$startcol4 = $startcol3 + TipodocumentoPeer::NUM_COLUMNS;
+ RolResponsablePeer::addSelectColumns($c);
+ $startcol5 = $startcol4 + RolResponsablePeer::NUM_COLUMNS;
+
$c->addJoin(ResponsablePeer::FK_CUENTA_ID, CuentaPeer::ID);
$c->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+ $c->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -876,6 +1056,28 @@
$obj3->addResponsable($obj1);
}
+ $omClass = RolResponsablePeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getRolResponsable(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initResponsables();
+ $obj4->addResponsable($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -900,11 +1102,16 @@
ProvinciaPeer::addSelectColumns($c);
$startcol4 = $startcol3 + ProvinciaPeer::NUM_COLUMNS;
+ RolResponsablePeer::addSelectColumns($c);
+ $startcol5 = $startcol4 + RolResponsablePeer::NUM_COLUMNS;
+
$c->addJoin(ResponsablePeer::FK_CUENTA_ID, CuentaPeer::ID);
$c->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
+ $c->addJoin(ResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -960,12 +1167,145 @@
$obj3->addResponsable($obj1);
}
+ $omClass = RolResponsablePeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getRolResponsable(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initResponsables();
+ $obj4->addResponsable($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
}
+
+ public static function doSelectJoinAllExceptRolResponsable(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ ResponsablePeer::addSelectColumns($c);
+ $startcol2 = (ResponsablePeer::NUM_COLUMNS - ResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ CuentaPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + CuentaPeer::NUM_COLUMNS;
+
+ ProvinciaPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + ProvinciaPeer::NUM_COLUMNS;
+
+ TipodocumentoPeer::addSelectColumns($c);
+ $startcol5 = $startcol4 + TipodocumentoPeer::NUM_COLUMNS;
+
+ $c->addJoin(ResponsablePeer::FK_CUENTA_ID, CuentaPeer::ID);
+
+ $c->addJoin(ResponsablePeer::FK_PROVINCIA_ID, ProvinciaPeer::ID);
+
+ $c->addJoin(ResponsablePeer::FK_TIPODOCUMENTO_ID, TipodocumentoPeer::ID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = ResponsablePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = CuentaPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getCuenta(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initResponsables();
+ $obj2->addResponsable($obj1);
+ }
+
+ $omClass = ProvinciaPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getProvincia(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initResponsables();
+ $obj3->addResponsable($obj1);
+ }
+
+ $omClass = TipodocumentoPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getTipodocumento(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addResponsable($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initResponsables();
+ $obj4->addResponsable($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -24,6 +24,12 @@
protected $activo = true;
+ protected $collResponsables;
+
+
+ protected $lastResponsableCriteria = null;
+
+
protected $collRelRolresponsableResponsables;
@@ -188,6 +194,14 @@
}
$this->resetModified(); }
+ if ($this->collResponsables !== null) {
+ foreach($this->collResponsables as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
if ($this->collRelRolresponsableResponsables !== null) {
foreach($this->collRelRolresponsableResponsables as $referrerFK) {
if (!$referrerFK->isDeleted()) {
@@ -237,6 +251,14 @@
}
+ if ($this->collResponsables !== null) {
+ foreach($this->collResponsables as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
if ($this->collRelRolresponsableResponsables !== null) {
foreach($this->collRelRolresponsableResponsables as $referrerFK) {
if (!$referrerFK->validate($columns)) {
@@ -378,6 +400,10 @@
if ($deepCopy) {
$copyObj->setNew(false);
+ foreach($this->getResponsables() as $relObj) {
+ $copyObj->addResponsable($relObj->copy($deepCopy));
+ }
+
foreach($this->getRelRolresponsableResponsables() as $relObj) {
$copyObj->addRelRolresponsableResponsable($relObj->copy($deepCopy));
}
@@ -408,6 +434,181 @@
}
+ public function initResponsables()
+ {
+ if ($this->collResponsables === null) {
+ $this->collResponsables = array();
+ }
+ }
+
+
+ public function getResponsables($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ ResponsablePeer::addSelectColumns($criteria);
+ $this->collResponsables = ResponsablePeer::doSelect($criteria, $con);
+ }
+ } else {
+ if (!$this->isNew()) {
+
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ ResponsablePeer::addSelectColumns($criteria);
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+ return $this->collResponsables;
+ }
+
+
+ public function countResponsables($criteria = null, $distinct = false, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ return ResponsablePeer::doCount($criteria, $distinct, $con);
+ }
+
+
+ public function addResponsable(Responsable $l)
+ {
+ $this->collResponsables[] = $l;
+ $l->setRolResponsable($this);
+ }
+
+
+
+ public function getResponsablesJoinCuenta($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinCuenta($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinCuenta($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
+
+
+ public function getResponsablesJoinProvincia($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinProvincia($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinProvincia($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
+
+
+ public function getResponsablesJoinTipodocumento($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinTipodocumento($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinTipodocumento($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
+
public function initRelRolresponsableResponsables()
{
if ($this->collRelRolresponsableResponsables === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseTipodocumento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTipodocumento.php 2007-04-30 19:40:11 UTC (rev 4592)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTipodocumento.php 2007-04-30 19:42:54 UTC (rev 4593)
@@ -844,7 +844,42 @@
return $this->collResponsables;
}
+
+ public function getResponsablesJoinRolResponsable($criteria = null, $con = null)
+ {
+ include_once 'lib/model/om/BaseResponsablePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collResponsables === null) {
+ if ($this->isNew()) {
+ $this->collResponsables = array();
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_TIPODOCUMENTO_ID, $this->getId());
+
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(ResponsablePeer::FK_TIPODOCUMENTO_ID, $this->getId());
+
+ if (!isset($this->lastResponsableCriteria) || !$this->lastResponsableCriteria->equals($criteria)) {
+ $this->collResponsables = ResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+ }
+ }
+ $this->lastResponsableCriteria = $criteria;
+
+ return $this->collResponsables;
+ }
+
+
public function initDocentes()
{
if ($this->collDocentes === null) {
1
0
SVN Alba r4592 - in prosistem/alba/trunk/alba: config data/sql
by commits@pressenter.com.ar 30 Apr '07
by commits@pressenter.com.ar 30 Apr '07
30 Apr '07
Author: hsanchez
Date: 2007-04-30 16:40:11 -0300 (Mon, 30 Apr 2007)
New Revision: 4592
Modified:
prosistem/alba/trunk/alba/config/schema.xml
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
Log:
Agregando campo al responsable para relacionar con el rol
Modified: prosistem/alba/trunk/alba/config/schema.xml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.xml 2007-04-30 19:34:36 UTC (rev 4591)
+++ prosistem/alba/trunk/alba/config/schema.xml 2007-04-30 19:40:11 UTC (rev 4592)
@@ -285,6 +285,7 @@
<column name="observacion" type="VARCHAR" size="255" required="false" default=""/>
<column name="autorizacion_retiro" type="boolean" required="true" default="false"/>
<column name="fk_cuenta_id" type="INTEGER" required="true" default="0"/>
+ <column name="fk_rolresponsable_id" type="INTEGER" required="true" default="1"/>
<foreign-key foreignTable="cuenta">
<reference local="fk_cuenta_id" foreign="id"/>
</foreign-key>
@@ -294,6 +295,9 @@
<foreign-key foreignTable="tipodocumento">
<reference local="fk_tipodocumento_id" foreign="id"/>
</foreign-key>
+ <foreign-key foreignTable="rol_responsable">
+ <reference local="fk_rolresponsable_id" foreign="id"/>
+ </foreign-key>
</table>
<table name="ciclolectivo" idMethod="native">
<column name="id" type="integer" size="11" required="true" autoIncrement="true" primaryKey="true"/>
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-30 19:34:36 UTC (rev 4591)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-30 19:40:11 UTC (rev 4592)
@@ -56,5 +56,6 @@
REFERENCES `responsable` (`id`)
)Type=InnoDB;
+ALTER TABLE responsable ADD COLUMN fk_rolresponsable_id INT NOT NULL DEFAULT 1;
SET FOREIGN_KEY_CHECKS = 1;
1
0
SVN Alba r4591 - in prosistem/alba/trunk/alba/apps/principal/modules/evento: . templates validate
by commits@pressenter.com.ar 30 Apr '07
by commits@pressenter.com.ar 30 Apr '07
30 Apr '07
Author: josx
Date: 2007-04-30 16:34:36 -0300 (Mon, 30 Apr 2007)
New Revision: 4591
Added:
prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/
prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/edit.yml
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
Log:
Validacion para el modulo evento
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-30 18:08:59 UTC (rev 4590)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-30 19:34:36 UTC (rev 4591)
@@ -1,6 +1,6 @@
<?php
- use_helper('I18N','Object');
+ use_helper('I18N','Object','Validation');
$hora_fin = "";
$hora_inicio = "";
$seleccion_4 = true;
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/edit.yml 2007-04-30 18:08:59 UTC (rev 4590)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/edit.yml 2007-04-30 19:34:36 UTC (rev 4591)
@@ -0,0 +1,31 @@
+methods:
+ post:
+ - "evento{titulo}"
+ - "evento{fecha_inicio}"
+ - "evento{fecha_fin}"
+
+fillin:
+ enabled: on
+
+names:
+
+ evento{titulo}:
+ required: Yes
+ required_msg: El campo descripción es obligatorio
+ validators: caracteresMaximos255
+
+ evento{fecha_inicio}:
+ required: Yes
+ required_msg: El campo fecha inicio es obligatorio
+
+ evento{fecha_fin}:
+ required: Yes
+ required_msg: El campo fecha inicio es obligatorio
+
+
+
+caracteresMaximos255:
+ class: sfStringValidator
+ param:
+ max: 255
+ max_error: La maxima cantidad de caracteres permitida es de 255
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/validate/edit.yml
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
1
0
SVN Alba r4590 - prosistem/alba/trunk/alba/apps/principal/modules/evento/templates
by commits@pressenter.com.ar 30 Apr '07
by commits@pressenter.com.ar 30 Apr '07
30 Apr '07
Author: josx
Date: 2007-04-30 15:08:59 -0300 (Mon, 30 Apr 2007)
New Revision: 4590
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
Log:
Arreglo de la edicion para los evento
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-30 18:03:22 UTC (rev 4589)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-30 18:08:59 UTC (rev 4590)
@@ -304,7 +304,7 @@
</div>
-
+ <?php echo object_input_hidden_tag($evento, 'getId') ?>
</fieldset>
1
0
SVN Alba r4589 - in prosistem/alba/trunk/alba/apps/principal/modules/evento: actions templates
by commits@pressenter.com.ar 30 Apr '07
by commits@pressenter.com.ar 30 Apr '07
30 Apr '07
Author: josx
Date: 2007-04-30 15:03:22 -0300 (Mon, 30 Apr 2007)
New Revision: 4589
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
Log:
Ahora ya se puede dar de alta y modificar un evento
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php 2007-04-27 15:07:48 UTC (rev 4588)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php 2007-04-30 18:03:22 UTC (rev 4589)
@@ -54,8 +54,6 @@
if ($this->getRequest()->getMethod() == sfRequest::POST) {
$this->updateEventoFromRequest();
-
-/*
$this->saveEvento($this->evento);
$this->setFlash('notice', 'Your modifications have been saved');
if ($this->getRequestParameter('save_and_add')) {
@@ -65,8 +63,6 @@
} else {
return $this->redirect('evento/edit?id='.$this->evento->getId());
}
-*/
-
} else {
// $this->labels = $this->getLabels();
}
@@ -96,38 +92,148 @@
protected function updateEventoFromRequest() {
$evento = $this->getRequestParameter('evento');
- print_R($evento);
- $evento_obj = new Evento();
-/*
- if(isset($alumno['apellido'])) {
- $evento_obj->setApellido($alumno['apellido']);
+
+ if (isset($evento['fecha_inicio'])) {
+ if ($evento['fecha_inicio']) {
+ try {
+ $dateFormat = new sfDateFormat($this->getUser()->getCulture());
+ if(!is_array($evento['fecha_inicio'])) {
+
+ if(isset($evento['hora_asociada']) AND $evento['hora_asociada'] == 1) {
+ if($evento['hora_inicio']) {
+ $evento['fecha_inicio'] .= " ".$evento['hora_inicio']['hour'].":".$evento['hora_inicio']['minute'];
+ } else {
+ $evento['fecha_inicio'] .= " 00:00:00";
+ }
+ } else {
+ $evento['fecha_inicio'] .= " 00:00:00";
+ }
+
+ $value = $dateFormat->format($evento['fecha_inicio'], 'I', $dateFormat->getInputPattern('g'));
+ } else {
+ $value_array = $evento['fecha_inicio'];
+
+ $value_array['hour']['hour'] = "00";
+ $value_array['hour']['minute'] = "00";
+ $value_array['hour']['second'] = "00";
+ if($evento['hora_asociada'] == 1) {
+ if($evento['hora_inicio']) {
+ $value_array['hour'] = $evento['hora_inicio']['hour'];
+ $value_array['minute'] = $evento['hora_inicio']['minute'];
+ }
+ }
+
+ $value = $value_array['year'].'-'.$value_array['month'].'-'.$value_array['day'].(isset($value_array['hour']) ? ' '.$value_array['hour'].':'.$value_array['minute'].(isset($value_array['second']) ? ':'.$value_array['second'] : '') : '');
+ }
+
+ $this->evento->setFechaInicio($value);
+ }
+ catch (sfException $e) {
+ // not a date
+ }
+ } else {
+ $this->evento->setFechaInicio(null);
+ }
}
- if (isset($alumno['fecha_nacimiento'])) {
- if ($alumno['fecha_nacimiento']) {
+
+ if (isset($evento['fecha_fin'])) {
+ if ($evento['fecha_fin']) {
try {
$dateFormat = new sfDateFormat($this->getUser()->getCulture());
- if (!is_array($alumno['fecha_nacimiento'])) {
- $value = $dateFormat->format($alumno['fecha_nacimiento'], 'I', $dateFormat->getInputPattern('g'));
+ if (!is_array($evento['fecha_fin'])) {
+
+ if(isset($evento['hora_asociada']) AND $evento['hora_asociada'] == 1) {
+ if($evento['hora_fin']) {
+ $evento['fecha_fin'] .= " ".$evento['hora_fin']['hour'].":".$evento['hora_fin']['minute'];
+ } else {
+ $evento['fecha_fin'] .= " 00:00:00";
+ }
+ } else {
+ $evento['fecha_fin'] .= " 00:00:00";
+ }
+
+ $value = $dateFormat->format($evento['fecha_fin'], 'I', $dateFormat->getInputPattern('g'));
} else {
- $value_array = $alumno['fecha_nacimiento'];
+ $value_array = $evento['fecha_fin'];
+
+ $value_array['hour']['hour'] = "00";
+ $value_array['hour']['minute'] = "00";
+ $value_array['hour']['second'] = "00";
+ if($evento['hora_asociada'] == 1) {
+ if($evento['hora_fin']) {
+ $value_array['hour'] = $evento['hora_fin']['hour'];
+ $value_array['minute'] = $evento['hora_fin']['minute'];
+ }
+ }
+
$value = $value_array['year'].'-'.$value_array['month'].'-'.$value_array['day'].(isset($value_array['hour']) ? ' '.$value_array['hour'].':'.$value_array['minute'].(isset($value_array['second']) ? ':'.$value_array['second'] : '') : '');
}
- $this->alumno->setFechaNacimiento($value);
+ $this->evento->setFechaFin($value);
}
catch (sfException $e) {
// not a date
}
} else {
- $this->alumno->setFechaNacimiento(null);
+ $this->evento->setFechaFin(null);
}
}
- $this->alumno->setActivo(isset($alumno['activo']) ? $alumno['activo'] : 0);
-*/
- return $evento_obj;
+ if(isset($evento['titulo'])) {
+ $this->evento->setTitulo($evento['titulo']);
+ }
+
+
+ if(isset($evento['tipo'])) {
+ $this->evento->setTipo($evento['titulo']);
+ } else {
+ $this->evento->setTipo(1); // (0 = PRIVATE | 1 = PUBLIC | 2 = CONFIDENTIAL)
+ }
+
+ if(isset($evento['estado'])) {
+ $this->evento->setEstado($evento['estado']);
+ } else {
+ $this->evento->setEstado(1); // (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED)
+ }
+
+
+
+
+ if(isset($evento['activar_repeticion']) AND $evento['activar_repeticion'] == 1) {
+ if(isset($evento['frecuencia']) AND is_array($evento['frecuencia']) ) {
+ $this->evento->setFrecuencia($evento['frecuencia'][0]);
+
+ switch($evento['frecuencia'][0]) { // dia: 4, semana: 5, mes: 6, año: 7
+ case '4': $this->evento->setFrecuenciaIntervalo($evento['frecuencia_intervalo_diaria']);
+ break;
+ case '5': $this->evento->setFrecuenciaIntervalo($evento['frecuencia_intervalo_semana']);
+ $aSemanaBinario = array ( 1, 2, 4, 8, 16, 32, 64 );
+ $suma_total = 0;
+ foreach($evento['recurrencia_dias'] as $dia) {
+ $suma_total += $aSemanaBinario[$dia];
+ }
+ // guardamos en binario para saber todos los dias de la semana seleccionados
+ $this->evento->setRecurrenciaDias($suma_total);
+ break;
+ case '6': break;
+ case '7': break;
+ }
+ }
+
+ switch($evento['recurrencia_fin_tipo'][0]) {
+ case '0': $this->evento->setRecurrenciaFin('');
+ break;
+ case '1': $this->evento->setRecurrenciaFin($evento['recurrencia_fin_repeticion']);
+ break;
+ case '2': $dateFormat = new sfDateFormat($this->getUser()->getCulture());
+ $value = $dateFormat->format($evento['recurrencia_fin_fecha']." 00:00:00", 'I', $dateFormat->getInputPattern('g'));
+ $this->evento->setRecurrenciaFin($value);
+ break;
+ }
+ }
+
}
}
-?>
\ No newline at end of file
+?>
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php 2007-04-27 15:07:48 UTC (rev 4588)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php 2007-04-30 18:03:22 UTC (rev 4589)
@@ -1,2 +1,4 @@
-<?php use_helper('DateForm') ?>
-<?php echo select_time_tag("evento[hora_fin]", $evento->getHoraFin(), array('include_second' => false, '12hour_time' => true ), array('disabled' => true));?>
\ No newline at end of file
+<?php
+ use_helper('DateForm');
+ echo select_time_tag("evento[hora_fin]", $hora_fin, array('include_second' => false, '12hour_time' => true ), ($hora_asociada == 0)? array('disabled' => true):array() );
+?>
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php 2007-04-27 15:07:48 UTC (rev 4588)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php 2007-04-30 18:03:22 UTC (rev 4589)
@@ -1,2 +1,4 @@
-<?php use_helper('DateForm') ?>
-<?php echo select_time_tag("evento[hora_inicio]", $evento->getHoraInicio(), array('include_second' => false, '12hour_time' => true), array('disabled' => true));?>
\ No newline at end of file
+<?php
+ use_helper('DateForm');
+ echo select_time_tag("evento[hora_inicio]", $hora_inicio, array('include_second' => false, '12hour_time' => true), ($hora_asociada == 0)? array('disabled' => true):array());
+?>
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-27 15:07:48 UTC (rev 4588)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-30 18:03:22 UTC (rev 4589)
@@ -1,5 +1,61 @@
-<?php use_helper('I18N','Object') ?>
+<?php
+ use_helper('I18N','Object');
+ $hora_fin = "";
+ $hora_inicio = "";
+ $seleccion_4 = true;
+ $seleccion_5 = $seleccion_6 = $seleccion_7 = $hora_asociada = $activar_repeticion = false;
+ $mostrar_div_anual = $mostrar_div_mensual = $mostrar_div_semana = $mostrar_div_diaria = "display:none";
+ $recurrencia_fin_fecha = '';
+ $recurrencia_fin_repeticion = '';
+ $recurrencia_fin_0 = true;
+ $recurrencia_fin_1 = false;
+ $recurrencia_fin_2 = false;
+ $numero_binario = "0000000";
+
+ if($evento->getId()) {
+ $hora_inicio = date( "H:i" , strtotime($evento->getFechaInicio()));
+ $hora_fin = date( "H:i" , strtotime($evento->getFechaFin()));
+ if($hora_inicio == "00:00" AND $hora_fin == "00:00") {
+ $hora_asociada = false;
+ } else {
+ $hora_asociada = true;
+ }
+
+ switch($evento->getFrecuencia()) {
+ case '0': $activar_repeticion = false; break;
+ case '4': $activar_repeticion = true; $seleccion_4 = true; $seleccion_5 = $seleccion_6 = $seleccion_7 = false; $mostrar_div_diaria = ""; break;
+ case '5': $activar_repeticion = true; $seleccion_5 = true; $seleccion_4 = $seleccion_6 = $seleccion_7 = false; $mostrar_div_semana = ""; break;
+ case '6': $activar_repeticion = true; $seleccion_6 = true; $seleccion_5 = $seleccion_4 = $seleccion_7 = false; $mostrar_div_mensual = ""; break;
+ case '7': $activar_repeticion = true; $seleccion_7 = true; $seleccion_5 = $seleccion_6 = $seleccion_4 = false; $mostrar_div_anual = ""; break;
+ }
+
+
+ if($evento->getRecurrenciaFin() != "") {
+ if(is_numeric($evento->getRecurrenciaFin())) {
+ $recurrencia_fin_fecha = '';
+ $recurrencia_fin_repeticion = $evento->getRecurrenciaFin();
+ $recurrencia_fin_2 = $recurrencia_fin_0 = false;
+ $recurrencia_fin_1 = true;
+ } else {
+ $dateFormat = new sfDateFormat($sf_user->getCulture());
+ $value = $dateFormat->format($evento->getRecurrenciaFin()." 00:00:00", 'I', $dateFormat->getInputPattern('g'));
+
+ $recurrencia_fin_fecha = $value;
+ $recurrencia_fin_repeticion = '';
+ $recurrencia_fin_2 = true;
+ $recurrencia_fin_0 = $recurrencia_fin_1 = false;
+ }
+ }
+
+
+ $numero_binario = str_pad(decbin($evento->getRecurrenciaDias()), 7, "0", STR_PAD_LEFT);
+
+
+
+ }
+?>
+
<script type="text/javascript">
function cambiarDeEstado(element) {
if (document.getElementById(element).disabled == true)
@@ -47,11 +103,11 @@
}
if(document.getElementById('evento_recurrencia_fin_tipo_1').disabled == false && document.getElementById('evento_recurrencia_fin_tipo_1').checked == true) {
- HabilitaDeshabilitaRangoFrecuencia('evento_frecuencia_fin_repeticion');
+ HabilitaDeshabilitaRangoFrecuencia('evento_recurrencia_fin_repeticion');
}
if(document.getElementById('evento_recurrencia_fin_tipo_2').disabled == false && document.getElementById('evento_recurrencia_fin_tipo_2').checked == true) {
- HabilitaDeshabilitaRangoFrecuencia('evento_frecuencia_fin_fecha');
+ HabilitaDeshabilitaRangoFrecuencia('evento_recurrencia_fin_fecha');
}
}
@@ -63,8 +119,8 @@
}
function deshabilitaRangoFrecuencia() {
- document.getElementById('evento_frecuencia_fin_repeticion').disabled=true;
- document.getElementById('evento_frecuencia_fin_fecha').disabled=true;
+ document.getElementById('evento_recurrencia_fin_repeticion').disabled=true;
+ document.getElementById('evento_recurrencia_fin_fecha').disabled=true;
}
function mostrarRegla(element) {
@@ -77,8 +133,17 @@
document.getElementById('evento_recurrencia_dias_4').disabled = false;
document.getElementById('evento_recurrencia_dias_5').disabled = false;
document.getElementById('evento_recurrencia_dias_6').disabled = false;
- document.getElementById('evento_frecuencia_intervalo_diaria').disabled = false;
- document.getElementById('evento_frecuencia_intervalo_semana').disabled = false;
+
+ if(element == 'diaria') {
+ document.getElementById('evento_frecuencia_intervalo_diaria').disabled = false;
+ document.getElementById('evento_frecuencia_intervalo_semana').disabled = true;
+ }
+
+ if(element == 'semana') {
+ document.getElementById('evento_frecuencia_intervalo_diaria').disabled = true;
+ document.getElementById('evento_frecuencia_intervalo_semana').disabled = false;
+ }
+
}
function deshabilitaReglas() {
@@ -154,7 +219,7 @@
'control_name' => 'evento[fecha_inicio]',
)) ?>
- <?php include_partial('hora_inicio', array ('evento' => $evento));?>
+ <?php include_partial('hora_inicio', array ('evento' => $evento, 'hora_inicio' => $hora_inicio, 'hora_asociada' => $hora_asociada ));?>
</div>
</div>
@@ -173,14 +238,14 @@
'control_name' => 'evento[fecha_fin]',
)) ?>
- <?php include_partial('hora_fin', array ('evento' => $evento));?>
+ <?php include_partial('hora_fin', array ('evento' => $evento, 'hora_fin' => $hora_fin, 'hora_asociada' => $hora_asociada ));?>
</div>
</div>
<div class="form-row">
<?php echo label_for('hora_asociada', __('Hora asociada:')) ?>
<div class="content">
- <?php echo checkbox_tag('evento[hora_asociada]', 1, false, array('onChange'=>'javascrip:HabilitaDeshabilitaHora();')) ?>
+ <?php echo checkbox_tag('evento[hora_asociada]', 1, $hora_asociada , array('onChange'=>'javascrip:HabilitaDeshabilitaHora();')) ?>
</div>
</div>
@@ -190,50 +255,51 @@
<h2>
<?php echo __('Activar Repetición') ?>
- <?php echo checkbox_tag('evento[activar]', 1, false, array('onChange'=>'javascrip:HabilitaDeshabilitaRepeticion();')) ?>
+ <?php echo checkbox_tag('evento[activar_repeticion]', 1, $activar_repeticion, array('onChange'=>'javascrip:HabilitaDeshabilitaRepeticion();')) ?>
</h2>
<h4>Regla de recurrencia</h4>
<div class="form-row">
- <?php echo radiobutton_tag('evento[frecuencia][]', '4', true, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'diaria\')') ) ?>Diaria
- <?php echo radiobutton_tag('evento[frecuencia][]', '5', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'semana\')')) ?>Semanal
- <?php echo radiobutton_tag('evento[frecuencia][]', '6', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'mensual\')')) ?>Mensual
- <?php echo radiobutton_tag('evento[frecuencia][]', '7', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'anual\')')) ?>Anual
+ <?php echo radiobutton_tag('evento[frecuencia][]', '4', $seleccion_4, array('disabled' => !$activar_repeticion, 'onChange' => 'javascript:mostrarRegla(\'diaria\')') ) ?>Diaria
+ <?php echo radiobutton_tag('evento[frecuencia][]', '5', $seleccion_5, array('disabled' => !$activar_repeticion, 'onChange' => 'javascript:mostrarRegla(\'semana\')')) ?>Semanal
+ <?php echo radiobutton_tag('evento[frecuencia][]', '6', $seleccion_6, array('disabled' => !$activar_repeticion, 'onChange' => 'javascript:mostrarRegla(\'mensual\')')) ?>Mensual
+ <?php echo radiobutton_tag('evento[frecuencia][]', '7', $seleccion_7, array('disabled' => !$activar_repeticion, 'onChange' => 'javascript:mostrarRegla(\'anual\')')) ?>Anual
</div>
- <div class="form-row" id="diaria" style="display:none">
- Repetir cada <?php echo input_tag('evento[frecuencia_intervalo_diaria]', '1', array('disabled' => true, 'maxlength' => 3, 'size' => 3 )) ?> día(s)
+ <div class="form-row" id="diaria" style="<?php echo $mostrar_div_diaria; ?>">
+ Repetir cada <?php echo object_input_tag($evento, 'getFrecuenciaIntervalo', array('disabled' => !$seleccion_4, 'maxlength' => 3, 'size' => 3, 'control_name' => 'evento[frecuencia_intervalo_diaria]' )); ?> día(s)
</div>
- <div class="form-row" id="semana" style="display:none">
- Repetir cada <?php echo input_tag('evento[frecuencia_intervalo_semana]', '1', array('disabled' => true, 'maxlength' => 2, 'size' => 2 )) ?> semana(s)<br><br>
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '0', false, array('disabled' => true) ) ?>Domingo
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '1', false, array('disabled' => true) ) ?>Lunes
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '2', false, array('disabled' => true) ) ?>Martes
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '3', false, array('disabled' => true) ) ?>Miercoles
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '4', false, array('disabled' => true) ) ?>Jueves
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '5', false, array('disabled' => true) ) ?>Viernes
- <?php echo checkbox_tag('evento[recurrencia_dias][]', '6', false, array('disabled' => true) ) ?>Sabado
+ <div class="form-row" id="semana" style="<?php echo $mostrar_div_semana?>">
+ Repetir cada <?php echo object_input_tag($evento, 'getFrecuenciaIntervalo', array('disabled' => !$seleccion_5, 'maxlength' => 3, 'size' => 3, 'control_name' => 'evento[frecuencia_intervalo_semana]')); ?> semana(s)<br><br>
+
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '0', ($numero_binario[6])?true:false, array('disabled' => !$seleccion_5) ) ?>Domingo
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '1', ($numero_binario[5])?true:false, array('disabled' => !$seleccion_5) ) ?>Lunes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '2', ($numero_binario[4])?true:false, array('disabled' => !$seleccion_5) ) ?>Martes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '3', ($numero_binario[3])?true:false, array('disabled' => !$seleccion_5) ) ?>Miercoles
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '4', ($numero_binario[2])?true:false, array('disabled' => !$seleccion_5) ) ?>Jueves
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '5', ($numero_binario[1])?true:false, array('disabled' => !$seleccion_5) ) ?>Viernes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '6', ($numero_binario[0])?true:false, array('disabled' => !$seleccion_5) ) ?>Sabado
</div>
- <div class="form-row" id="mensual" style="display:none">
+ <div class="form-row" id="mensual" style="<?php echo $mostrar_div_mensual?>">
</div>
- <div class="form-row" id="anual" style="display:none">
+ <div class="form-row" id="anual" style="<?php echo $mostrar_div_anual?>">
</div>
<h4>Rango de frecuencia</h4>
<div class="form-row">
- <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '0', true, array('disabled' => true, 'onClick' => 'javascript:deshabilitaRangoFrecuencia()') ) ?>Sin fecha de Finalización <br>
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '0', $recurrencia_fin_0, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:deshabilitaRangoFrecuencia()') ) ?>Sin fecha de Finalización <br>
- <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '1', false, array('disabled' => true, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_frecuencia_fin_repeticion\')') ) ?>Terminar despues:
- <?php echo input_tag('evento[frecuencia_fin_repeticion]', '1', array('disabled' => true, 'maxlength' => 4, 'size' => 4 )) ?> <br>
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '1', $recurrencia_fin_1, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_repeticion\')') ) ?>Terminar despues:
+ <?php echo input_tag('evento[recurrencia_fin_repeticion]', $recurrencia_fin_repeticion, array('disabled' => !$activar_repeticion, 'maxlength' => 4, 'size' => 4 )) ?> <br>
- <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '2', false, array('disabled' => true, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_frecuencia_fin_fecha\')') ) ?>Terminar el:
- <?php echo input_date_tag('evento[frecuencia_fin_fecha]', '', array ( 'rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png',
- 'control_name' => 'evento[frecuencia_fin_fecha]', 'disabled' => true
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '2', $recurrencia_fin_2, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_fecha\')') ) ?>Terminar el:
+ <?php echo input_date_tag('evento[recurrencia_fin_fecha]', $recurrencia_fin_fecha, array ( 'rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png',
+ 'control_name' => 'evento[recurrencia_fin_fecha]', 'disabled' => !$activar_repeticion
)) ?><br>
</div>
1
0
25 Apr '07
Author: josx
Date: 2007-04-25 18:36:27 -0300 (Wed, 25 Apr 2007)
New Revision: 4587
Added:
prosistem/alba/trunk/alba/apps/principal/modules/evento/
prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/
prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/config/
prosistem/alba/trunk/alba/apps/principal/modules/evento/config/security.yml
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php
prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/generator.yml
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/security.yml
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_fin.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_inicio.php
Modified:
prosistem/alba/trunk/alba/lib/model/Evento.php
Log:
Agrego primer panatalla de agregar evento y modulo manual para dar de alta calendario
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,133 @@
+<?php
+/**
+ * This file is part of Alba.
+ *
+ * Alba is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Alba is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Alba; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+/**
+ * evento actions
+ *
+ * @package alba
+ * @author José Luis Di Biase <josx(a)interorganic.com.ar>
+ * @author Héctor Sanchez <hsanchez(a)pressenter.com.ar>
+ * @author Fernando Toledo <ftoledo(a)pressenter.com.ar>
+ * @version SVN: $Id: actions.class.php 4566 2007-04-25 15:07:43Z josx $
+ * @filesource
+ * @license GPL
+ */
+
+class eventoActions extends sfActions
+{
+
+ public function executeIndex() {
+ return $this->forward('evento', 'edit');
+// $this->evento = new Evento();
+ }
+
+
+ protected function saveEvento($evento) {
+ $evento->save();
+
+ }
+
+ public function executeCreate() {
+ return $this->forward('evento', 'edit');
+ }
+
+
+ public function executeEdit() {
+ $this->evento = $this->getEventoOrCreate();
+
+ if ($this->getRequest()->getMethod() == sfRequest::POST) {
+ $this->updateEventoFromRequest();
+
+/*
+ $this->saveEvento($this->evento);
+ $this->setFlash('notice', 'Your modifications have been saved');
+ if ($this->getRequestParameter('save_and_add')) {
+ return $this->redirect('evento/create');
+ } else if ($this->getRequestParameter('save_and_list')) {
+ return $this->redirect('evento/list');
+ } else {
+ return $this->redirect('evento/edit?id='.$this->evento->getId());
+ }
+*/
+
+ } else {
+// $this->labels = $this->getLabels();
+ }
+ }
+
+ public function handleErrorEdit() {
+ $this->preExecute();
+ $this->evento = $this->getEventoOrCreate();
+ $this->updateEventoFromRequest();
+// $this->labels = $this->getLabels();
+ return sfView::SUCCESS;
+ }
+
+
+ protected function getEventoOrCreate($id = 'id') {
+ if (!$this->getRequestParameter($id)) {
+ $evento = new Evento();
+ } else {
+ $evento = EventoPeer::retrieveByPk($this->getRequestParameter($id));
+ $this->forward404Unless($evento);
+ }
+ return $evento;
+ }
+
+
+
+
+ protected function updateEventoFromRequest() {
+ $evento = $this->getRequestParameter('evento');
+ print_R($evento);
+ $evento_obj = new Evento();
+/*
+ if(isset($alumno['apellido'])) {
+ $evento_obj->setApellido($alumno['apellido']);
+ }
+ if (isset($alumno['fecha_nacimiento'])) {
+ if ($alumno['fecha_nacimiento']) {
+ try {
+ $dateFormat = new sfDateFormat($this->getUser()->getCulture());
+ if (!is_array($alumno['fecha_nacimiento'])) {
+ $value = $dateFormat->format($alumno['fecha_nacimiento'], 'I', $dateFormat->getInputPattern('g'));
+ } else {
+ $value_array = $alumno['fecha_nacimiento'];
+ $value = $value_array['year'].'-'.$value_array['month'].'-'.$value_array['day'].(isset($value_array['hour']) ? ' '.$value_array['hour'].':'.$value_array['minute'].(isset($value_array['second']) ? ':'.$value_array['second'] : '') : '');
+ }
+ $this->alumno->setFechaNacimiento($value);
+ }
+ catch (sfException $e) {
+ // not a date
+ }
+ } else {
+ $this->alumno->setFechaNacimiento(null);
+ }
+ }
+
+ $this->alumno->setActivo(isset($alumno['activo']) ? $alumno['activo'] : 0);
+*/
+
+ return $evento_obj;
+ }
+
+
+}
+?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/config/security.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/config/security.yml 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/config/security.yml 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,3 @@
+all:
+ is_secure: on
+ credentials: calendario
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/config/security.yml
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,2 @@
+<?php use_helper('DateForm') ?>
+<?php echo select_time_tag("evento[hora_fin]", $evento->getHoraFin(), array('include_second' => false, '12hour_time' => true ), array('disabled' => true));?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_fin.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,2 @@
+<?php use_helper('DateForm') ?>
+<?php echo select_time_tag("evento[hora_inicio]", $evento->getHoraInicio(), array('include_second' => false, '12hour_time' => true), array('disabled' => true));?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/_hora_inicio.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,253 @@
+<?php use_helper('I18N','Object') ?>
+
+<script type="text/javascript">
+ function cambiarDeEstado(element) {
+ if (document.getElementById(element).disabled == true)
+ document.getElementById(element).disabled=false;
+ else
+ document.getElementById(element).disabled=true;
+ }
+
+
+ function HabilitaDeshabilitaHora() {
+ cambiarDeEstado('evento_hora_inicio_hour');
+ cambiarDeEstado('evento_hora_inicio_minute');
+ cambiarDeEstado('evento_hora_inicio_ampm');
+ cambiarDeEstado('evento_hora_fin_hour');
+ cambiarDeEstado('evento_hora_fin_minute');
+ cambiarDeEstado('evento_hora_fin_ampm');
+ }
+
+
+ function HabilitaDeshabilitaRepeticion() {
+ cambiarDeEstado('evento_frecuencia_7');
+ cambiarDeEstado('evento_frecuencia_6');
+ cambiarDeEstado('evento_frecuencia_5');
+ cambiarDeEstado('evento_frecuencia_4');
+ cambiarDeEstado('evento_recurrencia_fin_tipo_0');
+ cambiarDeEstado('evento_recurrencia_fin_tipo_1');
+ cambiarDeEstado('evento_recurrencia_fin_tipo_2');
+ deshabilitaRangoFrecuencia();
+ deshabilitaReglas();
+
+ if(document.getElementById('evento_frecuencia_7').disabled == false && document.getElementById('evento_frecuencia_7').checked == true) {
+ mostrarRegla('anual');
+ }
+
+ if(document.getElementById('evento_frecuencia_6').disabled == false && document.getElementById('evento_frecuencia_6').checked == true) {
+ mostrarRegla('mensual');
+ }
+
+ if(document.getElementById('evento_frecuencia_5').disabled == false && document.getElementById('evento_frecuencia_5').checked == true) {
+ mostrarRegla('semana');
+ }
+
+ if(document.getElementById('evento_frecuencia_4').disabled == false && document.getElementById('evento_frecuencia_4').checked == true) {
+ mostrarRegla('diaria');
+ }
+
+ if(document.getElementById('evento_recurrencia_fin_tipo_1').disabled == false && document.getElementById('evento_recurrencia_fin_tipo_1').checked == true) {
+ HabilitaDeshabilitaRangoFrecuencia('evento_frecuencia_fin_repeticion');
+ }
+
+ if(document.getElementById('evento_recurrencia_fin_tipo_2').disabled == false && document.getElementById('evento_recurrencia_fin_tipo_2').checked == true) {
+ HabilitaDeshabilitaRangoFrecuencia('evento_frecuencia_fin_fecha');
+ }
+
+ }
+
+
+ function HabilitaDeshabilitaRangoFrecuencia(element) {
+ deshabilitaRangoFrecuencia();
+ document.getElementById(element).disabled=false;
+ }
+
+ function deshabilitaRangoFrecuencia() {
+ document.getElementById('evento_frecuencia_fin_repeticion').disabled=true;
+ document.getElementById('evento_frecuencia_fin_fecha').disabled=true;
+ }
+
+ function mostrarRegla(element) {
+ deshabilitaReglas();
+ document.getElementById(element).style.display = '';
+ document.getElementById('evento_recurrencia_dias_0').disabled = false;
+ document.getElementById('evento_recurrencia_dias_1').disabled = false;
+ document.getElementById('evento_recurrencia_dias_2').disabled = false;
+ document.getElementById('evento_recurrencia_dias_3').disabled = false;
+ document.getElementById('evento_recurrencia_dias_4').disabled = false;
+ document.getElementById('evento_recurrencia_dias_5').disabled = false;
+ document.getElementById('evento_recurrencia_dias_6').disabled = false;
+ document.getElementById('evento_frecuencia_intervalo_diaria').disabled = false;
+ document.getElementById('evento_frecuencia_intervalo_semana').disabled = false;
+ }
+
+ function deshabilitaReglas() {
+ document.getElementById('anual').style.display = 'none';
+ document.getElementById('mensual').style.display = 'none';
+ document.getElementById('semana').style.display = 'none';
+ document.getElementById('diaria').style.display = 'none';
+
+ document.getElementById('evento_recurrencia_dias_0').disabled = true;
+ document.getElementById('evento_recurrencia_dias_1').disabled = true;
+ document.getElementById('evento_recurrencia_dias_2').disabled = true;
+ document.getElementById('evento_recurrencia_dias_3').disabled = true;
+ document.getElementById('evento_recurrencia_dias_4').disabled = true;
+ document.getElementById('evento_recurrencia_dias_5').disabled = true;
+ document.getElementById('evento_recurrencia_dias_6').disabled = true;
+ document.getElementById('evento_frecuencia_intervalo_diaria').disabled = true;
+ document.getElementById('evento_frecuencia_intervalo_semana').disabled = true;
+ }
+
+
+</script>
+
+<div id="sf_admin_container">
+<h1>Evento </h1>
+
+ <?php if ($sf_request->hasErrors()): ?>
+ <div class="form-errors">
+ <h2><?php echo __('There are some errors that prevent the form to validate') ?></h2>
+ <ul>
+ <?php foreach ($sf_request->getErrorNames() as $name): ?>
+ <li><?php echo $sf_request->getError($name) ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php elseif ($sf_flash->has('notice')): ?>
+ <div class="save-ok">
+ <h2><?php echo __($sf_flash->get('notice')) ?></h2>
+ </div>
+ <?php endif; ?>
+
+
+<?php echo form_tag('evento/edit', 'id=sf_admin_edit_form name=sf_admin_edit_form multipart=true') ?>
+
+<fieldset id="sf_fieldset_index" class="">
+
+ <div class="form-row">
+ <?php echo label_for('evento[titulo]', __('Titulo:'), 'class="required" ') ?>
+ <div class="content<?php if ($sf_request->hasError('evento{titulo}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('evento{titulo}')): ?>
+ <?php echo form_error('evento{titulo}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php echo object_input_tag($evento, 'getTitulo', array (
+ 'size' => 64,
+ 'control_name' => 'evento[titulo]',
+ )) ?>
+ </div>
+ </div>
+
+ <h2><?php echo __('Fecha y Hora') ?></h2>
+
+ <div class="form-row">
+ <?php echo label_for('evento[fecha_inicio]', __('Inicio:'), 'class="required" ') ?>
+ <div class="content<?php if ($sf_request->hasError('evento{fecha_inicio}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('evento{fecha_inicio}')): ?>
+ <?php echo form_error('evento{fecha_inicio}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php echo object_input_date_tag($evento, 'getFechaInicio', array (
+ 'rich' => true,
+// 'withtime' => true,
+ 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png',
+ 'control_name' => 'evento[fecha_inicio]',
+ )) ?>
+
+ <?php include_partial('hora_inicio', array ('evento' => $evento));?>
+ </div>
+ </div>
+
+
+ <div class="form-row">
+ <?php echo label_for('evento[fecha_fin]', __('Fin:'), 'class="required" ') ?>
+ <div class="content<?php if ($sf_request->hasError('evento{fecha_fin}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('evento{fecha_fin}')): ?>
+ <?php echo form_error('evento{fecha_fin}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php echo object_input_date_tag($evento, 'getFechaFin', array (
+ 'rich' => true,
+// 'withtime' => true,
+ 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png',
+ 'control_name' => 'evento[fecha_fin]',
+ )) ?>
+
+ <?php include_partial('hora_fin', array ('evento' => $evento));?>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <?php echo label_for('hora_asociada', __('Hora asociada:')) ?>
+ <div class="content">
+ <?php echo checkbox_tag('evento[hora_asociada]', 1, false, array('onChange'=>'javascrip:HabilitaDeshabilitaHora();')) ?>
+ </div>
+ </div>
+
+
+
+ <br>
+
+ <h2>
+ <?php echo __('Activar Repetición') ?>
+ <?php echo checkbox_tag('evento[activar]', 1, false, array('onChange'=>'javascrip:HabilitaDeshabilitaRepeticion();')) ?>
+ </h2>
+
+ <h4>Regla de recurrencia</h4>
+
+ <div class="form-row">
+ <?php echo radiobutton_tag('evento[frecuencia][]', '4', true, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'diaria\')') ) ?>Diaria
+ <?php echo radiobutton_tag('evento[frecuencia][]', '5', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'semana\')')) ?>Semanal
+ <?php echo radiobutton_tag('evento[frecuencia][]', '6', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'mensual\')')) ?>Mensual
+ <?php echo radiobutton_tag('evento[frecuencia][]', '7', false, array('disabled' => true, 'onChange' => 'javascript:mostrarRegla(\'anual\')')) ?>Anual
+ </div>
+
+ <div class="form-row" id="diaria" style="display:none">
+ Repetir cada <?php echo input_tag('evento[frecuencia_intervalo_diaria]', '1', array('disabled' => true, 'maxlength' => 3, 'size' => 3 )) ?> día(s)
+ </div>
+
+ <div class="form-row" id="semana" style="display:none">
+ Repetir cada <?php echo input_tag('evento[frecuencia_intervalo_semana]', '1', array('disabled' => true, 'maxlength' => 2, 'size' => 2 )) ?> semana(s)<br><br>
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '0', false, array('disabled' => true) ) ?>Domingo
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '1', false, array('disabled' => true) ) ?>Lunes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '2', false, array('disabled' => true) ) ?>Martes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '3', false, array('disabled' => true) ) ?>Miercoles
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '4', false, array('disabled' => true) ) ?>Jueves
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '5', false, array('disabled' => true) ) ?>Viernes
+ <?php echo checkbox_tag('evento[recurrencia_dias][]', '6', false, array('disabled' => true) ) ?>Sabado
+ </div>
+
+ <div class="form-row" id="mensual" style="display:none">
+ </div>
+
+ <div class="form-row" id="anual" style="display:none">
+ </div>
+
+
+ <h4>Rango de frecuencia</h4>
+ <div class="form-row">
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '0', true, array('disabled' => true, 'onClick' => 'javascript:deshabilitaRangoFrecuencia()') ) ?>Sin fecha de Finalización <br>
+
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '1', false, array('disabled' => true, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_frecuencia_fin_repeticion\')') ) ?>Terminar despues:
+ <?php echo input_tag('evento[frecuencia_fin_repeticion]', '1', array('disabled' => true, 'maxlength' => 4, 'size' => 4 )) ?> <br>
+
+ <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '2', false, array('disabled' => true, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_frecuencia_fin_fecha\')') ) ?>Terminar el:
+ <?php echo input_date_tag('evento[frecuencia_fin_fecha]', '', array ( 'rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png',
+ 'control_name' => 'evento[frecuencia_fin_fecha]', 'disabled' => true
+ )) ?><br>
+
+ </div>
+
+
+</fieldset>
+
+
+<ul class="sf_admin_actions">
+ <li><?php echo submit_tag(__('Grabar'), array (
+ 'name' => 'Grabar',
+ 'class' => 'sf_admin_action_save',
+)) ?></li>
+</ul>
+
+</form>
+</div>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/evento/templates/editSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * This file is part of Alba.
+ *
+ * Alba is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Alba is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Alba; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+/**
+ * relDivisionActividadDocente actions.
+ *
+ * @package alba
+ * @subpackage relDivisionActividadDocente
+ * @author José Luis Di Biase <josx(a)interorganic.com.ar>
+ * @author Héctor Sanchez <hsanchez(a)pressenter.com.ar>
+ * @author Fernando Toledo <ftoledo(a)pressenter.com.ar>
+ * @version SVN: $Id: actions.class.php 4492 2007-03-19 14:59:17Z josx $
+ * @filesource
+ * @license GPL
+ */
+class relDivisionActividadDocenteActions extends autorelDivisionActividadDocenteActions
+{
+}
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/generator.yml 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/generator.yml 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,26 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: RelDivisionActividadDocente
+ theme: default
+
+ fields:
+ fk_docente_id: { name: Docente }
+ fk_division_id: { name: División }
+ fk_actividad_id: { name: Actividad }
+ fk_repeticion_id: { name: Repetición }
+ fecha_inicio: {vname: Fecha Inicio, params: date_format='dd/MM/yy' }
+ fecha_fin: { name: Fecha fin , params: date_format='dd/MM/yy' }
+ hora_inicio: { name: Hora Inicio }
+ hora_fin: { name: Hora fin }
+
+ list:
+ title: Generación Manual de horarios por división
+ display: [ division, actividad , docente, fecha_inicio, fecha_fin, hora_inicio, hora_fin ]
+ object_actions:
+ _edit: -
+ _delete: -
+
+ edit:
+ title: Editar horarios
+ display: [ fk_division_id, fk_actividad_id , fk_docente_id, fecha_inicio, fecha_fin, hora_inicio, hora_fin ]
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/generator.yml
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/security.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/security.yml 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/security.yml 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,4 @@
+all:
+ is_secure: on
+ credentials: calendario
+
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/config/security.yml
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_fin.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_fin.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_fin.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,3 @@
+<?php use_helper('DateForm') ?>
+
+<?php echo select_time_tag("rel_division_actividad_docente[[hora_fin]", $rel_division_actividad_docente->getHoraFin(), array('include_second' => false, '12hour_time' => true));?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_fin.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_inicio.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_inicio.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_inicio.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -0,0 +1,3 @@
+<?php use_helper('DateForm') ?>
+
+<?php echo select_time_tag("rel_division_actividad_docente[hora_inicio]", $rel_division_actividad_docente->getHoraInicio(), array('include_second' => false, '12hour_time' => true));?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_hora_inicio.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Modified: prosistem/alba/trunk/alba/lib/model/Evento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/Evento.php 2007-04-25 21:24:42 UTC (rev 4586)
+++ prosistem/alba/trunk/alba/lib/model/Evento.php 2007-04-25 21:36:27 UTC (rev 4587)
@@ -9,4 +9,16 @@
*/
class Evento extends BaseEvento
{
+
+ function getHoraInicio() {
+ // si la hora de ambos es diferente de 00:00:00 entonces si tiene hora
+ }
+
+
+ function getHoraFin() {
+ // si la hora de ambos es diferente de 00:00:00 entonces si tiene hora
+ }
+
+
+
}
1
0
SVN Alba r4586 - prosistem/alba/trunk/alba/apps/principal/modules/establecimiento/templates
by commits@pressenter.com.ar 25 Apr '07
by commits@pressenter.com.ar 25 Apr '07
25 Apr '07
Author: hsanchez
Date: 2007-04-25 18:24:42 -0300 (Wed, 25 Apr 2007)
New Revision: 4586
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/establecimiento/templates/editLocacionSuccess.php
Log:
Agregando helper I18N
Modified: prosistem/alba/trunk/alba/apps/principal/modules/establecimiento/templates/editLocacionSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/establecimiento/templates/editLocacionSuccess.php 2007-04-25 21:11:32 UTC (rev 4585)
+++ prosistem/alba/trunk/alba/apps/principal/modules/establecimiento/templates/editLocacionSuccess.php 2007-04-25 21:24:42 UTC (rev 4586)
@@ -1,3 +1,4 @@
+<?php use_helper("I18N")?>
<?php if ($sf_flash->has('notice')):?>
<div class="save-ok">
<h2><?php echo $sf_flash->get('notice')?></h2>
1
0
25 Apr '07
Author: hsanchez
Date: 2007-04-25 18:11:32 -0300 (Wed, 25 Apr 2007)
New Revision: 4585
Modified:
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
Log:
Agregando tabla rel_rolresponsable_responsable
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-25 20:55:19 UTC (rev 4584)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-25 21:11:32 UTC (rev 4585)
@@ -39,5 +39,22 @@
PRIMARY KEY (`id`)
)Type=InnoDB;
+CREATE TABLE `rel_rolresponsable_responsable`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `fk_rolresponsable_id` INTEGER default 0 NOT NULL,
+ `fk_responsable_id` INTEGER default 0 NOT NULL,
+ `descripcion` VARCHAR(255) default "" NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_rolresponsable_responsable_FI_1` (`fk_rolresponsable_id`),
+ CONSTRAINT `rel_rolresponsable_responsable_FK_1`
+ FOREIGN KEY (`fk_rolresponsable_id`)
+ REFERENCES `rol_responsable` (`id`),
+ INDEX `rel_rolresponsable_responsable_FI_2` (`fk_responsable_id`),
+ CONSTRAINT `rel_rolresponsable_responsable_FK_2`
+ FOREIGN KEY (`fk_responsable_id`)
+ REFERENCES `responsable` (`id`)
+)Type=InnoDB;
+
SET FOREIGN_KEY_CHECKS = 1;
1
0
25 Apr '07
Author: ftoledo
Date: 2007-04-25 17:55:19 -0300 (Wed, 25 Apr 2007)
New Revision: 4584
Removed:
prosistem/alba/trunk/alba/web/uploads/1855678483454222c4857a1.jpg
prosistem/alba/trunk/alba/web/uploads/2146388489454254d185439.jpg
Log:
sacando temporales del svn
Deleted: prosistem/alba/trunk/alba/web/uploads/1855678483454222c4857a1.jpg
===================================================================
(Binary files differ)
Deleted: prosistem/alba/trunk/alba/web/uploads/2146388489454254d185439.jpg
===================================================================
(Binary files differ)
1
0
SVN Alba r4583 - prosistem/alba/trunk/alba/web/uploads/assets
by commits@pressenter.com.ar 25 Apr '07
by commits@pressenter.com.ar 25 Apr '07
25 Apr '07
Author: josx
Date: 2007-04-25 17:52:04 -0300 (Wed, 25 Apr 2007)
New Revision: 4583
Modified:
prosistem/alba/trunk/alba/web/uploads/assets/
Log:
cambio de propiedad para ignorar upload
Property changes on: prosistem/alba/trunk/alba/web/uploads/assets
___________________________________________________________________
Name: svn:ignore
-
+ *
1
0