Ejemplo n.º 1
0
	                <?php 
if ($baul > 0) {
    ?>
		                <div class="tab-pane" id="baul">
		                	<h5>Baúl de Pacientes</h5>
		                	<table class="table table-condensed">
		                		<tr>
		                			<th>Fecha</th>
		                			<th>Descripción</th>
		                			<th>Archivos</th>
		                			<th></th>
		                		</tr>
		                
		                	<?php 
    $losarchivos = PacienteBaul::model()->findAll("paciente_id = {$model->id}");
    foreach ($losarchivos as $los_archivos) {
        $nArchivos = PacienteBaulDetalle::model()->count("paciente_baul_id = {$los_archivos->id}");
        ?>
						 			<tr>
						 				<td><?php 
        echo Yii::app()->dateformatter->format("dd-MM-yyyy", $los_archivos->fecha);
        ?>
</td>
						 				<td><?php 
        echo $los_archivos->detalle;
        ?>
</td>
						 				<td><?php 
        echo $nArchivos;
        ?>
 /**
  * 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 PacienteBaul the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PacienteBaul::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }