Exemplo n.º 1
0
 /**
  * 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 $id the ID of the model to be loaded
  * @return Parents the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Parents::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 2
0
$this->breadcrumbs = array('Estudiantes' => array('index'), $model->id);
$this->menu = array(array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/list29.png") . 'Listado de Estudiantes', 'url' => array('index')), array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/cogs3.png") . 'Gestionar Estudiantes', 'url' => array('admin')));
?>

<legend>Vista de Estudiante #<?php 
echo $model->id;
?>
</legend>

<section><p><?php 
echo "<b>Usuario:</b> " . $model->profile->user->username . " | " . "<b>Registrado:</b> " . Yii::app()->dateFormatter->formatDateTime($model->profile->user->regdate, 'medium', false) . " | " . "<b>Status:</b> " . Profile::model()->validarStatus($model->profile->cruge_user_iduser);
?>
</p></section>

<?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array(array('name' => 'id', 'label' => 'ID'), array('name' => 'profile.identification', 'label' => 'Nº Identificación'), array('value' => Profile::model()->nombreApellido($model->profile->firstname, $model->profile->secondname, $model->profile->lastname1, $model->profile->lastname2), 'label' => 'Nombres y Apellidos'), array('name' => 'profile.email', 'label' => 'Correo'), array('value' => Profile::model()->validarSexo($model->profile->sex) == "M" ? "Masculino" : "Femenino", 'type' => 'raw', 'label' => 'Sexo'), array('name' => 'profile.date_of_birth', 'value' => Yii::app()->dateFormatter->formatDateTime($model->profile->date_of_birth, 'medium', false), 'type' => 'raw', 'label' => 'Fecha de Nacimiento'), array('name' => 'parents_id', 'label' => 'Padre', 'value' => Parents::model()->getParents($model->parents_id), 'type' => 'raw'))));
?>

<!-- Box de Informacion Estudiante VC -->
<?php 
$this->beginWidget('yiiwheels.widgets.box.WhBox', array('title' => 'Datos del usuario en VC', 'headerIcon' => 'icon-th-list'));
?>

<?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('user_college', 'pass_college', 'tutor_id', 'requirements_id')));
$this->endWidget();
?>
<!-- End Box Informacion Estudiante VC -->

<legend>
	<a href="#" id="mostrarAdd" style="display: none;"><i class="fa fa-chevron-down"></i></a>