Esempio n. 1
0
	<?php 
}
?>

<div class="row">
	<div class="span12 text-center">
		<a href="#cambio" role="button" data-toggle="modal" class="btn btn-warning"><i class="icon-plus-sign icon-white"></i> Cambiar estado de Activo</a>
	</div>
</div>

<div class="row"><div class="span12"></div></div>

<?php 
//Verificar si hay observaciones
$nObservaciones = ActivoObservaciones::model()->count("activo_inventario_id=" . $model->id);
$lasObservaciones = ActivoObservaciones::model()->findAll("activo_inventario_id=" . $model->id);
?>

<div class="row">
	<div class="span12">
		<?php 
if ($nObservaciones > 0) {
    ?>
			<h3 class="text-center">Historial de Observaciones</h3>		
	</div>
</div>

<div class="row">
	<div class="span2"></div>
	<div class="span8">
	<table class="table">
 /**
  * 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 ActivoObservaciones the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = ActivoObservaciones::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }