15Juli2014

parent 9fed96a5
...@@ -4,67 +4,9 @@ ...@@ -4,67 +4,9 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group> <group>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/create.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/admin.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/create.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/IndexBeritaAcaraKuliah.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/update.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/SearcHDaftarHadir.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/CetakBeritaAcaraKuliah.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/mJadwal/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/create.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/update.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/_view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/_search.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/_view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/admin.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/admin.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/_view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/LaporanBeritaAcaraKuliah.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/themes/hebo/views/layouts/tpl_navigation.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/jadwal/_form2.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dJadwal/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/_formDaftarHadir.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/MJadwalController.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/MJadwalController.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/BeritaAcaraKuliahController.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/mJadwal/view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/view.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/mJadwal/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/jadwal/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/IndexDataSearch.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/IndexAdminByMonth.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/_search.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/_view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/update.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/update.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/_search.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/_search.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/update.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/BeritaAcaraDaftarHadirController.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/create.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/JadwalController.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/IndexCalendar.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/models/MJadwal.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/create.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/ruangan/_search.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/searchBeritaAcaraDaftarHadir.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/admin.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dim/_view.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/_form.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/pegawai/admin.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/_formAcaraKuliah.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraKuliah/createBeritaAcaraKuliah.php</file>
</group> </group>
</open-files> </open-files>
</project-private> </project-private>
<?php <?php
class DJadwalController extends Controller class DJadwalController extends Controller {
{
/** /**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning * @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'. * using two-column layout. See 'protected/views/layouts/column2.php'.
*/ */
public $layout='//layouts/column2'; public $layout = '//layouts/column1';
/** /**
* @return array action filters * @return array action filters
*/ */
public function filters() public function filters() {
{ return array(
return array( 'accessControl', // perform access control for CRUD operations
'accessControl', // perform access control for CRUD operations );
); }
}
/**
/** * Specifies the access control rules.
* Specifies the access control rules. * This method is used by the 'accessControl' filter.
* This method is used by the 'accessControl' filter. * @return array access control rules
* @return array access control rules */
*/ public function accessRules() {
public function accessRules() return array(
{ array('allow', // allow all users to perform 'index' and 'view' actions
return array( 'actions' => array('index', 'view'),
array('allow', // allow all users to perform 'index' and 'view' actions 'users' => array('*'),
'actions'=>array('index','view'), ),
'users'=>array('*'), array('allow', // allow authenticated user to perform 'create' and 'update' actions
), 'actions' => array('create', 'update'),
array('allow', // allow authenticated user to perform 'create' and 'update' actions 'users' => array('@'),
'actions'=>array('create','update'), ),
'users'=>array('@'), array('allow', // allow admin user to perform 'admin' and 'delete' actions
), 'actions' => array('admin', 'delete'),
array('allow', // allow admin user to perform 'admin' and 'delete' actions 'users' => array('admin'),
'actions'=>array('admin','delete'), ),
'users'=>array('admin'), array('deny', // deny all users
), 'users' => array('*'),
array('deny', // deny all users ),
'users'=>array('*'), );
), }
);
} /**
* Displays a particular model.
/** * @param integer $id the ID of the model to be displayed
* Displays a particular model. */
* @param integer $id the ID of the model to be displayed public function actionView($id) {
*/ //Berita Acara Daftar Hadir
public function actionView($id) $daftarhadir = new BeritaAcaraDaftarHadir('search');
{ $daftarhadir->unsetAttributes(); // clear any default values
$this->render('view',array( if (isset($_GET['BeritaAcaraDaftarHadir']))
'model'=>$this->loadModel($id), $daftarhadir->attributes = $_GET['BeritaAcaraDaftarHadir'];
));
}
/** $this->render('view', array(
* Creates a new model. 'model' => $this->loadModel($id),
* If creation is successful, the browser will be redirected to the 'view' page. 'daftarhadir' => $daftarhadir->searchByIdJadwal($id),
*/ ));
public function actionCreate() }
{
$model=new DJadwal; /**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate() {
$model = new DJadwal;
// Uncomment the following line if AJAX validation is needed // Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model); // $this->performAjaxValidation($model);
if(isset($_POST['DJadwal'])) if (isset($_POST['DJadwal'])) {
{ $model->attributes = $_POST['DJadwal'];
$model->attributes=$_POST['DJadwal']; if ($model->save())
if($model->save()) $this->redirect(array('view', 'id' => $model->ID));
$this->redirect(array('view','id'=>$model->ID)); }
}
$this->render('create', array(
$this->render('create',array( 'model' => $model,
'model'=>$model, ));
)); }
}
/**
/** * Updates a particular model.
* Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page.
* If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated
* @param integer $id the ID of the model to be updated */
*/ public function actionUpdate($id) {
public function actionUpdate($id) $model = $this->loadModel($id);
{
$model=$this->loadModel($id);
// Uncomment the following line if AJAX validation is needed // Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model); // $this->performAjaxValidation($model);
if(isset($_POST['DJadwal'])) if (isset($_POST['DJadwal'])) {
{ $model->attributes = $_POST['DJadwal'];
$model->attributes=$_POST['DJadwal']; if ($model->save())
if($model->save()) $this->redirect(array('view', 'id' => $model->ID));
$this->redirect(array('view','id'=>$model->ID)); }
}
$this->render('update', array(
$this->render('update',array( 'model' => $model,
'model'=>$model, ));
)); }
}
/**
/** * Deletes a particular model.
* Deletes a particular model. * If deletion is successful, the browser will be redirected to the 'admin' page.
* If deletion is successful, the browser will be redirected to the 'admin' page. * @param integer $id the ID of the model to be deleted
* @param integer $id the ID of the model to be deleted */
*/ public function actionDelete($id) {
public function actionDelete($id) if (Yii::app()->request->isPostRequest) {
{
if(Yii::app()->request->isPostRequest)
{
// we only allow deletion via POST request // we only allow deletion via POST request
$this->loadModel($id)->delete(); $this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if(!isset($_GET['ajax'])) if (!isset($_GET['ajax']))
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin')); $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
} } else
else throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
throw new CHttpException(400,'Invalid request. Please do not repeat this request again.'); }
}
/**
/** * Lists all models.
* Lists all models. */
*/ public function actionIndex() {
public function actionIndex() $dataProvider = new CActiveDataProvider('DJadwal');
{ $this->render('index', array(
$dataProvider=new CActiveDataProvider('DJadwal'); 'dataProvider' => $dataProvider,
$this->render('index',array( ));
'dataProvider'=>$dataProvider, }
));
} /**
* Manages all models.
*/
public function actionAdmin() {
$model = new DJadwal('search');
$model->unsetAttributes(); // clear any default values
if (isset($_GET['DJadwal']))
$model->attributes = $_GET['DJadwal'];
$this->render('admin', array(
'model' => $model,
));
}
/**
* 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) {
$model = DJadwal::model()->findByPk($id);
if ($model === null)
throw new CHttpException(404, 'The requested page does not exist.');
return $model;
}
/**
* Performs the AJAX validation.
* @param CModel the model to be validated
*/
protected function performAjaxValidation($model) {
if (isset($_POST['ajax']) && $_POST['ajax'] === 'djadwal-form') {
echo CActiveForm::validate($model);
Yii::app()->end();
}
}
/**
* Manages all models.
*/
public function actionAdmin()
{
$model=new DJadwal('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['DJadwal']))
$model->attributes=$_GET['DJadwal'];
$this->render('admin',array(
'model'=>$model,
));
}
/**
* 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)
{
$model=DJadwal::model()->findByPk($id);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
}
/**
* Performs the AJAX validation.
* @param CModel the model to be validated
*/
protected function performAjaxValidation($model)
{
if(isset($_POST['ajax']) && $_POST['ajax']==='djadwal-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
}
} }
...@@ -47,14 +47,16 @@ class MJadwalController extends Controller { ...@@ -47,14 +47,16 @@ class MJadwalController extends Controller {
* @param integer $id the ID of the model to be displayed * @param integer $id the ID of the model to be displayed
*/ */
public function actionView($id) { public function actionView($id) {
$daftarhadir = new BeritaAcaraDaftarHadir('search');
$daftarhadir->unsetAttributes(); // clear any default values
if (isset($_GET['BeritaAcaraDaftarHadir']))
$daftarhadir->attributes = $_GET['BeritaAcaraDaftarHadir'];
$detail = new DJadwal('search');
$detail->unsetAttributes(); // clear any default values
if (isset($_GET['DJadwal']))
$daftarhadir->attributes = $_GET['DJadwal'];
$model = $this->loadModel($id);
$this->render('view', array( $this->render('view', array(
'model' => $this->loadModel($id), 'model' => $model,
'daftarhadir' => $daftarhadir 'detail' => $detail->searchByIDJadwal($model->ID),
)); ));
} }
...@@ -64,106 +66,76 @@ class MJadwalController extends Controller { ...@@ -64,106 +66,76 @@ class MJadwalController extends Controller {
*/ */
public function actionCreate() { public function actionCreate() {
$model = new MJadwal; $model = new MJadwal;
$djadwal = new DJadwal;
// Uncomment the following line if AJAX validation is needed // Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model); // $this->performAjaxValidation($model);
if (isset($_POST['MJadwal'])) { if (isset($_POST['MJadwal'])) {
$model->attributes = $_POST['MJadwal']; $model->attributes = $_POST['MJadwal'];
if (isset($_POST['DJadwal'])) { if ($model->save()) {
ECHO 'BANKAI'; if (isset($_POST['DJadwal'])) {
$model->djadwal = $_POST['DJadwal'];
} for ($i = 0; $i < 8; $i++) {
// if ($model->saveWithRelated('djadwal')) { if (!isset($_POST['formsesi'][$i])) {
// //$this->redirect('index'); $detail = new DJadwal;
// } else { $detail->KODE_MK = $_POST['DJadwal'][$i]['KODE_MK'];
// $model->addError('djadwal', 'Error'); $detail->RUANGAN = $_POST['DJadwal'][$i]['RUANGAN'];
// } $detail->AKTIFITAS = $_POST['DJadwal'][$i]['AKTIFITAS'];
}
$detail->SESSION = $i + 1;
$this->render('create', array( $detail->ID_JADWAL = $model->ID;
'model' => $model, $detail->START_TIME = $this->start_time($i + 1);
)); $detail->END_TIME = $this->end_time($i + 1);
} // MAHASISWA
$sql = "SELECT DISTINCT(nilai.NIM),nilai.`SEM` FROM nilai JOIN registrasi ON nilai.`NIM` = registrasi.`NIM` WHERE KODE_MK LIKE '$detail->KODE_MK' AND registrasi.`TA` = $model->TA AND registrasi.`KELAS` LIKE '$model->KELAS'";
public function actionCreate2() { $list = Yii::app()->db->createCommand($sql)->queryAll();
$model = new MJadwal; //PENGAJAR
$sql_pengajar = "SELECT * FROM pengajar WHERE TA LIKE '$model->TA' AND ID_KUR LIKE '$model->ID_KUR' AND KODE_MK LIKE '$detail->KODE_MK' ORDER BY ROLE ASC";
// Uncomment the following line if AJAX validation is needed $list_pengajar = Yii::app()->db->createCommand($sql_pengajar)->queryAll();
// $this->performAjaxValidation($model);
$detail->PIC = $list_pengajar[0]['DOSEN_ID'];
if (isset($_POST['MJadwal'])) {
if ($detail->validate()) {
$detail->save();
$model->attributes = $_POST['MJadwal']; foreach ($list as $s) {
//$sql = "SELECT nilai.NIM AS NIM,registrasi.SEM AS SEM FROM nilai JOIN registrasi ON nilai.`NIM` = registrasi.`NIM` WHERE KODE_MK LIKE '$model->KODE_MK' AND registrasi.`TA` = '$model->TA' AND registrasi.`KELAS` LIKE '$model->KELAS'"; $daftarhadir = new BeritaAcaraDaftarHadir;
$sql = "SELECT DISTINCT(nilai.NIM),nilai.`SEM` FROM nilai JOIN registrasi ON nilai.`NIM` = registrasi.`NIM` WHERE KODE_MK LIKE '$model->KODE_MK' AND registrasi.`TA` = $model->TA AND registrasi.`KELAS` LIKE '$model->KELAS'"; $daftarhadir->ID_DETAIL_JADWAL = $detail->ID;
$list = Yii::app()->db->createCommand($sql)->queryAll(); $daftarhadir->NIM = $s['NIM'];
$sql_pengajar = "SELECT * FROM pengajar WHERE TA LIKE '$model->TA' AND ID_KUR LIKE '$model->ID_KUR' AND KODE_MK LIKE '$model->KODE_MK' ORDER BY ROLE ASC"; if ($daftarhadir->validate()) {
$list_pengajar = Yii::app()->db->createCommand($sql_pengajar)->queryAll(); $daftarhadir->save();
} else {
$model->PIC = $list_pengajar[0]['DOSEN_ID']; echo CHtml::errorSummary($daftarhadir);
}
foreach ($list as $s) { }
$daftarhadir = new BeritaAcaraDaftarHadir; $kuliah = new BeritaAcaraKuliah;
$daftarhadir->ID_KUR = $model->ID_KUR; $kuliah->ID_DETAIL_JADWAL = $detail->ID;
$daftarhadir->KODE_MK = $model->KODE_MK; $kuliah->TIPE_KULIAH = 1;
$daftarhadir->NIM = $s['NIM'];
$daftarhadir->SEM = $s['SEM']; if ($kuliah->validate()) {
$daftarhadir->SESSION = $model->SESSION; $kuliah->save();
$daftarhadir->WEEK = $model->WEEK; $this->redirect(array('view', 'id' => $model->ID));
$daftarhadir->TA = $model->TA; } else {
$daftarhadir->KELAS = $model->KELAS; echo CHtml::errorSummary($kuliah);
$daftarhadir->START_TIME = $this->start_time($daftarhadir->SESSION); }
$daftarhadir->END_TIME = $this->end_time($daftarhadir->SESSION); } else {
$daftarhadir->TANGGAL = $model->TANGGAL; echo CHtml::errorSummary($detail);
}
if ($daftarhadir->validate()) { }
$daftarhadir->save(); }
} else {
echo CHtml::errorSummary($daftarhadir);
} }
}
$kuliah = new BeritaAcaraKuliah;
$kuliah->WEEK = $model->WEEK;
$kuliah->SESSION = $model->SESSION;
$kuliah->TA = $model->TA;
$kuliah->ID_KUR = $model->ID_KUR;
$kuliah->KODE_MK = $model->KODE_MK;
$kuliah->KELAS = $model->KELAS;
$kuliah->TANGGAL = $model->TANGGAL;
$kuliah->START_TIME = $this->start_time($model->SESSION);
$kuliah->END_TIME = $this->end_time($model->SESSION);
$kuliah->TOPIK = $model->TOPIK;
$kuliah->RUANGAN = $model->RUANGAN;
$kuliah->AKTIFITAS = $model->AKTIFITAS;
$kuliah->PIC = $model->PIC;
$kuliah->SEM = $list[0]['SEM'];
$kuliah->TIPE_KULIAH = 1;
$kuliah->METODE = $model->METODE;
$kuliah->ALAT_BANTU = $model->ALAT_BANTU;
if ($kuliah->validate()) {
$kuliah->save();
} else { } else {
echo CHtml::errorSummary($kuliah); echo CHtml::errorSummary($model);
} }
$model->START_TIME = $kuliah->START_TIME;
$model->END_TIME = $kuliah->END_TIME;
$model->save();
$this->redirect(array('view', 'id' => $model->ID));
} }
$this->render('create2', array( $this->render('create', array(
'model' => $model, 'model' => $model,
'djadwal' => $djadwal
)); ));
} }
...@@ -174,6 +146,7 @@ class MJadwalController extends Controller { ...@@ -174,6 +146,7 @@ class MJadwalController extends Controller {
*/ */
public function actionUpdate($id) { public function actionUpdate($id) {
$model = $this->loadModel($id); $model = $this->loadModel($id);
$djadwal = DJadwal::model()->findAllByAttributes(array('ID_JADWAL' => $id));
// Uncomment the following line if AJAX validation is needed // Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model); // $this->performAjaxValidation($model);
...@@ -186,6 +159,7 @@ class MJadwalController extends Controller { ...@@ -186,6 +159,7 @@ class MJadwalController extends Controller {
$this->render('update', array( $this->render('update', array(
'model' => $model, 'model' => $model,
'djadwal' => $djadwal
)); ));
} }
...@@ -323,7 +297,7 @@ class MJadwalController extends Controller { ...@@ -323,7 +297,7 @@ class MJadwalController extends Controller {
echo Chtml::tag('option', array('value' => $value), CHtml::encode($KODE_MK), true); echo Chtml::tag('option', array('value' => $value), CHtml::encode($KODE_MK), true);
} }
echo Chtml::tag('option', array('value' => 'Kosong1'), CHtml::encode('Free')); echo Chtml::tag('option', array('value' => 'Kosong'), CHtml::encode('Free'));
} }
public function actionDeskripsi() { public function actionDeskripsi() {
......
...@@ -18,101 +18,120 @@ ...@@ -18,101 +18,120 @@
* @property Dim $nIM * @property Dim $nIM
* @property DJadwal $iDDETAILJADWAL * @property DJadwal $iDDETAILJADWAL
*/ */
class BeritaAcaraDaftarHadir extends CActiveRecord class BeritaAcaraDaftarHadir extends CActiveRecord {
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return BeritaAcaraDaftarHadir the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/** /**
* @return string the associated database table name * Returns the static model of the specified AR class.
*/ * @param string $className active record class name.
public function tableName() * @return BeritaAcaraDaftarHadir the static model class
{ */
return 'berita_acara_daftar_hadir'; public static function model($className = __CLASS__) {
} return parent::model($className);
}
/** /**
* @return array validation rules for model attributes. * @return string the associated database table name
*/ */
public function rules() public function tableName() {
{ return 'berita_acara_daftar_hadir';
// NOTE: you should only define rules for those attributes that }
// will receive user inputs.
return array(
array('ID_DETAIL_JADWAL', 'required'),
array('ID_DETAIL_JADWAL', 'numerical', 'integerOnly'=>true),
array('NIM', 'length', 'max'=>8),
array('STATUS', 'length', 'max'=>7),
array('LAST_UPDATE', 'length', 'max'=>20),
array('USER_ID, WS', 'length', 'max'=>15),
array('KETERANGAN, WAKTU_ABSEN', 'safe'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('ID, ID_DETAIL_JADWAL, NIM, STATUS, KETERANGAN, LAST_UPDATE, USER_ID, WS, WAKTU_ABSEN', 'safe', 'on'=>'search'),
);
}
/** /**
* @return array relational rules. * @return array validation rules for model attributes.
*/ */
public function relations() public function rules() {
{ // NOTE: you should only define rules for those attributes that
// NOTE: you may need to adjust the relation name and the related // will receive user inputs.
// class name for the relations automatically generated below. return array(
return array( array('ID_DETAIL_JADWAL', 'required'),
'nim' => array(self::BELONGS_TO, 'Dim', 'NIM'), array('ID_DETAIL_JADWAL', 'numerical', 'integerOnly' => true),
'iddetailjadwal' => array(self::BELONGS_TO, 'DJadwal', 'ID_DETAIL_JADWAL'), array('NIM', 'length', 'max' => 8),
); array('STATUS', 'length', 'max' => 7),
} array('LAST_UPDATE', 'length', 'max' => 20),
array('USER_ID, WS', 'length', 'max' => 15),
array('KETERANGAN, WAKTU_ABSEN', 'safe'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('ID, ID_DETAIL_JADWAL, NIM, STATUS, KETERANGAN, LAST_UPDATE, USER_ID, WS, WAKTU_ABSEN', 'safe', 'on' => 'search'),
);
}
/** /**
* @return array customized attribute labels (name=>label) * @return array relational rules.
*/ */
public function attributeLabels() public function relations() {
{ // NOTE: you may need to adjust the relation name and the related
return array( // class name for the relations automatically generated below.
'ID' => 'ID', return array(
'ID_DETAIL_JADWAL' => 'Id Detail Jadwal', 'nim' => array(self::BELONGS_TO, 'Dim', 'NIM'),
'NIM' => 'Nim', 'iddetailjadwal' => array(self::BELONGS_TO, 'DJadwal', 'ID_DETAIL_JADWAL'),
'STATUS' => 'Status', );
'KETERANGAN' => 'Keterangan', }
'LAST_UPDATE' => 'Last Update',
'USER_ID' => 'User',
'WS' => 'Ws',
'WAKTU_ABSEN' => 'Waktu Absen',
);
}
/** /**
* Retrieves a list of models based on the current search/filter conditions. * @return array customized attribute labels (name=>label)
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */
*/ public function attributeLabels() {
public function search() return array(
{ 'ID' => 'ID',
// Warning: Please modify the following code to remove attributes that 'ID_DETAIL_JADWAL' => 'Id Detail Jadwal',
// should not be searched. 'NIM' => 'Nim',
'STATUS' => 'Status',
'KETERANGAN' => 'Keterangan',
'LAST_UPDATE' => 'Last Update',
'USER_ID' => 'User',
'WS' => 'Ws',
'WAKTU_ABSEN' => 'Waktu Absen',
);
}
$criteria=new CDbCriteria; /**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search() {
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria->compare('ID',$this->ID); $criteria = new CDbCriteria;
$criteria->compare('ID_DETAIL_JADWAL',$this->ID_DETAIL_JADWAL);
$criteria->compare('NIM',$this->NIM,true);
$criteria->compare('STATUS',$this->STATUS,true);
$criteria->compare('KETERANGAN',$this->KETERANGAN,true);
$criteria->compare('LAST_UPDATE',$this->LAST_UPDATE,true);
$criteria->compare('USER_ID',$this->USER_ID,true);
$criteria->compare('WS',$this->WS,true);
$criteria->compare('WAKTU_ABSEN',$this->WAKTU_ABSEN,true);
return new CActiveDataProvider($this, array( $criteria->compare('ID', $this->ID);
'criteria'=>$criteria, $criteria->compare('ID_DETAIL_JADWAL', $this->ID_DETAIL_JADWAL);
)); $criteria->compare('NIM', $this->NIM, true);
} $criteria->compare('STATUS', $this->STATUS, true);
} $criteria->compare('KETERANGAN', $this->KETERANGAN, true);
\ No newline at end of file $criteria->compare('LAST_UPDATE', $this->LAST_UPDATE, true);
$criteria->compare('USER_ID', $this->USER_ID, true);
$criteria->compare('WS', $this->WS, true);
$criteria->compare('WAKTU_ABSEN', $this->WAKTU_ABSEN, true);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
}
public function searchByIdJadwal($id) {
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('ID', $this->ID);
$criteria->compare('ID_DETAIL_JADWAL', $id, true);
$criteria->compare('NIM', $this->NIM, true);
$criteria->compare('STATUS', $this->STATUS, true);
$criteria->compare('KETERANGAN', $this->KETERANGAN, true);
$criteria->compare('LAST_UPDATE', $this->LAST_UPDATE, true);
$criteria->compare('USER_ID', $this->USER_ID, true);
$criteria->compare('WS', $this->WS, true);
$criteria->compare('WAKTU_ABSEN', $this->WAKTU_ABSEN, true);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'pagination' => array(
'pagesize' => 50,
),
));
}
}
...@@ -54,14 +54,14 @@ class DJadwal extends CActiveRecord { ...@@ -54,14 +54,14 @@ class DJadwal extends CActiveRecord {
// NOTE: you should only define rules for those attributes that // NOTE: you should only define rules for those attributes that
// will receive user inputs. // will receive user inputs.
return array( return array(
array('ID_JADWAL, SESSION, KODE_MK, PIC, USER_ID, WS', 'required'), array('ID_JADWAL, SESSION, KODE_MK, PIC', 'required'),
array('ID_JADWAL, SESSION', 'numerical', 'integerOnly' => true), array('ID_JADWAL, SESSION', 'numerical', 'integerOnly' => true),
array('KODE_MK', 'length', 'max' => 8), array('KODE_MK', 'length', 'max' => 8),
array('RUANGAN, PIC, LAST_UPDATE', 'length', 'max' => 20), array('RUANGAN, PIC, LAST_UPDATE', 'length', 'max' => 20),
array('TOPIK, KET', 'length', 'max' => 255), array('TOPIK, KET', 'length', 'max' => 255),
array('AKTIFITAS', 'length', 'max' => 9), array('AKTIFITAS', 'length', 'max' => 9),
array('USER_ID, WS', 'length', 'max' => 15), array('USER_ID, WS', 'length', 'max' => 15),
array('START_TIME, END_TIME, SUB_TOPIK, OBJEKTIF, METODE, ALAT_BANTU', 'safe'), array('START_TIME, END_TIME, SUB_TOPIK, OBJEKTIF, METODE, ALAT_BANTU, USER_ID, WS', 'safe'),
// The following rule is used by search(). // The following rule is used by search().
// Please remove those attributes that should not be searched. // Please remove those attributes that should not be searched.
array('ID, ID_JADWAL, SESSION, START_TIME, END_TIME, KODE_MK, RUANGAN, TOPIK, SUB_TOPIK, OBJEKTIF, AKTIFITAS, PIC, METODE, ALAT_BANTU, KET, LAST_UPDATE, USER_ID, WS', 'safe', 'on' => 'search'), array('ID, ID_JADWAL, SESSION, START_TIME, END_TIME, KODE_MK, RUANGAN, TOPIK, SUB_TOPIK, OBJEKTIF, AKTIFITAS, PIC, METODE, ALAT_BANTU, KET, LAST_UPDATE, USER_ID, WS', 'safe', 'on' => 'search'),
...@@ -89,16 +89,16 @@ class DJadwal extends CActiveRecord { ...@@ -89,16 +89,16 @@ class DJadwal extends CActiveRecord {
return array( return array(
'ID' => 'ID', 'ID' => 'ID',
'ID_JADWAL' => 'Id Jadwal', 'ID_JADWAL' => 'Id Jadwal',
'SESSION' => 'Session', 'SESSION' => 'Sesi',
'START_TIME' => 'Start Time', 'START_TIME' => 'Waktu Mulai',
'END_TIME' => 'End Time', 'END_TIME' => 'Waktu Selesai',
'KODE_MK' => 'Kode Mk', 'KODE_MK' => 'Kode Mata Kuliah',
'RUANGAN' => 'Ruangan', 'RUANGAN' => 'Ruangan',
'TOPIK' => 'Topik', 'TOPIK' => 'Topik',
'SUB_TOPIK' => 'Sub Topik', 'SUB_TOPIK' => 'Sub Topik',
'OBJEKTIF' => 'Objektif', 'OBJEKTIF' => 'Objektif',
'AKTIFITAS' => 'Aktifitas', 'AKTIFITAS' => 'Aktifitas',
'PIC' => 'Pic', 'PIC' => 'Pengajar',
'METODE' => 'Metode', 'METODE' => 'Metode',
'ALAT_BANTU' => 'Alat Bantu', 'ALAT_BANTU' => 'Alat Bantu',
'KET' => 'Ket', 'KET' => 'Ket',
...@@ -134,17 +134,45 @@ class DJadwal extends CActiveRecord { ...@@ -134,17 +134,45 @@ class DJadwal extends CActiveRecord {
$criteria->compare('ALAT_BANTU', $this->ALAT_BANTU, true); $criteria->compare('ALAT_BANTU', $this->ALAT_BANTU, true);
$criteria->compare('KET', $this->KET, true); $criteria->compare('KET', $this->KET, true);
$criteria->compare('LAST_UPDATE', $this->LAST_UPDATE, true); $criteria->compare('LAST_UPDATE', $this->LAST_UPDATE, true);
$criteria->compare('USER_ID', $this->USER_ID, true); $criteria->compare('USER_ID', $this->USER_ID);
$criteria->compare('WS', $this->WS, true); $criteria->compare('WS', $this->WS);
return new CActiveDataProvider($this, array( return new CActiveDataProvider($this, array(
'criteria' => $criteria, 'criteria' => $criteria,
)); ));
} }
public function beforeSave() { public function searchByIDJadwal($id) {
$this->TANGGAL = date('Y-m-d', strtotime($this->TANGGAL)); // Warning: Please modify the following code to remove attributes that
return parent::beforeSave(); // should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('ID', $this->ID);
$criteria->compare('ID_JADWAL', $id, true);
$criteria->compare('SESSION', $this->SESSION);
$criteria->compare('START_TIME', $this->START_TIME, true);
$criteria->compare('END_TIME', $this->END_TIME, true);
$criteria->compare('KODE_MK', $this->KODE_MK, true);
$criteria->compare('RUANGAN', $this->RUANGAN, true);
$criteria->compare('TOPIK', $this->TOPIK, true);
$criteria->compare('SUB_TOPIK', $this->SUB_TOPIK, true);
$criteria->compare('OBJEKTIF', $this->OBJEKTIF, true);
$criteria->compare('AKTIFITAS', $this->AKTIFITAS, true);
$criteria->compare('PIC', $this->PIC, true);
$criteria->compare('METODE', $this->METODE, true);
$criteria->compare('ALAT_BANTU', $this->ALAT_BANTU, true);
$criteria->compare('KET', $this->KET, true);
$criteria->compare('LAST_UPDATE', $this->LAST_UPDATE, true);
$criteria->compare('USER_ID', $this->USER_ID);
$criteria->compare('WS', $this->WS);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'pagination' => array(
'pageSize' => 50,
),
));
} }
} }
...@@ -67,10 +67,10 @@ class MJadwal extends CActiveRecord { ...@@ -67,10 +67,10 @@ class MJadwal extends CActiveRecord {
public function attributeLabels() { public function attributeLabels() {
return array( return array(
'ID' => 'ID', 'ID' => 'ID',
'WEEK' => 'Week', 'WEEK' => 'Minggu',
'TANGGAL' => 'Tanggal', 'TANGGAL' => 'Tanggal',
'TA' => 'Ta', 'TA' => 'Tahun Ajaran',
'ID_KUR' => 'Id Kur', 'ID_KUR' => 'Kurikulum',
'KELAS' => 'Kelas', 'KELAS' => 'Kelas',
); );
} }
......
...@@ -188,7 +188,8 @@ $baseUrl = Yii::app()->assetManager->publish($imagePath); ...@@ -188,7 +188,8 @@ $baseUrl = Yii::app()->assetManager->publish($imagePath);
$sesi = $itemCSBD['SESSION']; $sesi = $itemCSBD['SESSION'];
$modelStatus = BeritaAcaraDaftarHadir::model()->findBySql(" SELECT * FROM berita_acara_daftar_hadir badh JOIN d_jadwal dj ON badh.`ID_DETAIL_JADWAL`=dj.`ID` JOIN m_jadwal mj ON dj.`ID_JADWAL`=mj.`ID` $modelStatus = BeritaAcaraDaftarHadir::model()->findBySql(" SELECT * FROM berita_acara_daftar_hadir badh JOIN d_jadwal dj ON badh.`ID_DETAIL_JADWAL`=dj.`ID` JOIN m_jadwal mj ON dj.`ID_JADWAL`=mj.`ID`
WHERE mj.`TA`= '$TAjaran' AND dj.`KODE_MK` = '$mata_kuliah' AND mj.`KELAS` = '$kelas' AND badh.NIM = '$modelnim' AND mj.TANGGAL = '$tggl' AND dj.SESSION = '$sesi'"); WHERE mj.`TA`= '$TAjaran' AND dj.`KODE_MK` = '$mata_kuliah' AND mj.`KELAS` = '$kelas' AND badh.NIM = '$modelnim' AND mj.TANGGAL = '$tggl' AND dj.SESSION = '$sesi'");
echo $modelStatus->STATUS;
echo ($modelStatus->STATUS == "A" ? "-" : "Hadir");
?> ?>
</td> </td>
<?php <?php
......
<?php <?php
$this->breadcrumbs=array( $this->breadcrumbs = array(
'Djadwals'=>array('index'), 'Djadwals' => array('index'),
'Create', 'Create',
); );
$this->menu=array( $this->menu = array(
array('label'=>'List DJadwal','url'=>array('index')), array('label' => 'List DJadwal', 'url' => array('index')),
array('label'=>'Manage DJadwal','url'=>array('admin')), array('label' => 'Manage DJadwal', 'url' => array('admin')),
); );
?> ?>
<h1>Create DJadwal</h1> <h1>Create DJadwal</h1>
<?php echo $this->renderPartial('_form', array('model'=>$model)); ?> <?php echo $this->renderPartial('_form', array('model' => $model)); ?>
\ No newline at end of file \ No newline at end of file
<?php <div class="page-header">
$this->breadcrumbs=array( <h1>Lihat Detail Jadwal<small> &nbsp;&nbsp;&nbsp;<?php echo "Tanggal : " . $model->idjadwal->TANGGAL . " , Kelas : " . $model->idjadwal->KELAS ?></small></h1>
'Djadwals'=>array('index'), </div>
$model->ID,
);
$this->menu=array( <?php
array('label'=>'List DJadwal','url'=>array('index')), $this->widget('booster.widgets.TbDetailView', array(
array('label'=>'Create DJadwal','url'=>array('create')), 'data' => $model,
array('label'=>'Update DJadwal','url'=>array('update','id'=>$model->ID)), 'attributes' => array(
array('label'=>'Delete DJadwal','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->ID),'confirm'=>'Are you sure you want to delete this item?')), array(
array('label'=>'Manage DJadwal','url'=>array('admin')), 'header' => 'Sesi',
); 'name' => 'Sesi',
'value' => $model->SESSION,
),
array(
'header' => 'Waktu Mulai',
'name' => 'Waktu Mulai',
'value' => $model->START_TIME,
),
array(
'header' => 'Waktu Selesai',
'name' => 'Waktu Selesai',
'value' => $model->END_TIME,
),
array(
'header' => 'Kode Mata Kuliah',
'name' => 'Kode Mata Kuliah',
'value' => $model->KODE_MK,
),
array(
'header' => 'Ruangan',
'name' => 'Ruangan',
'value' => $model->RUANGAN,
),
array(
'header' => 'Aktifitas',
'name' => 'Aktifitas',
'value' => $model->AKTIFITAS,
),
array(
'header' => 'Pengajar',
'name' => 'Pengajar',
'value' => $model->pic->NAMA,
),
),
));
?> ?>
<h1>View DJadwal #<?php echo $model->ID; ?></h1> <BR>
<h3 class="header">Mahasiswa Yang Mengikuti Jadwal
<span class="header-line"></span> </h3>
<?php
$this->widget('booster.widgets.TbGridView', array(
'id' => 'berita-acara-daftar-hadir-grid',
'dataProvider' => $daftarhadir,
'columns' => array(
'NIM',
array(
'header' => 'Nama',
'name' => 'Nama',
'value' => '$data->nim->NAMA'
),
array(
'header' => 'Status',
'name' => 'Status',
'type' => 'raw',
'value' => '($data->STATUS) == "A"? "Absen":"Hadir"'
),
'WAKTU_ABSEN'
),
));
?>
<?php $this->widget('booster.widgets.TbDetailView',array(
'data'=>$model,
'attributes'=>array(
'ID',
'ID_JADWAL',
'SESSION',
'START_TIME',
'END_TIME',
'KODE_MK',
'RUANGAN',
'TOPIK',
'SUB_TOPIK',
'OBJEKTIF',
'AKTIFITAS',
'PIC',
'METODE',
'ALAT_BANTU',
'KET',
'LAST_UPDATE',
'USER_ID',
'WS',
),
)); ?>
<?php <?php
$sql_id_kur = "SELECT ID_KUR FROM kurikulum ORDER BY ID_KUR DESC LIMIT 1";
$last_id_kur = Yii::app()->db->createCommand($sql_id_kur)->queryAll();
$last = $last_id_kur[0]['ID_KUR'];
$form = $this->beginWidget('booster.widgets.TbActiveForm', array( $form = $this->beginWidget('booster.widgets.TbActiveForm', array(
'id' => 'mjadwal-form', 'id' => 'mjadwal-form',
'enableAjaxValidation' => false, 'enableAjaxValidation' => false,
)); ));
?> ?>
<p class="help-block">Fields with <span class="required">*</span> are required.</p>
<?php echo $form->errorSummary($model); ?>
<?php <?php
echo $form->dropDownListGroup( echo $form->dropDownListGroup(
...@@ -16,7 +17,7 @@ echo $form->dropDownListGroup( ...@@ -16,7 +17,7 @@ echo $form->dropDownListGroup(
), ),
'widgetOptions' => array( 'widgetOptions' => array(
'data' => array( 'data' => array(
'-- Pilih Week --', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15' 'Pilih Minggu', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'
), ),
'htmlOptions' => array(), 'htmlOptions' => array(),
) )
...@@ -24,7 +25,7 @@ echo $form->dropDownListGroup( ...@@ -24,7 +25,7 @@ echo $form->dropDownListGroup(
); );
?> ?>
<?php echo $form->datePickerGroup($model, 'TANGGAL', array('widgetOptions' => array('options' => array(), 'htmlOptions' => array('class' => 'span5')), 'prepend' => '<i class="glyphicon glyphicon-calendar"></i>', 'append' => 'Click on Month/Year to select a different Month/Year.')); ?> <?php echo $form->datePickerGroup($model, 'TANGGAL', array('widgetOptions' => array('options' => array(), 'htmlOptions' => array('class' => 'span5')), 'prepend' => '<i class="glyphicon glyphicon-calendar"></i>', 'append' => 'Pilih Tanggal Jadwal.')); ?>
<?php <?php
$ta = CHtml::listData(Registrasi::model()->findAll( $ta = CHtml::listData(Registrasi::model()->findAll(
...@@ -81,11 +82,10 @@ echo $form->dropDownListGroup( ...@@ -81,11 +82,10 @@ echo $form->dropDownListGroup(
'widgetOptions' => array( 'widgetOptions' => array(
'data' => $idkur, 'data' => $idkur,
'htmlOptions' => array( 'htmlOptions' => array(
'prompt' => '--Select ID Kurikulum--',
'ajax' => array( 'ajax' => array(
'type' => 'POST', 'type' => 'POST',
'url' => CController::createUrl('Jadwal/matkul'), 'url' => CController::createUrl('MJadwal/matkul'),
'update' => '#' . CHtml::activeID($model, 'KODE_MK'), 'update' => '#' . CHtml::activeID($djadwal, 'KODE_MK'),
), ),
), ),
) )
...@@ -93,62 +93,68 @@ echo $form->dropDownListGroup( ...@@ -93,62 +93,68 @@ echo $form->dropDownListGroup(
); );
?> ?>
<?php
echo CHtml::link('Tambah Jadwal', '#', array('id' => 'loadChildByAjax'));
?>
<div id="children">
<?php
$index = 0;
foreach ($model->djadwal as $id => $child):
$this->renderPartial('/dJadwal/_form', array(
'model' => $child,
'index' => $id,
'display' => 'block'
));
$index++;
endforeach;
?>
</div>
<div style="clear:both;"></div>
<BR><BR> <BR><BR>
<?php for ($i = 0; $i < 8; $i++) { ?>
<div class="well">
<fieldset>
<legend>Sesi <?php echo $i + 1 ?></legend>
<?php // echo $form->textFieldGroup($djadwal, '[' . $i . ']SESSION', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'placeholder' => 'Sesi')))); ?>
Sesi Kosong ? <input type="checkbox" name="formsesi[]" value="Yes" />
<BR>
<BR>
<?php
$kuliah = CHtml::listData(Kurikulum::model()->findAll(array(
'condition' => "ID_KUR = '$last'",)), 'KODE_MK', 'KODE_MK');
echo $form->dropDownListGroup($djadwal, '[' . $i . ']KODE_MK', array(
'wrapperHtmlOptions' => array(
'class' => 'col-sm-5',
),
'widgetOptions' => array(
'data' => $kuliah,
'htmlOptions' => array(
'ajax' => array(
'type' => 'POST',
'url' => CController::createUrl('Jadwal/deskripsi'),
'update' => '#agan'
)
),
)
)
);
?>
<?php
$data = CHtml::listData(Ruangan ::model()->findAll(), 'ID', 'SHORT_NAME');
echo $form->dropDownListGroup($djadwal, '[' . $i . ']RUANGAN', array('wrapperHtmlOptions' => array(
'class' => 'col-sm-5',
),
'widgetOptions' => array(
'data' => $data,
'htmlOptions' => array(
),
)
)
);
?>
<?php echo $form->dropDownListGroup($djadwal, '[' . $i . ']AKTIFITAS', array('widgetOptions' => array('data' => array("Teori" => "Teori", "Praktikum" => "Praktikum", "Mandiri" => "Mandiri",), 'htmlOptions' => array('class' => 'input-large', 'placeholder' => 'Aktifitas')))); ?>
</fieldset>
</div>
<?php } ?>
<div class="form-actions"> <div class="form-actions">
<?php <?php
$this->widget('booster.widgets.TbButton', array( $this->widget('booster.widgets.TbButton', array(
'buttonType' => 'submit', 'buttonType' => 'submit',
'context' => 'primary', 'context' => 'primary',
'label' => $model->isNewRecord ? 'Create' : 'Save', 'label' => $model->isNewRecord ? 'Buat Baru' : 'Save',
)); ));
?> ?>
</div> </div>
<?php $this->endWidget(); ?> <?php $this->endWidget(); ?>
<?php
Yii::app()->clientScript->registerCoreScript('jquery');
Yii::app()->clientScript->registerScript('loadchild', '
var _index = ' . $index . ';
$("#loadChildByAjax").click(function(e){
e.preventDefault();
var _url = "' . Yii::app()->controller->createUrl("loadChildByAjax", array("load_for" => $this->action->id)) . '&index="+_index;
$.ajax({
url: _url,
success:function(response){
$("#children").append(response);
$("#children .crow").last().animate({
opacity : 1,
left: "+50",
height: "toggle"
});
}
});
_index++;
});
', CClientScript::POS_END);
?>
<div class="view"> <div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('ID')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('ID')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->ID),array('view','id'=>$data->ID)); ?> <?php echo CHtml::link(CHtml::encode($data->ID), array('view', 'id' => $data->ID)); ?>
<br /> <br />
<b><?php echo CHtml::encode($data->getAttributeLabel('WEEK')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('WEEK')); ?>:</b>
<?php echo CHtml::encode($data->WEEK); ?> <?php echo CHtml::encode($data->WEEK); ?>
<br /> <br />
<b><?php echo CHtml::encode($data->getAttributeLabel('TANGGAL')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('TANGGAL')); ?>:</b>
<?php echo CHtml::encode($data->TANGGAL); ?> <?php echo CHtml::encode($data->TANGGAL); ?>
<br /> <br />
<b><?php echo CHtml::encode($data->getAttributeLabel('TA')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('TA')); ?>:</b>
<?php echo CHtml::encode($data->TA); ?> <?php echo CHtml::encode($data->TA); ?>
<br /> <br />
<b><?php echo CHtml::encode($data->getAttributeLabel('ID_KUR')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('ID_KUR')); ?>:</b>
<?php echo CHtml::encode($data->ID_KUR); ?> <?php echo CHtml::encode($data->ID_KUR); ?>
<br /> <br />
<b><?php echo CHtml::encode($data->getAttributeLabel('KELAS')); ?>:</b> <b><?php echo CHtml::encode($data->getAttributeLabel('KELAS')); ?>:</b>
<?php echo CHtml::encode($data->KELAS); ?> <?php echo CHtml::encode($data->KELAS); ?>
<br /> <br />
</div> </div>
\ No newline at end of file
<?php <div class="page-header">
$this->breadcrumbs=array( <h1>Buat Jadwal Baru<small> &nbsp;&nbsp;&nbsp;<?php echo "Satu Kelas Satu Hari Delapan Sesi" ?></small></h1>
'Mjadwals'=>array('index'), </div>
'Create',
);
$this->menu=array( <?php echo $this->renderPartial('_form', array('model' => $model, 'djadwal' => $djadwal)); ?>
array('label'=>'List MJadwal','url'=>array('index')), \ No newline at end of file
array('label'=>'Manage MJadwal','url'=>array('admin')),
);
?>
<h1>Create MJadwal</h1>
<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
\ No newline at end of file
<?php <div class="page-header">
$this->breadcrumbs=array( <h1>Daftar Jadwal<small> &nbsp;&nbsp;&nbsp;<?php echo "" ?></small></h1>
'Mjadwals', </div>
);
$this->menu=array( <?php
array('label'=>'Create MJadwal','url'=>array('create')), $this->widget('booster.widgets.TbListView', array(
array('label'=>'Manage MJadwal','url'=>array('admin')), 'dataProvider' => $dataProvider,
); 'itemView' => '_view',
));
?> ?>
<h1>Mjadwals</h1>
<?php $this->widget('booster.widgets.TbListView',array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>
<?php <?php ?>
$this->breadcrumbs=array(
'Mjadwals'=>array('index'), <div class="page-header">
$model->ID, <h1>Lihat Jadwal</h1>
); </div>
$this->menu=array( <?php
array('label'=>'List MJadwal','url'=>array('index')), $this->widget('booster.widgets.TbDetailView', array(
array('label'=>'Create MJadwal','url'=>array('create')), 'data' => $model,
array('label'=>'Update MJadwal','url'=>array('update','id'=>$model->ID)), 'attributes' => array(
array('label'=>'Delete MJadwal','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->ID),'confirm'=>'Are you sure you want to delete this item?')), array(
array('label'=>'Manage MJadwal','url'=>array('admin')), 'header' => 'Minggu',
); 'name' => 'Minggu',
'value' => $model->WEEK,
),
'TANGGAL',
array(
'header' => 'Tahun Ajaran',
'name' => 'Tahun Ajaran',
'value' => $model->TA,
),
array(
'header' => 'Kurikulum',
'name' => 'Kurikulum',
'value' => $model->ID_KUR,
),
'KELAS',
),
));
?> ?>
<h1>View MJadwal #<?php echo $model->ID; ?></h1> <div style="text-align:right;">
<?php $this->widget('booster.widgets.TbDetailView',array( <?php echo CHtml::button('Perbaharui', array('submit' => array('update', 'id' => $model->ID), 'class' => 'btn btn-small btn-warning')) ?>
'data'=>$model, </div>
'attributes'=>array(
'ID', <BR>
'WEEK', <h3 class="header">Jadwal Yang Ada
'TANGGAL', <span class="header-line"></span> </h3>
'TA', <?php
'ID_KUR', $this->widget('booster.widgets.TbGridView', array(
'KELAS', 'id' => 'berita-acara-daftar-hadir-grid',
), 'dataProvider' => $detail,
)); ?> 'columns' => array(
'SESSION',
'START_TIME',
'END_TIME',
'KODE_MK',
'RUANGAN',
'AKTIFITAS',
array(
'header' => 'Pengajar',
'value' => '$data->pic->NAMA'
),
array(
'header' => 'Aksi',
'class' => 'booster.widgets.TbButtonColumn',
'template' => '{view} {delete}',
'viewButtonUrl' => 'Yii::app()->createUrl(\'djadwal/view\',array(\'id\'=>\'\'.$data->ID.\'\'))',
// 'updateButtonUrl' => null,
'deleteButtonUrl' => 'Yii::app()->createUrl(\'djadwal/view\',array(\'id\'=>\'\'.$data->ID.\'\'))',
// 'buttons' => array(
// 'delete' => array(
// 'click' => 'function(){return false;}'
// )
// )
),
),
));
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment