コード例 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $telo = UnitKerja::find($id);
     $data = array('value' => $telo, 'unitkerja' => UnitKerja::DropDownUnit($id), 'eselon' => Eselon::DropdownEselon());
     return Response::json($data);
 }
コード例 #2
0
 public function getNamaEselonAttribute()
 {
     $name = $this->attributes['id_eselon'];
     $data = Eselon::find($name);
     if ($data) {
         return $data->nama_eselon;
     }
     return '-';
 }
コード例 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $eselon = Eselon::find($id);
     if ($eselon->delete()) {
         return Response::json(array('success' => TRUE));
     }
 }
コード例 #4
0
ファイル: user.php プロジェクト: beruxganteng/apnthc
		<th>No</th>
		<th>Nama Pegawai</th>
		<th>Nama User</th>
		<th>Role</th>
		<th>Aksi</th>
	</thead>
	<tbody>
		<?php 
    if ($this->count > 0) {
        $no = 0;
        foreach ($this->data as $key => $value) {
            echo "<tr>";
            echo "<td>" . ++$no . "</td>";
            echo "<td class='text-left'>" . $value['id_pegawai'] . "</td>";
            echo "<td class='text-left'>" . $value['nama_user'] . "</td>";
            echo "<td>" . Eselon::to_role($value['role']) . "</td>";
            echo "<td><a href=" . URL . "referensi/ubahUser/" . $value['id'] . "><i class='step fi-page-edit size-24' title='ubah'></i></a> | \n\t\t\t\t<a href=" . URL . "referensi/hapusUser/" . $value['id'] . " onclick=\"return rdelete('user');\"><i class='step fi-trash size-24' title='hapus'></i></a></td>";
            echo "</tr>";
        }
    } else {
        ?>
			<tr>
				<td colspan="5" class="no-data">DATA TIDAK DITEMUKAN</td>
			</tr>
		<?php 
    }
    ?>
	</tbody>
</table>
<script type="text/javascript">
	$(document).ready(function() {
コード例 #5
0
ファイル: _form.php プロジェクト: eoctav/simpeg-yii
echo $form->labelEx($model, 'tanggal_selesai_jabatan');
?>
				<?php 
echo $form->dateField($model, 'tanggal_selesai_jabatan', array('size' => 50, 'maxlength' => 50, 'class' => 'input-block-level'));
?>
				<?php 
echo $form->error($model, 'tanggal_selesai_jabatan');
?>
			</div>

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

			<div class="row">
				<?php 
echo $form->labelEx($model, 'tmt_eselon');
?>
				<?php 
echo $form->textField($model, 'tmt_eselon', array('size' => 50, 'maxlength' => 50, 'class' => 'input-block-level'));
?>
				<?php 
コード例 #6
0
 /**
  * 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);
 }
コード例 #7
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 $id the ID of the model to be loaded
  * @return Eselon the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Eselon::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #8
0
 /**
  * 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);
 }
コード例 #9
0
ファイル: pegawai.php プロジェクト: beruxganteng/apnthc
		<th>Nama</th>
		<th>Eselon</th>
		<th>Jabatan</th>
		<th>Unit</th>
		<th>Aksi</th>
	</thead>
	<tbody>
		<?php 
    if ($this->count > 0) {
        $no = 0;
        foreach ($this->data as $key => $value) {
            echo "<tr>";
            echo "<td>" . ++$no . "</td>";
            echo "<td>" . $value['nip'] . "</td>";
            echo "<td class='text-left'>" . $value['nama'] . "</td>";
            echo "<td>" . Eselon::to_eselon($value['eselon']) . "</td>";
            echo "<td class='text-left'>" . $value['jabatan'] . "</td>";
            echo "<td class='text-left'>" . $value['unit'] . "</td>";
            echo "<td><a href=" . URL . "referensi/ubahPegawai/" . $value['id'] . "><i class='step fi-page-edit size-24' title='ubah'></i></a> | \n\t\t\t\t<a href=" . URL . "referensi/hapusPegawai/" . $value['id'] . " onclick=\"return rdelete('pegawai');\"><i class='step fi-trash size-24' title='hapus'></i></a></td>";
            echo "</tr>";
        }
    } else {
        ?>
			<tr>
				<td colspan="5" class="no-data">DATA TIDAK DITEMUKAN</td>
			</tr>
		<?php 
    }
    ?>
	</tbody>
</table>