[Alba-desarrollo] SVN Alba r4747 - in prosistem/alba/trunk/alba/apps/principal: lib modules/icalVisualizador/actions modules/icalVisualizador/templates modules/relDivisionActividadDocente/actions modules/relDivisionActividadDocente/templates

commits en pressenter.com.ar commits en pressenter.com.ar
Vie Jun 15 17:11:38 CEST 2007


Author: josx
Date: 2007-06-15 12:11:37 -0300 (Fri, 15 Jun 2007)
New Revision: 4747

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/verCalendarioPorDiaSuccess.php
Modified:
   prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
   prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_list_actions.php
Log:
Se agrego se prueba el uso del componente para mostrar como funciona

Modified: prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php	2007-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/lib/miExportadorIcal.class.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -36,10 +36,10 @@
     var $aFreq = array ( '', 'SECONDLY', 'MINUTELY' , 'HOURLY', 'DAILY' ,'WEEKLY', 'MONTHLY', 'YEARLY');
     var $aDias = array ( 'SA', 'FR', 'TH', 'WE', 'TU', 'MO', 'SU');
 
-    function exportar($aObj = array() ) {
+    function exportar($aObj = array(), $directo_a_browser = 1 ) {
         if(is_array($aObj)) {
             $v = new vcalendar();
-            $v->setConfig('DIRECTORY',sfConfig::get('sf_upload_dir_name')); //sfConfig::get('app_alba_tmpdir');
+            $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()) {
@@ -83,7 +83,12 @@
                     $v->addComponent($e);	
                 }
             }
-            $v->returnCalendar();
+            if($directo_a_browser == 1) {
+                $v->returnCalendar();
+            } else {
+                $v->saveCalendar();
+                return $v->getConfig('filename');
+            }
         } else {
             $error = 'No envío un array para la exportación';
             throw new Exception($error);

Modified: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php	2007-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -21,10 +21,7 @@
   public function executeIndex()
   {
 //     $this->date_component = "20070407";
-
-
     $this->archivo = "/tmp/pepe.ics";
-
     $this->date_component="20070404";
   }
 

Modified: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php	2007-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -1,3 +1,6 @@
+
+<link rel="stylesheet" type="text/css" href="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/css/icalVisualizador.css"/>
+
 <center>
 <div id="icalVisualizador">
 <table border="0" width="700" cellspacing="0" cellpadding="0">

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-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/actions/actions.class.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -94,6 +94,15 @@
     }
 
 
+    public function executeVerCalendarioPorDia() {
+        $this->executeList();
+        include("miExportadorIcal.class.php");
+        $e  = new miExportadorIcal();
+        $this->archivo = sfConfig::get('app_alba_tmpdir')."/".$e->exportar($this->pager->getResults(), 0);
+        $this->date_component = "";
+    }
+
+
     protected function updateRelDivisionActividadDocenteFromRequest($fk_evento_id = '') {
         $rel_division_actividad_docente = $this->getRequestParameter('rel_division_actividad_docente');
         if (isset($rel_division_actividad_docente['fk_division_id'])) {

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_list_actions.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_list_actions.php	2007-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/_list_actions.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -7,8 +7,12 @@
   'class' => 'sf_admin_action_create',
 )) ?></li>
 
-<li><?php echo button_to(__('export'), 'relDivisionActividadDocente/exportToIcal', array (
+<li><?php echo button_to(__('exportar'), 'relDivisionActividadDocente/exportToIcal', array (
   'class' => '',
 )) ?></li>
 
+<li><?php echo button_to(__('ver calendario'), 'relDivisionActividadDocente/verCalendarioPorDia', array (
+  'class' => '',
+)) ?></li>
+
 </ul>

Added: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/verCalendarioPorDiaSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/verCalendarioPorDiaSuccess.php	2007-06-13 19:48:59 UTC (rev 4746)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/verCalendarioPorDiaSuccess.php	2007-06-15 15:11:37 UTC (rev 4747)
@@ -0,0 +1,3 @@
+<?php
+    include_component('icalVisualizador', 'verPorDia', array('archivo' => $archivo, 'date_component' => $date_component));
+?>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/relDivisionActividadDocente/templates/verCalendarioPorDiaSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"




Más información sobre la lista de distribución Alba-desarrollo