[Alba-desarrollo] SVN Alba r5798 - in prosistem/alba/trunk/alba:
apps/principal/modules/relDivisionActividadDocente/actions
apps/principal/modules/relDivisionActividadDocente/templates
config data/sql
commits en pressenter.com.ar
commits en pressenter.com.ar
Mie Jul 30 19:42:54 CEST 2008
Author: josx
Date: 2008-07-30 14:42:54 -0300 (Wed, 30 Jul 2008)
New Revision: 5798
Added:
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/components.class.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_porDivision.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/cambiarDivisionSuccess.php
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_edit_form.php
prosistem/alba/trunk/alba/config/schema.yml
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql
Log:
Se agrega ajax para modificar actividad en funci?\195?\179n de divisi?\195?\179n en la generaci?\195?\179n de eventos. Adem?\195?\161s se cambia el tama?\195?\177o de 16 a 32 del campo recurrencia_fin de la tabla evento
Modified: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php 2008-07-30 06:15:05 UTC (rev 5797)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php 2008-07-30 17:42:54 UTC (rev 5798)
@@ -76,6 +76,14 @@
);
}
+ public function executeCambiarDivision() {
+ $this->fk_division_id = $this->getRequestParameter('rel_division_actividad_docente[fk_division_id]');
+ $division = DivisionPeer::retrieveByPk($this->fk_division_id);
+ $c = new Criteria();
+ $c->add(RelAnioActividadPeer::FK_ANIO_ID, $division->getFkAnioId());
+ $c->addJoin(ActividadPeer::ID, RelAnioActividadPeer::FK_ACTIVIDAD_ID);
+ $this->actividades = ActividadPeer::doSelect($c);
+ }
public function handleErrorEdit()
{
@@ -107,7 +115,7 @@
$this->date_component = "";
}
- $this->view = $this->getRequestParameter('view','verPorDia');
+ $this->view = $this->getRequestParameter('view','verPorDia');
// if($this->getRequestParameter('view')) {
// switch($this->getRequestParameter('view')) {
// case 'week': $this->view = 'verPorSemana'; break;
@@ -142,4 +150,4 @@
}
-?>
\ No newline at end of file
+?>
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/components.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/components.class.php (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/components.class.php 2008-07-30 17:42:54 UTC (rev 5798)
@@ -0,0 +1,46 @@
+<?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 components
+ *
+ * @package alba
+ * @subpackage relDivisionActividadDocente
+ * @author José Luis Di Biase <josx en interorganic.com.ar>
+ * @author Héctor Sanchez <hsanchez en pressenter.com.ar>
+ * @author Fernando Toledo <ftoledo en pressenter.com.ar>
+ * @version SVN: $Id: actions.class.php 4492 2007-03-19 14:59:17Z josx $
+ * @filesource
+ * @license GPL
+ */
+class relDivisionActividadDocenteComponents extends sfComponents
+{
+ public function executePorDivision() {
+ $c = new Criteria();
+ if($this->id_division) {
+ $division = DivisionPeer::retrieveByPk($this->id_division);
+ $c->add(RelAnioActividadPeer::FK_ANIO_ID, $division->getFkAnioId());
+ $c->addJoin(ActividadPeer::ID, RelAnioActividadPeer::FK_ACTIVIDAD_ID);
+ }
+ $actividades = ActividadPeer::doSelect($c);
+ $this->actividades = $actividades;
+ }
+}
+?>
Modified: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_edit_form.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_edit_form.php 2008-07-30 06:15:05 UTC (rev 5797)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_edit_form.php 2008-07-30 17:42:54 UTC (rev 5798)
@@ -2,6 +2,8 @@
// auto-generated by sfPropelAdmin
// date: 2007/05/02 13:04:37
?>
+<?php use_helper('Javascript') ?>
+
<?php echo form_tag('relDivisionActividadDocente/edit', array(
'id' => 'sf_admin_edit_form',
'name' => 'sf_admin_edit_form',
@@ -23,7 +25,14 @@
'related_class' => 'Division',
'control_name' => 'rel_division_actividad_docente[fk_division_id]',
'include_blank' => true,
-)); echo $value ? $value : ' ' ?>
+)); echo $value ? $value : ' ';
+
+ echo observe_field('rel_division_actividad_docente_fk_division_id',
+ array( 'update' => 'item_actividad',
+ 'url' => 'relDivisionActividadDocente/cambiarDivision',
+ 'with' => "'rel_division_actividad_docente[fk_division_id]=' + value"));
+
+?>
</div>
</div>
@@ -34,11 +43,16 @@
<?php echo form_error('rel_division_actividad_docente{fk_actividad_id}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
- <?php $value = object_select_tag($rel_division_actividad_docente, 'getFkActividadId', array (
- 'related_class' => 'Actividad',
- 'control_name' => 'rel_division_actividad_docente[fk_actividad_id]',
-)); echo $value ? $value : ' ' ?>
+ <div id="item_actividad">
+<?php include_component('relDivisionActividadDocente','porDivision',array(
+ 'id_division' => $rel_division_actividad_docente->getFkDivisionId(),
+ 'nombre' => 'rel_division_actividad_docente[fk_actividad_id]',
+ 'id_actividad' => $rel_division_actividad_docente->getFkActividadId(),
+));
+?>
</div>
+
+ </div>
</div>
<div class="form-row">
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_porDivision.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_porDivision.php (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_porDivision.php 2008-07-30 17:42:54 UTC (rev 5798)
@@ -0,0 +1,5 @@
+<?php
+echo select_tag($nombre, options_for_select(array(''=>'Seleccione')+
+ _get_options_from_objects($actividades),
+ isset($id_actividad)?$id_actividad:''),array());
+?>
Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/cambiarDivisionSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/cambiarDivisionSuccess.php (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/cambiarDivisionSuccess.php 2008-07-30 17:42:54 UTC (rev 5798)
@@ -0,0 +1,7 @@
+<?php use_helper('Object') ?>
+<?php include_partial('porDivision',array(
+ 'actividades'=>$actividades,
+ 'id_actividad'=>$sf_request->getParameter('rel_division_actividad_docente[fk_division_id]'),
+ 'nombre'=>'rel_division_actividad_docente[fk_division_id]'
+));
+?>
Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml 2008-07-30 06:15:05 UTC (rev 5797)
+++ prosistem/alba/trunk/alba/config/schema.yml 2008-07-30 17:42:54 UTC (rev 5798)
@@ -1620,7 +1620,7 @@
default: 0
recurrencia_fin:
type: VARCHAR
- size: 16
+ size: 32
required: false
recurrencia_dias:
type: INTEGER
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql 2008-07-30 06:15:05 UTC (rev 5797)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql 2008-07-30 17:42:54 UTC (rev 5798)
@@ -66,5 +66,7 @@
ALTER TABLE "boletin_conceptual" ALTER observacion DROP NOT NULL;
ALTER TABLE "boletin_actividades" ALTER observacion DROP NOT NULL;
+ALTER TABLE evento ALTER COLUMN recurrencia_fin TYPE VARCHAR (32);
+
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
Más información sobre la lista de distribución Alba-desarrollo