[Alba-desarrollo] SVN Alba r4855 - in prosistem/alba/trunk/alba:
apps/principal/lib apps/principal/modules/horarioescolar/actions
apps/principal/modules/horarioescolar/templates data/sql
commits en pressenter.com.ar
commits en pressenter.com.ar
Vie Jul 20 21:32:18 CEST 2007
Author: josx
Date: 2007-07-20 16:32:16 -0300 (Fri, 20 Jul 2007)
New Revision: 4855
Added:
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/verCalendarioSuccess.php
Removed:
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_dia.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_fin.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_inicio.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarFormSuccess.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarSuccess.php
Modified:
prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
Log:
Se agrego ver Calendario desde hora escolar y se modifico el exportar a ical para poder ser invocado desde cualquier lado
Modified: prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -41,41 +41,36 @@
$v = new vcalendar();
$v->setConfig('DIRECTORY',sfConfig::get('app_alba_tmpdir')); //sfConfig::get('app_alba_tmpdir');
- foreach ($aObj as $rel_division_actividad_docente) {
- if($rel_division_actividad_docente->getEvento()) {
+ foreach ($aObj as $link_evento) {
+ if($link_evento->getEvento()) {
$e = new vevent();
- $e->setProperty( 'DESCRIPTION', 'Horas de maestro/profesor' );
- $e->setProperty('SUMMARY', $rel_division_actividad_docente->getDivision()."-".$rel_division_actividad_docente->getActividad()."-".$rel_division_actividad_docente->getDocente());
+ $e->setProperty( 'DESCRIPTION', '' );
+ $e->setProperty('SUMMARY', $link_evento->getEvento()->getTitulo());
$e->setProperty('class', 'PUBLIC');
- $aFechaInicio = getdate(strtotime($rel_division_actividad_docente->getEvento()->getFechaInicio()));
+ $aFechaInicio = getdate(strtotime($link_evento->getEvento()->getFechaInicio()));
$e->setProperty('dtstart', $aFechaInicio['year'], $aFechaInicio['mon'],$aFechaInicio['mday'], $aFechaInicio['hours'], $aFechaInicio['minutes'], 0);
- $aFechaFin = getdate(strtotime($rel_division_actividad_docente->getEvento()->getFechaFin()));
+ $aFechaFin = getdate(strtotime($link_evento->getEvento()->getFechaFin()));
$e->setProperty('dtend', $aFechaFin['year'], $aFechaFin['mon'],$aFechaFin['mday'], $aFechaFin['hours'], $aFechaFin['minutes'], 0);
-// $segundos = strtotime($rel_division_actividad_docente->getEvento()->getFechaFin())-strtotime($rel_division_actividad_docente->getEvento()->getFechaInicio());
-// $horas = floor($segundos / 3600);
-// $minutos = floor(($segundos - ($horas * 3600)) / 60);
-// $segundos = $segundos - ($horas * 60) - ($minutos * 60);
-// $e->setProperty('DURATION', '','', $horas, $minutos);
$e->setProperty('dtstamp', gmdate('Ymd\THi00\Z'));
- if($rel_division_actividad_docente->getEvento()->getFrecuencia()) {
- $freq = $this->aFreq[$rel_division_actividad_docente->getEvento()->getFrecuencia()];
- $interval = $rel_division_actividad_docente->getEvento()->getFrecuenciaIntervalo();
+ if($link_evento->getEvento()->getFrecuencia()) {
+ $freq = $this->aFreq[$link_evento->getEvento()->getFrecuencia()];
+ $interval = $link_evento->getEvento()->getFrecuenciaIntervalo();
$aRrule = array();
$aRrule['FREQ'] = $freq;
$aRrule['INTERVAL'] = $interval;
if($freq == "WEEKLY") {
- $aRrule['BYDAY'] = array_chunk(explode ( ",", $rel_division_actividad_docente->getEvento()->getRecurrenciaDiasIcal()),1);
+ $aRrule['BYDAY'] = array_chunk(explode ( ",", $link_evento->getEvento()->getRecurrenciaDiasIcal()),1);
}
- if($rel_division_actividad_docente->getEvento()->getRecurrenciaFin() != "") {
- if(is_numeric($rel_division_actividad_docente->getEvento()->getRecurrenciaFin())) {
- $aRrule['COUNT'] = $rel_division_actividad_docente->getEvento()->getRecurrenciaFin();
+ if($link_evento->getEvento()->getRecurrenciaFin() != "") {
+ if(is_numeric($link_evento->getEvento()->getRecurrenciaFin())) {
+ $aRrule['COUNT'] = $link_evento->getEvento()->getRecurrenciaFin();
} else {
- $aRrule['UNTIL'] = gmdate('Ymd\THi00\Z',strtotime($rel_division_actividad_docente->getEvento()->getRecurrenciaFin()));
+ $aRrule['UNTIL'] = gmdate('Ymd\THi00\Z',strtotime($link_evento->getEvento()->getRecurrenciaFin()));
}
}
$e->setProperty( 'rrule' , $aRrule);
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-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -108,6 +108,32 @@
+ public function executeVerCalendario() {
+ $this->executeList();
+ include("miExportadorIcal.class.php");
+ $e = new miExportadorIcal();
+ $this->archivo = sfConfig::get('app_alba_tmpdir')."/".$e->exportar($this->pager->getResults(), 0);
+ if($this->getRequestParameter('date')) {
+ $this->date_component = $this->getRequestParameter('date');
+ } else {
+ $this->date_component = "";
+ }
+
+ if($this->getRequestParameter('view')) {
+ switch($this->getRequestParameter('view')) {
+ case 'week': $this->view = 'verPorSemana'; break;
+ case 'day': $this->view = 'verPorDia'; break;
+ default: $this->view = 'verPorDia';
+ }
+ } else {
+ $this->view = "verPorDia";
+ }
+ }
+
+
+
+
+
function _add_zeros($string, $strlen) {
if ($strlen > strlen($string)) {
for ($x = strlen($string); $x < $strlen; $x++) {
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_dia.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_dia.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_dia.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -1,4 +0,0 @@
-<?php
-use_helper('Misc');
-echo select_tag("horarioescolar[dia]", options_for_select(diasDeLaSemana(1), $horarioescolar->getDia()));
-?>
\ No newline at end of file
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_fin.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_fin.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_fin.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -1,3 +0,0 @@
-<?php use_helper('DateForm') ?>
-
-<?php echo select_time_tag("horarioescolar[hora_fin]", $horarioescolar->getHoraFin(), array('include_second' => false, '12hour_time' => true));?>
\ No newline at end of file
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_inicio.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_inicio.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_hora_inicio.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -1,3 +0,0 @@
-<?php use_helper('DateForm') ?>
-
-<?php echo select_time_tag("horarioescolar[hora_inicio]", $horarioescolar->getHoraInicio(), array('include_second' => false, '12hour_time' => true));?>
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -6,7 +6,7 @@
<li><?php echo button_to(__('create'), 'horarioescolar/create', array (
'class' => 'sf_admin_action_create',
)) ?></li>
- <li><?php echo button_to(__('Ver Calendario'), 'horarioescolar/mostrar', array (
+ <li><?php echo button_to(__('Ver Calendario'), 'horarioescolar/verCalendario', array (
'style' => 'background: #ffc url(/sf/sf_admin/images/default_icon.png) no-repeat 3px 2px',
)) ?></li>
</ul>
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarFormSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarFormSuccess.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarFormSuccess.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -1,54 +0,0 @@
-<script>
- function linkTo(flag) {
- var obje = document.getElementById('establecimiento_id');
-
-
- var objc = document.getElementById('ciclolectivo_id');
- var url = "<?php echo url_for('horarioescolar/mostrarForm', false);?>/establecimiento_id/"+obje.options[obje.selectedIndex].value;
-
- if(flag == 0) {
- url = url + "/ciclolectivo_id/"+objc.options[objc.selectedIndex].value;
- }
-
- location.href = url;
- }
-</script>
-
-
-<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
-
-<h1><?php echo __('Ver Horario Escolar',
-array()) ?></h1>
-
-<div id="sf_admin_content">
-
-<?php echo form_tag('horarioescolar/mostrar', 'id=sf_admin_edit_form name=sf_admin_edit_form multipart=true') ?>
-
-<?php //echo object_input_hidden_tag($horarioescolar, 'getId') ?>
-
-<fieldset id="sf_fieldset_none" class="">
- <div class="form-row">
- <?php echo label_for('establecimiento_id', __('Establecimiento:'), 'class="required" ') ?>
- <?php echo select_tag('establecimiento_id', options_for_select($optionsEstablecimiento,$establecimiento_id), 'onChange=linkTo(1)') ?>
- </div>
-
- <div class="form-row">
- <?php echo label_for('ciclolectivo_id', __('Ciclo Lectivo:'), 'class="required" ') ?>
- <?php echo select_tag('ciclolectivo_id', options_for_select($optionsCiclolectivo,$ciclolectivo_id), 'onChange=linkTo(0)') ?>
- </div>
-
-
- <div class="form-row">
- <?php echo label_for('turnos_id', __('Turnos:'), 'class="required" ') ?>
- <?php echo select_tag('turnos_id', options_for_select($optionsTurnos)) ?>
- </div>
-
-</fieldset>
- <ul class="sf_admin_actions">
- <li><?php echo submit_tag(__('Mostrar'), array (
- 'name' => 'Mostrar',
- 'class' => 'sf_admin_action_save',
-)) ?></li>
-</ul>
-
-</form>
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarSuccess.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/mostrarSuccess.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -1,91 +0,0 @@
-<script>
- function linkTo(flag) {
- var obje = document.getElementById('establecimiento_id');
-
-
- var objc = document.getElementById('ciclolectivo_id');
- var url = "<?php echo url_for('horarioescolar/mostrar', false);?>/establecimiento_id/"+obje.options[obje.selectedIndex].value;
-
- if(flag == 0) {
- url = url + "/ciclolectivo_id/"+objc.options[objc.selectedIndex].value;
- }
-
- location.href = url;
- }
-</script>
-
-
-<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
-
-<h1><?php echo __('Ver Horario Escolar',
-array()) ?></h1>
-
-<div id="sf_admin_container">
-
-<table>
-<tr>
-<td>
-
-<?php echo form_tag('horarioescolar/mostrar', 'id=sf_admin_edit_form name=sf_admin_edit_form multipart=true') ?>
-
-<?php //echo object_input_hidden_tag($horarioescolar, 'getId') ?>
-
-<fieldset id="sf_fieldset_none" class="">
-<!--
- <div class="form-row">
- <?php echo label_for('establecimiento_id', __('Establecimiento:'), 'class="required" ') ?>
- <?php echo select_tag('establecimiento_id', options_for_select($optionsEstablecimiento,$establecimiento_id), 'onChange=linkTo(1)') ?>
- </div>
-
- <div class="form-row">
- <?php echo label_for('ciclolectivo_id', __('Ciclo Lectivo:'), 'class="required" ') ?>
- <?php echo select_tag('ciclolectivo_id', options_for_select($optionsCiclolectivo,$ciclolectivo_id), 'onChange=linkTo(0)') ?>
- </div>
-
--->
- <div class="form-row">
- <?php echo label_for('turnos_id', __('Turnos:'), 'class="required" ') ?>
- <?php echo select_tag('turnos_id', options_for_select($optionsTurnos, $turnos_id)) ?>
- </div>
-
-<!--
-<div class="form-row">
- <?php echo label_for('time_interval', __('Intervalo de tiempo:'), 'class="required" ') ?>
- <?php echo select_tag('time_interval', options_for_select(array('15' => '15','30' => '30','45' => '45','60' => '60'),$time_interval)) ?>
- Minutos
- </div>
--->
-<?php echo input_hidden_tag('time_interval', 15) ?>
-
-</fieldset>
- <ul class="sf_admin_actions">
- <li><?php echo submit_tag(__('Mostrar'), array (
- 'name' => 'Mostrar',
- 'class' => 'sf_admin_action_save',
-)) ?></li>
-
-<li><input value="Listado de Horario Escolar" type="button" onclick="document.location.href='<?=sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/horarioescolar';" /></li>
-
-</ul>
-
-</form>
-</td>
-
-<td>
-
-
-
-<?php
-use_helper("CalendarWeek");
-echo loadCalendar($aDay, $aHour, $aEvent, $aDayNames, $time_interval, false, 82, 15);
-?>
-</td>
-
-
-</tr>
-
-
-</table>
-
-
-
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/verCalendarioSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/verCalendarioSuccess.php 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/verCalendarioSuccess.php 2007-07-20 19:32:16 UTC (rev 4855)
@@ -0,0 +1,3 @@
+<?php
+ include_component('icalVisualizador', $view, array('archivo' => $archivo, 'date_component' => $date_component));
+?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/verCalendarioSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-20 17:50:42 UTC (rev 4854)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-20 19:32:16 UTC (rev 4855)
@@ -76,3 +76,4 @@
SET FOREIGN_KEY_CHECKS = 1;
+
\ No newline at end of file
Más información sobre la lista de distribución Alba-desarrollo