//$cs->registerCssFile($baseUrl.'/css/timepicker.css'); $this->menu = array(array('label' => 'List Issued Books', 'url' => array('index')), array('label' => 'Issue a Book', 'url' => array('create'))); ?> <h1>All offences with fine details</h1> <p> </p> <div class="wide form"> <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get')); ?> <label>Challan Book No</label> <?php echo $form->dropDownList($model, 'scene_of_offence', CHtml::listData(PlaceOfOffence::model()->findAll(array('order' => 'place ASC')), 'id', 'place'), array('span' => 5)); ?> <div class="form-actions"> <?php echo TbHtml::submitButton('Search', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)); ?> </div> <?php $this->endWidget(); ?> </div><!-- search-form --> <?php echo TbHtml::Button('Export to Excel', array('color' => TbHtml::BUTTON_COLOR_WARNING, 'id' => "excel"));
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return PlaceOfOffence the loaded model * @throws CHttpException */ public function loadModel($id) { $model = PlaceOfOffence::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }