SVN Alba r5153 - in prosistem/alba/trunk/alba/apps/principal/modules: evento/actions horarioescolar/actions relDivisionActividadDocente/actions
Author: josx Date: 2007-09-26 11:51:46 -0300 (Wed, 26 Sep 2007) New Revision: 5153 Modified: prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php Log: Ahora graba el nombre del evento para ser mostrado en los calendarios 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-09-26 13:33:05 UTC (rev 5152) +++ prosistem/alba/trunk/alba/apps/principal/modules/evento/actions/actions.class.php 2007-09-26 14:51:46 UTC (rev 5153) @@ -234,7 +234,7 @@ $this->evento->setRecurrenciaFin($value); break; } - } + } } Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php 2007-09-26 13:33:05 UTC (rev 5152) +++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php 2007-09-26 14:51:46 UTC (rev 5153) @@ -42,7 +42,10 @@ if ($this->getRequest()->getMethod() == sfRequest::POST) { $evento = $this->getRequestParameter('evento'); if($evento['fecha_inicio'] AND $evento['fecha_fin']) { - $this->evento = $evento_generico->updateEventoFromRequest($this->evento, $this->getRequestParameter('evento'), $this->getUser()->getCulture()); + $e = $this->getRequestParameter('evento'); + $h = $this->getRequestParameter('horarioescolar'); + $e['titulo'] = $h["nombre"]; + $this->evento = $evento_generico->updateEventoFromRequest($this->evento, $e, $this->getUser()->getCulture()); $this->evento->save(); $this->forward404Unless($this->evento); $this->updateHorarioescolarFromRequest($this->evento->getId()); @@ -63,38 +66,35 @@ } } - - protected function updateHorarioescolarFromRequest($fk_evento_id = '') { $horarioescolar = $this->getRequestParameter('horarioescolar'); - if ($fk_evento_id) { + if ($fk_evento_id) { $this->horarioescolar->setFkEventoId($fk_evento_id); - } else { + } else { $this->horarioescolar->setFkEventoId(null); - } + } - if (isset($horarioescolar['nombre'])) - { - $this->horarioescolar->setNombre($horarioescolar['nombre']); + if (isset($horarioescolar['nombre'])) { + $this->horarioescolar->setNombre($horarioescolar['nombre']); + } + + if (isset($horarioescolar['descripcion'])) { + $this->horarioescolar->setDescripcion($horarioescolar['descripcion']); + } + + if (isset($horarioescolar['fk_horarioescolartipo_id'])) { + $this->horarioescolar->setFkHorarioescolartipoId($horarioescolar['fk_horarioescolartipo_id']); + } + + if (isset($horarioescolar['fk_establecimiento_id'])) { + $this->horarioescolar->setFkEstablecimientoId($horarioescolar['fk_establecimiento_id']); + } + + if (isset($horarioescolar['fk_turno_id'])) { + $this->horarioescolar->setFkTurnoId($horarioescolar['fk_turno_id']); + } } - if (isset($horarioescolar['descripcion'])) - { - $this->horarioescolar->setDescripcion($horarioescolar['descripcion']); - } - if (isset($horarioescolar['fk_horarioescolartipo_id'])) - { - $this->horarioescolar->setFkHorarioescolartipoId($horarioescolar['fk_horarioescolartipo_id']); - } - if (isset($horarioescolar['fk_establecimiento_id'])) - { - $this->horarioescolar->setFkEstablecimientoId($horarioescolar['fk_establecimiento_id']); - } - if (isset($horarioescolar['fk_turno_id'])) - { - $this->horarioescolar->setFkTurnoId($horarioescolar['fk_turno_id']); - } - } function addFiltersCriteria($c) { 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 2007-09-26 13:33:05 UTC (rev 5152) +++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php 2007-09-26 14:51:46 UTC (rev 5153) @@ -32,36 +32,38 @@ */ class relDivisionActividadDocenteActions extends autorelDivisionActividadDocenteActions { - public function executeEdit() - { + public function executeEdit() { + $evento_generico = new miEvento(); - $evento_generico = new miEvento(); + $this->rel_division_actividad_docente = $this->getRelDivisionActividadDocenteOrCreate(); + $this->evento = $evento_generico->getEventoOrCreate($this->rel_division_actividad_docente->getFkEventoId()); - $this->rel_division_actividad_docente = $this->getRelDivisionActividadDocenteOrCreate(); - $this->evento = $evento_generico->getEventoOrCreate($this->rel_division_actividad_docente->getFkEventoId()); - - if ($this->getRequest()->getMethod() == sfRequest::POST) { + if ($this->getRequest()->getMethod() == sfRequest::POST) { + $e = $this->getRequestParameter('evento'); + $r = $this->getRequestParameter('rel_division_actividad_docente'); + $division = DivisionPeer::retrieveByPk($r["fk_division_id"]); + $actividad = ActividadPeer::retrieveByPk($r["fk_actividad_id"]); + $docente = DocentePeer::retrieveByPk($r["fk_docente_id"]); + $e['titulo'] = $division." - ".$actividad->getNombre(); + $this->evento = $evento_generico->updateEventoFromRequest($this->evento, $e, $this->getUser()->getCulture()); + $this->evento->save(); + $this->forward404Unless($this->evento); - $this->evento = $evento_generico->updateEventoFromRequest($this->evento, $this->getRequestParameter('evento'), $this->getUser()->getCulture()); - $this->evento->save(); - $this->forward404Unless($this->evento); + $this->updateRelDivisionActividadDocenteFromRequest($this->evento->getId()); + $this->saveRelDivisionActividadDocente($this->rel_division_actividad_docente); - $this->updateRelDivisionActividadDocenteFromRequest($this->evento->getId()); - $this->saveRelDivisionActividadDocente($this->rel_division_actividad_docente); - - $this->setFlash('notice', 'Your modifications have been saved'); - if ($this->getRequestParameter('save_and_add')) { - return $this->redirect('relDivisionActividadDocente/create'); - } - else if ($this->getRequestParameter('save_and_list')) { - return $this->redirect('relDivisionActividadDocente/list'); - } else { - return $this->redirect('relDivisionActividadDocente/edit?id='.$this->rel_division_actividad_docente->getId()); - } - } else { - $this->labels = $this->getLabels(); + $this->setFlash('notice', 'Your modifications have been saved'); + if ($this->getRequestParameter('save_and_add')) { + return $this->redirect('relDivisionActividadDocente/create'); + } else if ($this->getRequestParameter('save_and_list')) { + return $this->redirect('relDivisionActividadDocente/list'); + } else { + return $this->redirect('relDivisionActividadDocente/edit?id='.$this->rel_division_actividad_docente->getId()); + } + } else { + $this->labels = $this->getLabels(); + } } - } protected function getLabels() {
participants (1)
-
commits@pressenter.com.ar