[Alba-desarrollo] SVN Alba r4153 - in
prosistem/alba/trunk/alba/apps/principal/modules/asistencia:
actions templates validate
commits en pressenter.com.ar
commits en pressenter.com.ar
Vie Feb 2 22:20:19 CET 2007
Author: hsanchez
Date: 2007-02-02 18:20:17 -0300 (Fri, 02 Feb 2007)
New Revision: 4153
Removed:
prosistem/alba/trunk/alba/apps/principal/modules/asistencia/validate/m=
ostrar.yml
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/ac=
tions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/asistencia/templates/=
indexSuccess.php
Log:
cambios en asistencia
Modified: prosistem/alba/trunk/alba/apps/principal/modules/asistencia/act=
ions/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/asistencia/actions/a=
ctions.class.php 2007-02-02 20:38:21 UTC (rev 4152)
+++ prosistem/alba/trunk/alba/apps/principal/modules/asistencia/actions/a=
ctions.class.php 2007-02-02 21:20:17 UTC (rev 4153)
@@ -48,13 +48,12 @@
//Datos por default=20
$alumno_id =3D -1;
$cuenta_id =3D -1;
- $fechainicio =3D date("d/m/Y"); =20
+ list($d, $m, $y) =3D split("[/. -]",date("d/m/Y"));
$datos =3D array();
$idxAlumno=3D array();=20
$this->vista_id =3D 1; =20
$this->division_id =3D0;
$aFeriado =3D array();
- =20
//Asignacion por parametro =20
if ($this->getRequestParameter('alumno_id')) {
$alumno_id =3D $this->getRequestParameter('alumno_id'); =20
@@ -65,15 +64,12 @@
if ($this->getRequestParameter('vistas'))
$this->vista_id =3D $this->getRequestParameter('vistas'); =
=20
=20
- if ($this->getRequestParameter('fechainicio'))
- $fechainicio =3D $this->getRequestParameter('fechainicio');
- =20
- // if (!dateValidate($fechainicio))
- // $fechainicio =3D date("d/m/Y"); =20
- =20
- list($d, $m, $y) =3D split("[/. -]",$fechainicio);
- list($y, $m, $d) =3D split("[/. -]",date ("Y-m-d", mktime (0,0,0=
,$m,$d,$y))); =20
- $this->fechainicio =3D "$y-$m-$d";
+ if ($this->getRequestParameter('dia'))
+ $d =3D $this->getRequestParameter('dia');
+ if ($this->getRequestParameter('mes'))
+ $m =3D $this->getRequestParameter('mes');
+ if ($this->getRequestParameter('ano'))
+ $y =3D $this->getRequestParameter('ano');
=20
$aIntervalo =3D array(); =20
$aIntervalo =3D diasxintervalo($d,$m,$y,$this->vista_id); =20
@@ -117,7 +113,7 @@
$s .=3D "AND asistencia.FECHA ";
$s .=3D "IN (";
for($i=3D0, $max =3D count($aIntervalo); $i < $max ;$i++) {=20
- $s .=3D "'".$aIntervalo[$i]."'";
+ $s .=3D "'".$aIntervalo[$i]." 00:00:00'";
if ($i < count($aIntervalo)-1 )
$s .=3D ",";
}
@@ -136,7 +132,6 @@
=20
$totales =3D array(); =20
$tot =3D 0;
-
foreach ($alumnos as $alumno){
$idxAlumno[$alumno['id']] =3D $alumno['apellido']." ". $alum=
no['nombre'];
if ($alumno['fecha']) {
@@ -189,15 +184,16 @@
=20
=20
}
- //print_r($optionsDivision);
//Asignacion de variables para el template
+ $this->d =3D $d;
+ $this->m =3D $m;
+ $this->y =3D $y;
$this->aTipoasistencias =3D $aTipoasistencias;
$this->aAlumnos =3D $idxAlumno;
$this->aDatos =3D $datos;
$this->optionsDivision =3D $optionsDivision; =20
$this->aVistas =3D repeticiones();
$this->aMeses =3D Meses();
- $this->m =3D $m;
$this->aIntervalo =3D $aIntervalo;
$this->aPorcentajeAsistencia =3D $aPorcentajeAsistencia;
$this->aFeriado =3D $aFeriado;
@@ -216,8 +212,10 @@
public function executeMostrar() {
$vista_id =3D $this->getRequestParameter('vistas');
$vista =3D $this->getRequestParameter('vista');
- $fechainicio =3D str_replace("/","-",$this->getRequestParameter('fec=
hainicio'));
- return $this->forward('asistencia','index',"vista_id=3D$vista_id&fec=
hainicio=3D$fechainicio"); =20
+ $d =3D $this->getRequestParameter('dia');
+ $m =3D $this->getRequestParameter('mes');
+ $y =3D $this->getRequestParameter('ano');
+ return $this->forward('asistencia','index',"vista_id=3D$vista_id&dia=
=3D$d&mes=3D$m&ano=3D$y"); =20
}
=20
public function handleErrorMostrar(){
@@ -235,10 +233,10 @@
// tomando los datos del formulario
$division_id =3D $this->getRequestParameter('division_id');
$vista_id =3D $this->getRequestParameter('vista_id');
- $fechainicio =3D $this->getRequestParameter('fechainicio');
- list($y, $m, $d) =3D split("[/. -]",$fechainicio); =20
- $fechainicio =3D "$d-$m-$y";
- $destino =3D "asistencia?division_id=3D$division_id&fechainicio=3D=
$fechainicio&vistas=3D$vista_id";
+ $d =3D $this->getRequestParameter('dia');
+ $m =3D $this->getRequestParameter('mes');
+ $y =3D $this->getRequestParameter('ano');
+ $destino =3D "asistencia?division_id=3D$division_id&dia=3D$d&mes=
=3D$m&ano=3D$y&vistas=3D$vista_id";
if ($this->getRequestParameter('alumno_id')) {
$alumno_id =3D $this->getRequestParameter('alumno_id'); =20
$destino .=3D "&alumno_id=3D$alumno_id";
@@ -249,8 +247,6 @@
if($cantAsistencia > 0) {
// tomo los tipos de asistencias
$aDatosTablaTipoAsistencias =3D $this->getTiposasistencias()=
;
- //print_r($aDatosTablaTipoAsistencias);
- //die(); =20
//grabo al disco
$con =3D Propel::getConnection();
try {
Modified: prosistem/alba/trunk/alba/apps/principal/modules/asistencia/tem=
plates/indexSuccess.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/asistencia/templates=
/indexSuccess.php 2007-02-02 20:38:21 UTC (rev 4152)
+++ prosistem/alba/trunk/alba/apps/principal/modules/asistencia/templates=
/indexSuccess.php 2007-02-02 21:20:17 UTC (rev 4153)
@@ -30,9 +30,6 @@
* @license GPL
*/
?> =20
-<?php use_helper('Date') ?>
-<?php use_helper('ZZDate') ?>
-
<h1>Asistencias</h1>
<?php if ($sf_request->hasErrors()): ?>
<div class=3D"form-errors">
@@ -44,7 +41,7 @@
</ul>
</div>
<?php endif ?>
- <?php echo form_tag('asistencia/mostrar', 'id=3Dsf_admin_edit_form n=
ame=3Dsf_admin_edit_form multipart=3Dtrue ') ?> =20
+ <?php echo form_tag('asistencia/mostrar', 'id=3Dsf_admin_edit_form n=
ame=3Dsf_admin_edit_form multipart=3Dtrue') ?>
<fieldset id=3D"sf_fieldset_none" class=3D"">
<div class=3D"form-row">
<table cellspacing=3D"1">
@@ -56,16 +53,17 @@
<?php echo select_tag('division_id', options_for_sel=
ect($optionsDivision, $division_id)); ?>
</td>
<td>
- <?php echo label_for('fecha', __('Fecha Inicio:'), '=
class=3D"required" '); ?> =20
+ <?php echo label_for('fecha', __('Fecha Inicio:'), '=
class=3D"required" '); ?> =20
</td>
<td>
- <?php echo zz_input_date_tag('fechainicio',$fechaini=
cio, array (
- 'rich' =3D> true,'withtime' =3D> true,
- 'calendar_button_img' =3D> '/sf/images/sf_admin/da=
te.png',
- 'control_name' =3D> 'fechainicio'));?>
+ <?php //----- Nuevo -----//
+ //@TODO Obtener el a=F1o de inicio y de fin de=
l cliclo lectivo=20
+ echo select_day_tag('dia', $d, 'include_custom=
=3DElija un dia') ?>
+ <?php echo select_month_tag('mes', $m, 'include_cust=
om=3DElija un mes use_short_month=3Dtrue') ?>
+ <?php echo select_year_tag('ano', $y, 'include_custo=
m=3DElija un año year_end=3D2007 year_start=3D2007') ?>
</td>
<td>
- <? echo label_for('vista', __('Vista:'), 'class=3D"r=
equired" '); ?>
+ <?php echo label_for('vista', __('Vista:'), 'class=3D=
"required" '); ?>
</td>
<td> =20
<?php echo select_tag('vistas', options_for_select($=
aVistas,$vista_id)); ?>
@@ -85,7 +83,9 @@
</form>
<?php echo form_tag('asistencia/grabar', 'id=3Dsf_admin_edit_form name=3D=
sf_admin_edit_form multipart=3Dtrue');
echo input_hidden_tag('division_id', $division_id);=20
- echo input_hidden_tag('fechainicio', $fechainicio);=20
+ echo input_hidden_tag('dia', $d);=20
+ echo input_hidden_tag('mes', $m);=20
+ echo input_hidden_tag('ano', $y); =20
echo input_hidden_tag('vista_id', $vista_id);=20
if($alumno_id >=3D 0)
echo input_hidden_tag('alumno_id', $alumno_id);
@@ -98,7 +98,6 @@
<tr>
<th id=3D"sf_admin_list_th_alumno"> Alumnos / Días </th>
<?php
- //$aIntervalo =3D diasxintervalo($d,$m,$y,$vista_id);
for($i=3D0, $max =3D count($aIntervalo); $i < $max ;$i++) { =
?>
<th id=3D"sf_admin_list_th_sf_actions"><?php echo date("=
d",strtotime($aIntervalo[$i]))?></th>
<?}?>
@@ -158,8 +157,13 @@
<?php=20
echo form_tag('asistencia/mostrar', 'id=3Dsf_admin_edit_form=
name=3Dsf_admin_edit_form multipart=3Dtrue');
echo input_hidden_tag('division_id', $division_id);=20
- list($y, $m, $d) =3D split("[/. -]",$fechainicio);
- echo input_hidden_tag('fechainicio', "$d/$m/$y");=20
+ //list($y, $m, $d) =3D split("[/. -]",$fechainicio);
+ //echo input_hidden_tag('fechainicio', "$d/$m/$y");=20
+ //Fecha inicio.
+ echo input_hidden_tag('dia', "$d");=20
+ echo input_hidden_tag('mes', "$m");=20
+ echo input_hidden_tag('ano', "$y");=20
+ =20
echo input_hidden_tag('vistas', $vista_id);
echo input_hidden_tag('vista', "noMuestraMenu");=20
if($alumno_id >=3D 0)
@@ -187,7 +191,7 @@
<br>Feriado<br>
<table cellspacing=3D"1">
<tr>
-<?php
+<?php //print_r($aFeriadoEfectivo);
foreach($aFeriadoEfectivo as $fecha =3D> $nombre) {
$fecha =3D date("d-m-Y",strtotime($fecha));
echo "<td style=3D'padding-left:20px'><b>$nombre</b> - $fec=
ha</td>";
Deleted: prosistem/alba/trunk/alba/apps/principal/modules/asistencia/vali=
date/mostrar.yml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/asistencia/validate/=
mostrar.yml 2007-02-02 20:38:21 UTC (rev 4152)
+++ prosistem/alba/trunk/alba/apps/principal/modules/asistencia/validate/=
mostrar.yml 2007-02-02 21:20:17 UTC (rev 4153)
@@ -1,13 +0,0 @@
-methods:
- post: [fechainicio]
-
-names:
- fechainicio:
- required: yes
- required_msg: Debe ingresar la Fecha
- validators: dateLenValidator
-
-dateLenValidator:
- class: albaDateValidator
- =20
-
Más información sobre la lista de distribución Alba-desarrollo