Exemplo n.º 1
0
			<div class="row appendhere" style="margin-top:10px;">
			
				 <div class="col-xs-2">
		<label>Notes</label>
		</div>
			 <div class="col-xs-10">
		<?php 
if (isset($model->id)) {
    ?>
			
			<table class="table"><thead> <tr>  <th>File Name</th> <th>Description</th> <th>Date</th> <th>Action</th>  </tr> </thead> 
			<tbody> 
			<?php 
    $Criteria = new CDbCriteria();
    $Criteria->condition = "session_id={$model->id}";
    $fls = SessionNotes::model()->findAll($Criteria);
    foreach ($fls as $fl) {
        echo "<tr class='rmcla_{$fl->id}'> <td>{$fl->url}</td>  <td>{$fl->description}</td>  <td>{$fl->date}</td>  <td><a href='javascript:void(0)' onclick='dofdelete({$fl->id});return false;' class='delete'> Delete</a></td>  </tr>";
    }
    ?>
			</tbody>
			</table>
			
			<?php 
}
?>
		

	</div>

	
Exemplo n.º 2
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 SessionNotes the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = SessionNotes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }