/**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = FileCategory::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemple #2
0
?>
</td>
  </tr>
</table>

	</div>

	<div class="inner_new_formCon_row">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20%"><?php 
echo $form->labelEx($model, 'category');
?>
</td>
    <td width="80%"><?php 
echo $form->dropDownList($model, 'category', CHtml::listData(FileCategory::model()->findAll(), 'id', 'category'), array('prompt' => 'Select category'));
?>
		<?php 
echo $form->error($model, 'category');
?>
</td>
  </tr>
</table>

		
        
	</div>

	<div class="inner_new_formCon_row">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
Exemple #3
0
echo Yii::t('downloads', 'Batch');
?>
</th>
    <th><?php 
echo Yii::t('downloads', 'File Name');
?>
</th>
  </tr>
  <tr>
    <td><?php 
echo $model->title;
?>
</td>
    <td>
		<?php 
$category = FileCategory::model()->findByAttributes(array('id' => $model->category));
echo $category->category;
?>
    </td>
    <td>
    	<?php 
if ($model->placeholder) {
    echo ucfirst($model->placeholder);
} else {
    echo 'Public';
}
?>
    </td>
    <td>
    	<?php 
if ($model->course) {