/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $jabatan = StatusJabatan::find($id);
     if ($jabatan->delete()) {
         return Response::json(array('success' => TRUE));
     }
 }
Esempio n. 2
0
?>
				<?php 
echo $form->error($model, 'tanggal_selesai_pangkat');
?>
			</div>

		</div>
		<div class="tab-pane fade" id="dtjabatan">


			<div class="row">
				<?php 
echo $form->labelEx($model, 'id_status_jabatan');
?>
				<?php 
$this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[id_status_jabatan]', 'value' => $model->id_status_jabatan, 'data' => array('' => 'Semua') + CHtml::listData(StatusJabatan::model()->findAll(), 'id_status_jabatan', 'nama_jabatan')));
?>
				<?php 
echo $form->error($model, 'id_status_jabatan');
?>
			</div>
			<br>

			<div class="row">
				<?php 
echo $form->labelEx($model, 'id_jabatan');
?>
				<?php 
$this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[id_jabatan]', 'value' => $model->id_jabatan, 'data' => array('' => 'Semua') + CHtml::listData(Jabatan::model()->findAll(), 'id_jabatan', 'nama_jabatan')));
?>
				<?php 
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $data = array('jabatan' => Jabatan::DropdownJabatan(), 'unitkerja' => UnitKerja::DropdownUnit(), 'lokasikerja' => LokasiKerja::DropdownLokasiKerja(), 'eselon' => Eselon::DropdownEselon(), 'statusjabatan' => StatusJabatan::DropdownStatusJabatan());
     return Response::json($data);
 }
 /**
  * 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 StatusJabatan the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = StatusJabatan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $data = array('status' => StatusPegawai::DropdownStatusPegawai(), 'golongan' => Golongan::DropdownGolongan(), 'jabatan' => Jabatan::DropdownJabatan(), 'unitkerja' => UnitKerja::DropdownUnit(), 'satuankerja' => SatuanKerja::DropdownSatKer(), 'lokasikerja' => LokasiKerja::DropdownLokasiKerja(), 'eselon' => Eselon::DropdownEselon(), 'statusjabatan' => StatusJabatan::DropdownStatusJabatan());
     return Response::json($data);
 }