예제 #1
0
				<td width="300px"><?php 
echo $form->labelEx($model, 'item_id');
?>
</td>
				<td><?php 
echo $form->textField($model, 'item_id');
?>
</td>
			</tr>
			<tr>
				<td><?php 
echo $form->labelEx($model, 'category_id');
?>
</td>
				<td><?php 
echo $form->dropDownList($model, 'category_id', CHtml::listData(WebshopCategory::model()->findAll(), 'category_id', 'name'));
?>
</td>
			</tr>
			<tr>
				<td><?php 
echo $form->labelEx($model, 'amount');
?>
</td>
				<td><?php 
echo $form->textField($model, 'amount');
?>
</td>
			</tr>
			<tr>
				<td><?php 
예제 #2
0
 public function actionCDelete($id)
 {
     if (Yii::app()->user->isGuest or Yii::app()->user->access_level < Config::get('access_level_admin')) {
         $this->redirect(Yii::app()->homeUrl);
     }
     $model = WebshopCategory::model()->findByPK($id);
     $model->delete();
     $this->redirect(Yii::app()->homeUrl . 'admin/webshop/categories');
 }