コード例 #1
0
ファイル: create.php プロジェクト: robebeye/isims
//untuk pemilihan jam pelajaran
?>
	  
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'twaktu', 'options' => array('title' => 'Klik tanda <code>+</code> untuk input data waktu', 'autoOpen' => false, 'modal' => true, 'width' => 640, 'height' => 480)));
$this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'placement' => 'above', 'tabs' => array(array('label' => 'SENIN', 'active' => true, 'content' => $this->renderPartial('dialog1', array('model' => $model), true)), array('label' => 'SELASA', 'content' => $this->renderPartial('dialog2', array('model' => $model), true)), array('label' => 'RABU', 'content' => $this->renderPartial('dialog3', array('model' => $model), true)), array('label' => 'KAMIS', 'content' => $this->renderPartial('dialog4', array('model' => $model), true)), array('label' => 'JUMAT', 'content' => $this->renderPartial('dialog5', array('model' => $model), true)), array('label' => 'SABTU', 'content' => $this->renderPartial('dialog6', array('model' => $model), true)))));
?>

<?php 
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>


<?php 
// untuk pemilihan penempatan mapel
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'tmapel', 'options' => array('title' => 'Klik tanda <code>+</code> untuk input data mapel', 'autoOpen' => false, 'modal' => true, 'width' => 640, 'height' => 480)));
?>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'penempatan-grid', 'dataProvider' => PenempatanMapel::model()->search(), 'type' => 'striped bordered condensed', 'columns' => array('kode_mapel', 'kurikulum', 'kelas', 'lokal', array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button(
		        "+"
		        , array(
		        "name" => "get_link"
		        , "id" => "get_link"
		        , "onClick" => "$(\\"#tmapel\\").dialog(\\"close\\");
		        $(\\"#Jadwal_kode_mapel \\").val(\\"". $data->kode_mapel."\\");
		        $(\\"#Jadwal_kurikulum\\").val(\\"". $data->kurikulum."\\");
		        $(\\"#Jadwal_kelas\\").val(\\"". $data->kelas."\\");
		        $(\\"#Jadwal_lokal\\").val(\\"". $data->lokal."\\");
			"))'))));
$this->endWidget('zii.widgets.jui.CJuiDialog');
コード例 #2
0
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id, $id2, $id3, $id4)
 {
     $model = PenempatanMapel::model()->findByAttributes(array('kode_mapel' => $id, 'kurikulum' => $id2, 'kelas' => $id3, 'lokal' => $id4));
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }