protected function renderContent() { /* 1 = Admin Message 2 = User Message 3 = Allocation Custom Message */ $model = $this->newNotification(); $model3 = $this->newNotification3(); $dataProvider = sNotification::model()->searchFilter(); $dataProvider3 = sNotification3::model()->searchFilter3(); $this->render('message', array('dataProvider' => $dataProvider, 'model' => $model, 'dataProvider3' => $dataProvider3, 'model3' => $model3)); }
public function actionIndex() { /* 1 = Admin Message 2 = User Message 3 = Allocation Custom Message */ $model = $this->newNotification(); $model3 = $this->newNotification3(); $modeltask = $this->newTask(); if (!Yii::app()->user->isGuest) { $dataProvider = sNotification::model()->searchFilter(); $dataProvider3 = sNotification3::model()->searchFilter3(); $this->render('index', array('dataProvider' => $dataProvider, 'model' => $model, 'dataProvider3' => $dataProvider3, 'model3' => $model3, 'modeltask' => $modeltask)); } else { $this->redirect(array('site/login')); } }
public function actionIndex() { /* 1 = Admin Message 2 = User Message 3 = Allocation Custom Message */ $model = $this->newNotification(); $model3 = $this->newNotification3(); if (!Yii::app()->user->isGuest) { $dataProvider = sNotification::model()->searchFilter(); $dataProvider3 = sNotification3::model()->searchFilter3(); $dataProviderImage = sModule::model()->searchMenuImage(); //Yii::app()->user->setFlash('success','<strong>Testing Flash</strong>..Testing Flash... Bagus nggak nih flash...'); $this->render('index', array('dataProvider' => $dataProvider, 'model' => $model, 'dataProvider3' => $dataProvider3, 'model3' => $model3, 'dataProviderImage' => $dataProviderImage)); } else { $this->redirect(array('site/login')); } }
<ul class="nav nav-list"> <li class="nav-header"> Personalization </li> </ul> <?php $this->widget('bootstrap.widgets.BootMenu', array('type' => 'list', 'items' => array(array('label' => 'Inbox (' . sNotification::model()->getUnreadNotification() . ')', 'url' => Yii::app()->createUrl('sNotification')), array('label' => 'Profile', 'url' => '#'), array('label' => 'Theme', 'url' => '#'), array('label' => 'Bookmark', 'url' => '#')))); ?> <br/> <?php //$this->widget('bootstrap.widgets.BootBadge', array( // 'type'=>'success', // '', 'success', 'warning', 'error', 'info' or 'inverse' // 'label'=>sNotification::model()->getUnreadNotification(), //));
public function actionMarkHide($id) { $model = sNotification::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } $model->read_id = 6; $model->archive_date = time(); $model->save(); $this->redirect(array('admin')); }