[Alba-desarrollo] SVN Alba r5230 - in prosistem/alba/trunk/alba:
apps/principal/config apps/principal/modules/informes/actions
apps/principal/modules/informes/templates data/sql
web/uploads web/uploads/informes
commits en pressenter.com.ar
commits en pressenter.com.ar
Lun Oct 22 17:03:24 CEST 2007
Author: josx
Date: 2007-10-22 12:03:23 -0300 (Mon, 22 Oct 2007)
New Revision: 5230
Added:
prosistem/alba/trunk/alba/web/uploads/informes/
prosistem/alba/trunk/alba/web/uploads/informes/certificado_de_terminac=
ion_de_estudios_primarios.odt
prosistem/alba/trunk/alba/web/uploads/informes/constancia_alumno_regul=
ar.odt
Modified:
prosistem/alba/trunk/alba/apps/principal/config/config.php
prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/acti=
ons.class.php
prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_e=
dit_form.php
prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_l=
ist_td_tabular.php
prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
Log:
Agregue dos informes por defecto (constancia de alumno regular y certific=
ado de terminacion de estudios primarios)
Modified: prosistem/alba/trunk/alba/apps/principal/config/config.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/config/config.php 2007-10-19=
21:24:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/apps/principal/config/config.php 2007-10-22=
15:03:23 UTC (rev 5230)
@@ -6,3 +6,8 @@
// symfony bootstraping
require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);
+
+sfConfig::add(array(
+ 'sf_informe_dir_name' =3D> $sf_informe_dir_name =3D 'informes',
+ 'sf_informe_dir' =3D> sfConfig::get('sf_root_dir').DIRECTORY_SEP=
ARATOR.sfConfig::get('sf_web_dir_name').DIRECTORY_SEPARATOR.sfConfig::get=
('sf_upload_dir_name').DIRECTORY_SEPARATOR.$sf_informe_dir_name
+));=20
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actio=
ns/actions.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php 2007-10-19 21:24:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php 2007-10-22 15:03:23 UTC (rev 5230)
@@ -79,7 +79,7 @@
$ext =3D substr($this->getRequest()->getFileName('file'),str=
rpos($this->getRequest()->getFileName('file'),'.'));
$realFileName =3D $this->getRequest()->getFileName('file');
$uniqueFileName =3D uniqid(rand()) . $ext;
- $this->getRequest()->moveFile('file', sfConfig::get('sf_uplo=
ad_dir').'/'.$uniqueFileName);
+ $this->getRequest()->moveFile('file', sfConfig::get('sf_info=
rme_dir').'/'.$uniqueFileName);
$adjunto =3D new Adjunto();=20
$adjunto->setFecha(date('Y-m-d'));
$adjunto->setNombreArchivo($realFileName);
@@ -119,7 +119,7 @@
=20
try
{
- unlink(sfConfig::get('sf_upload_dir')."/".$this->informe->getAdjun=
to()->getRuta());
+ unlink(sfConfig::get('sf_informe_dir')."/".$this->informe->getAdju=
nto()->getRuta());
$adjunto_id =3D $this->informe->getFkAdjuntoId();
$this->deleteInforme($this->informe);
$adjunto =3D AdjuntoPeer::retrieveByPk($adjunto_id);
@@ -300,7 +300,7 @@
$informe->setFkAdjuntoId();
$informe->save();
$adjunto =3D AdjuntoPeer::retrieveByPk($informe->getFkAdjuntoId(=
));
- unlink(sfConfig::get('sf_upload_dir')."/".$adjunto->getRuta());
+ unlink(sfConfig::get('sf_informe_dir')."/".$adjunto->getRuta());
$adjunto->delete();
return $this->redirect("informes?action=3Dedit&id=3D".$id);
}
@@ -412,9 +412,9 @@
$OOo->noErr =3D true;
$OOo->SetZipBinary('zip');
$OOo->SetUnzipBinary('unzip');
- $OOo->SetProcessDir(sfConfig::get('sf_upload_dir'));
+ $OOo->SetProcessDir(sfConfig::get('sf_informe_dir'));
$OOo->SetDataCharset('UTF8');
- $OOo->NewDocFromTpl(sfConfig::get('sf_upload_dir').'/'.$archivo)=
;
+ $OOo->NewDocFromTpl(sfConfig::get('sf_informe_dir').'/'.$archivo=
);
$OOo->LoadXmlFromDoc('content.xml');
=20
if(is_array($aDato)) {
Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templ=
ates/_edit_form.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_=
edit_form.php 2007-10-19 21:24:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_=
edit_form.php 2007-10-22 15:03:23 UTC (rev 5230)
@@ -47,7 +47,7 @@
<?php echo input_file_tag('file') ?>
<?php =20
if($informe->getAdjunto()) {
- ?><a href=3D"<?php echo sfContext::getInstance()->getRequest(=
)->getRelativeUrlRoot()."/".sfConfig::get('sf_upload_dir_name').'/'. $inf=
orme->getAdjunto()->getRuta()?>"><?php echo $informe->getAdjunto()->getNo=
mbreArchivo()?></a> <?php=20
+ ?><a href=3D"<?php echo sfContext::getInstance()->getRequest(=
)->getRelativeUrlRoot()."/".sfConfig::get('sf_upload_dir_name').'/'. sfCo=
nfig::get('sf_informe_dir_name').'/'.$informe->getAdjunto()->getRuta()?>"=
><?php echo $informe->getAdjunto()->getNombreArchivo()?></a> <=
?php=20
//- echo link_to("Borrar", "informes?action=3DborrarAdjunto&id=
=3D".$informe->getId());
echo " ";
}=20
Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templ=
ates/_list_td_tabular.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_=
list_td_tabular.php 2007-10-19 21:24:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/_=
list_td_tabular.php 2007-10-22 15:03:23 UTC (rev 5230)
@@ -2,7 +2,7 @@
<td><?php echo $informe->getDescripcion() ?></td>
<td>
<?php if($informe->getAdjunto()) { ?>
-<a href=3D"<?php echo sfContext::getInstance()->getRequest()->getRelativ=
eUrlRoot()."/".sfConfig::get('sf_upload_dir_name').'/'. $informe->getAdju=
nto()->getRuta()?>"><?php echo $informe->getAdjunto()->getNombreArchivo()=
?></a>
+<a href=3D"<?php echo sfContext::getInstance()->getRequest()->getRelativ=
eUrlRoot()."/".sfConfig::get('sf_upload_dir_name').'/'.sfConfig::get('sf_=
informe_dir_name').'/'. $informe->getAdjunto()->getRuta()?>"><?php echo $=
informe->getAdjunto()->getNombreArchivo()?></a>
<?php } ?>
<td><?php echo ($informe->getTipoinforme())?$informe->getTipoinforme=
()->getNombre():"" ?></td>
<td><?php echo $informe->getListado() ? image_tag(sfConfig::get('sf_=
admin_web_dir').'/images/tick.png') : ' ' ?></td>
Modified: prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-10-19 21=
:24:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-10-22 15=
:03:23 UTC (rev 5230)
@@ -315,4 +315,14 @@
=20
INSERT INTO `tipoinforme` (`id` ,`nombre` ,`descripcion`) VALUES (1 , 'A=
lumnos', 'Informes relacionados a los alumnos');
=20
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (1, NULL, NULL, 'constancia_alumn=
o_regular.odt', 'application/vnd.oasis.opendocument.text', 'constancia_al=
umno_regular.odt', '2007-10-17 00:00:00');
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (2, NULL, NULL, 'certificado_de_t=
erminacion_de_estudios_primarios.odt', 'application/vnd.oasis.opendocumen=
t.text', 'certificado_de_terminacion_de_estudios_primarios.odt', '2007-10=
-17 00:00:00');
+
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (1, 'Constancia de Alu=
mno regular', 'Constancia de Alumno regular', 1, 1, 0, '');
+
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (2, 'Certificado de te=
rminacion de estudios primarios', 'Certificado de terminacion de estudios=
primarios', 2, 1, 0, '');
+
+
SET FOREIGN_KEY_CHECKS =3D 1;
Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-10-19 21:24=
:08 UTC (rev 5229)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-10-22 15:03=
:23 UTC (rev 5230)
@@ -3454,5 +3454,15 @@
=20
INSERT INTO `tipoinforme` (`id` ,`nombre` ,`descripcion`) VALUES (1 , 'A=
lumnos', 'Informes relacionados a los alumnos');
=20
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (1, NULL, NULL, 'constancia_alumn=
o_regular.odt', 'application/vnd.oasis.opendocument.text', 'constancia_al=
umno_regular.odt', '2007-10-17 00:00:00');
+
+INSERT INTO `adjunto` (`id`, `descripcion`, `titulo`, `nombre_archivo`, =
`tipo_archivo`, `ruta`, `fecha`) VALUES (2, NULL, NULL, 'certificado_de_t=
erminacion_de_estudios_primarios.odt', 'application/vnd.oasis.opendocumen=
t.text', 'certificado_de_terminacion_de_estudios_primarios.odt', '2007-10=
-17 00:00:00');
+
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (1, 'Constancia de Alu=
mno regular', 'Constancia de Alumno regular', 1, 1, 0, '');
+
+INSERT INTO `informe` (`id`, `nombre`, `descripcion`, `fk_adjunto_id`, `=
fk_tipoinforme_id`, `listado`, `variables`) VALUES (2, 'Certificado de te=
rminacion de estudios primarios', 'Certificado de terminacion de estudios=
primarios', 2, 1, 0, '');
+
+
SET FOREIGN_KEY_CHECKS =3D 1;
=20
Added: prosistem/alba/trunk/alba/web/uploads/informes/certificado_de_term=
inacion_de_estudios_primarios.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/uploads/informes/certi=
ficado_de_terminacion_de_estudios_primarios.odt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/uploads/informes/constancia_alumno_r=
egular.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/uploads/informes/const=
ancia_alumno_regular.odt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
--=20
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que est=E1 limpio.
For all your IT requirements visit: http://www.transtec.co.uk
Más información sobre la lista de distribución Alba-desarrollo