public function actionAddWorkflowRule()
{
$model = new models\OphCiExamination_Workflow_Rule();
$assetPath = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.' . $this->getModule()->name . '.assets'), false, -1);
Yii::app()->clientScript->registerCssFile($assetPath . '/css/components/admin.css');
if (isset($_POST[\CHtml::modelName($model)])) {
$model->attributes = $_POST[\CHtml::modelName($model)];
if ($model->save()) {
Audit::add('admin', 'create', serialize($model->attributes), false, array('module' => 'OphCiExamination', 'model' => 'OphCiExamination_Workflow_Rule'));
Yii::app()->user->setFlash('success', 'Workflow rule updated');
$this->redirect(array('viewWorkflowRules'));
}
}
$this->render('update', array('model' => $model, 'title' => 'Add workflow rule', 'cancel_uri' => '/OphCiExamination/admin/viewWorkflowRules'));
}