?> </table> </div> </div> <?php } ?> <div class="row"> <div class="span1"></div> <div class="span10"> <?php $losSucesos = PacienteSucesos::model()->findAll("paciente_id = {$model->id}"); if ($losSucesos) { ?> <h3 class="text-center">Sucesos Registrados</h3> <table class="table table-striped"> <tr> <th>Fecha</th> <th>Suceso</th> <th>Registrado por:</th> <th></th> </tr> <?php foreach ($losSucesos as $los_sucesos) { ?> <tr> <td><small><?php
/** * 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 PacienteSucesos the loaded model * @throws CHttpException */ public function loadModel($id) { $model = PacienteSucesos::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }