Ejemplo n.º 1
0
</td>
                                        <td align="center"><?php 
        echo Yii::t('Program Studi', 'Keterangan');
        ?>
</td>
                                        <td align="center"><?php 
        echo Yii::t('Program Studi', 'Aksi');
        ?>
</td>
                                    </tr>
                                    <?php 
        foreach ($programstudi as $programstudi_1) {
            echo '<tr id="batchrow' . $programstudi_1->id . '">';
            echo '<td align="center";">' . $programstudi_1->kode_program_studi . '</td>';
            echo '<td style="text-align:left; padding-left:10px; font-weight:bold;">' . CHtml::link($programstudi_1->nama_program_studi, array('batches/batchstudents', 'id' => $programstudi_1->id)) . '</td>';
            $jenjang = Jenjang::model()->findByAttributes(array('id' => $programstudi_1->id_jenjang));
            echo '<td align="center">';
            if ($jenjang) {
                echo $jenjang->kode_jenjang . ' - ' . $jenjang->nama_jenjang;
            } else {
                echo '-';
            }
            echo '</td>';
            echo '<td style="text-align:left; padding-left:10px;">' . $programstudi_1->keterangan . '</td>';
            echo '<td align="center"  class="sub_act">';
            ?>
                                            <?php 
            echo CHtml::ajaxLink(Yii::t('Program Studi', 'Ubah'), $this->createUrl('programstudi/addupdate'), array('onclick' => '$("#jobDialog123").dialog("open"); return false;', 'update' => '#jobDialog123', 'type' => 'GET', 'data' => array('val1' => $programstudi_1->id, 'course_id' => $programstudi_1->id), 'dataType' => 'text'), array('id' => 'showJobDialog12' . $programstudi_1->id, 'class' => 'add'));
            echo '' . CHtml::ajaxLink("Hapus", $this->createUrl('programstudi/remove'), array('success' => 'rowdelete(' . $programstudi_1->id . ')', 'type' => 'GET', 'data' => array('val1' => $programstudi_1->id), 'dataType' => 'text'), array('confirm' => "Apakah anda yakin ingin menghapus data ini?"));
            echo '</tr>';
            echo '<div id="jobDialog123"></div>';
Ejemplo n.º 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)
 {
     $model = Jenjang::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }