public function actionIndex()
 {
     $model = new Feedback('search');
     $model->unsetAttributes();
     if (isset($_GET['Feedback'])) {
         $model->attributes = $_GET['Feedback'];
     }
     $this->render('index', array('model' => $model));
 }
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     if (Yii::app()->request->isPostRequest) {
         // we only allow deletion via POST request
         $this->loadModel($id)->delete();
         // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
         if (!isset($_GET['ajax'])) {
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     $this->breadcrumbs = array('Список обращений' => array('/feedback'));
     $model = new Feedback('search');
     $model->attachBehavior('dateComparator', array('class' => 'DateComparator'));
     $model->unsetAttributes();
     // clear any default values
     // set attributes from get
     if (isset($_GET['Feedback'])) {
         $model->attributes = $_GET['Feedback'];
     }
     $this->render('list', array('model' => $model));
 }
 /**
  * Manages FAQ.
  *
  * @return void
  */
 public function actionFaq()
 {
     $model = new Feedback('search');
     $model->unsetAttributes();
     // clear any default values
     $model->setAttributes(Yii::app()->getRequest()->getParam('Feedback', array()));
     // Фильтрация по типу сообщения (отзывы)
     $type = DictionaryData::model()->findByCode('feedback-faq');
     if ($type === null) {
         $this->redirect($this->createUrl('/backend'));
     }
     $model->type_id = $type->id;
     Yii::app()->user->setState('prevUrl', Yii::app()->request->url);
     $this->render('index', array('model' => $model));
 }