/**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Curso::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 <!--Profile Body-->
                    <div class="profile-body">
                        


                        <div class="headline"><h2><?php 
echo Curso::model()->findByPk($IdCurso)->CursoCompleto2;
?>
</h2></div>

                        <div class="table-search-v2 margin-bottom-20">
                        <div class="table-responsive">
                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                        <th>Estudiante</th>
                                        <th class="hidden-sm">Info</th>
                                        <th>Estado</th>
                                        <th>Acciones  <?php 
echo CHtml::link('<i class="fa fa-download pull-right"></i>', array('UsuarioUnitec/ExcelEPC', 'Seccion' => $IdCurso), array('style' => 'color:#c4161c'));
?>
</th>
                                       

                                    </tr>
                                </thead>
                                <tbody>

                                    <?php 
foreach ($Companieros as $Estudiante) {
Beispiel #3
0
<?php echo $form->errorSummary($model); ?>
<?php echo $form->labelEx($model, 'idAlumno');?>
	<?php echo $form->dropDownList($model,'idAlumno',CHtml::listData(Alumno::model()->findAll(array('order'=>'idAlumno')),'idAlumno', 'nombreCompleto'),array('empty'=>'Seleccionar..' ));?>


        <?php echo $form->labelEx($model, 'Cuenta');?>
	<?php echo $form->dropDownList($model,'idCuenta',CHtml::listData(Persona::model()->findAll(array('order'=>'idPersona')),'idPersona', 'apellido', 'nombre'),array('empty'=>'Seleccionar..' ));?>

	<?php echo $form->datepickerRow($model,'fechaInicio',array('options'=>array(),'htmlOptions'=>array('class'=>'span5')),array('prepend'=>'<i class="icon-calendar"></i>','append'=>'Click on Month/Year at top to select a different year or type in (mm/dd/yyyy).')); ?>

	<?php echo $form->datepickerRow($model,'fechaFin',array('options'=>array(),'htmlOptions'=>array('class'=>'span5')),array('prepend'=>'<i class="icon-calendar"></i>','append'=>'Click on Month/Year at top to select a different year or type in (mm/dd/yyyy).')); ?>

	<?php echo $form->textFieldRow($model,'motivoBaja',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->labelEx($model,'idCurso'); ?>
        <?php echo $form->dropDownList($model,'idCurso',CHtml::listData(Curso::model()->findAll(array('order'=>'idCurso')),'idCurso', 'descripcion'),array('empty'=>'Seleccionar..' ));?>
	
        <?php echo $form->labelEx($model,'Descuento'); ?>
        <?php echo $form->dropDownList($model,'idDescuento',CHtml::listData(Descuento::model()->findAll(array('order'=>'idDescuento')),'idDescuento', 'descripcion'),array('empty'=>'Seleccionar..' ));?>
	
        <?php echo $form->textFieldRow($model,'ciclo',array('maxlength'=>5)); ?>

<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Crear' : 'Guardar',
		)); ?>
</div>

<?php $this->endWidget(); ?>
 public function actionActualizarEstadoCurso()
 {
     date_default_timezone_set('America/Tegucigalpa');
     $Curso = Curso::model()->findByPk($_POST['pk']);
     $Curso->Activo = $_POST['value'];
     $Curso->ModificadoPor = Yii::app()->user->name;
     $Curso->Save();
 }
Beispiel #5
0
// echo $form->datepickerRow($model, 'FECHA_FINALIZACION', array('prepend' => '<i class="icon-calendar"></i>'))
?>
        <?php 
echo $form->datepickerRow($model, 'FECHA_FINALIZACION', array('options' => array('language' => 'es', 'readonly' => 'readonly', 'format' => 'dd/mm/yyyy')));
?>

        <?php 
echo $form->textFieldRow($model, 'AULA', array('maxlength' => 20));
?>

        <?php 
// echo $form->textFieldRow($model, 'NRO_ESTUDIANTES')
?>

        <?php 
echo $form->dropDownListRow($model, 'CURSO_ID', array('' => ' -- Seleccione -- ') + CHtml::listData(Curso::model()->findAll(), 'ID', Curso::representingColumn()), array('placeholder' => null));
?>

        <?php 
echo $form->textFieldRow($model, 'NRO_EDICION', array('maxlength' => 20));
?>

        <?php 
echo $form->dropDownListRow($model, 'HORARIO_ID', array('' => ' -- Seleccione -- ') + CHtml::listData(Horario::model()->findAll(), 'ID', 'horario_formato'), array('placeholder' => null));
?>

        <div class="form-actions">
            <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'success', 'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save')));
?>
            <?php