public function actionIndex() { if (isset($_POST['limit'])) { $limit = $_POST['limit']; } else { $limit = 20; } if (isset($_POST['start'])) { $start = $_POST['start']; } else { $start = 0; } //$model = new PahSubAktivitas('search'); //$model->unsetAttributes(); $criteria = new CDbCriteria(); // $criteria->limit = $limit; // $criteria->offset = $start; $model = PahSubAktivitas::model()->findAll($criteria); $total = PahSubAktivitas::model()->count($criteria); if (isset($_GET['PahSubAktivitas'])) { $model->attributes = $_GET['PahSubAktivitas']; } if (isset($_GET['output']) && $_GET['output'] == 'json') { $this->renderJson($model, $total); } else { $model = new PahSubAktivitas('search'); $model->unsetAttributes(); $this->render('admin', array('model' => $model)); } }
<?php echo $form->labelEx($model, 'pah_aktivitas_grup_id'); ?> <?php echo $form->dropDownList($model, 'pah_aktivitas_grup_id', GxHtml::listDataEx(PahAktivitasGrup::model()->findAllAttributes(null, true))); ?> <?php echo $form->error($model, 'pah_aktivitas_grup_id'); ?> </div><!-- row --> <div class="span-8 last"> <?php echo $form->labelEx($model, 'pah_sub_aktivitas_id'); ?> <?php echo $form->dropDownList($model, 'pah_sub_aktivitas_id', GxHtml::listDataEx(PahSubAktivitas::model()->findAllAttributes(null, true))); ?> <?php echo $form->error($model, 'pah_sub_aktivitas_id'); ?> </div><!-- row --> <!-- june --> <div class="row"></div> <!-- june --> <!--label--><!--/label--> <?php echo GxHtml::Button(Yii::t('app', 'Cancel'), array('submit' => array('pahaktivitasgruptrans/admin'))); echo GxHtml::submitButton(Yii::t('app', 'Save')); $this->endWidget(); ?>
<div class="span-8 last"> <?php echo $form->label($model, 'pah_aktivitas_grup_id'); ?> <?php echo $form->dropDownList($model, 'pah_aktivitas_grup_id', GxHtml::listDataEx(PahAktivitasGrup::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All'))); ?> </div> <div class="span-8 last"> <?php echo $form->label($model, 'pah_sub_aktivitas_id'); ?> <?php echo $form->dropDownList($model, 'pah_sub_aktivitas_id', GxHtml::listDataEx(PahSubAktivitas::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All'))); ?> </div> <div class="row buttons"> <?php echo GxHtml::submitButton(Yii::t('app', 'Search')); ?> </div> <?php $this->endWidget(); ?> </div><!-- search-form -->