function DateToIndo($date) { $BulanIndo = array("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"); $tahun = substr($date, 0, 4); $bulan = substr($date, 5, 2); $tgl = substr($date, 8, 2); $result = $tgl . " " . $BulanIndo[(int) $bulan - 1] . " " . $tahun; return $result; } use yii\helpers\Html; use yii\grid\GridView; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use app\models\HrdJadwal; $HrdJadwal = new HrdJadwal(); $this->title = 'Jadwal Tes'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="side"> <div class="sub-sidebar-wrapper"> <ul class="nav"> <?php echo Nav::widget(['items' => [['label' => 'Lowongan Tawaran', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/rekrut'])]], ['label' => 'Data Pelamar Lowongan', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/pelamar'])]], ['label' => 'Materi Tes', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/materi'])]], ['label' => 'Jadwal Tes', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/jadwal'])]], ['label' => 'Hasil Tes', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/hasil'])]], ['label' => 'Pelamar Lolos Tes', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/lolos'])]]]]); ?> </ul> </div> </div> <div class="col-md-12"> <div class="widget widget-green"> <div class="widget-title">
public function actionDeleteJadwal() { if ($this->isDeleteAllowed()) { $this->layout = 'hrd'; if (Yii::$app->request->get()) { HrdJadwal::deleteAll('id_Jadwal_tes = ' . Yii::$app->request->get()['id']); return $this->render('index_Jadwal'); } return $this->render('index_Jadwal'); } else { echo "You don't have access here"; die; } }
<?php use yii\helpers\Html; use yii\grid\GridView; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use yii\bootstrap\ActiveForm; use app\models\HrdMateri; use app\models\HrdJadwal; $HrdMateri = new HrdMateri(); $myData = HrdJadwal::find()->where(['id_jadwal_tes' => Yii::$app->request->get()['id']])->asArray()->one(); $this->title = 'Edit Jadwal Tes'; $this->params['breadcrumbs'][] = $this->title; ?> <?php $form = ActiveForm::begin(['id' => 'create-materi', 'options' => ['class' => 'form-horizontal', 'data-toggle' => 'validator'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-1 control-label']]]); ?> <div class="side"> <div class="sub-sidebar-wrapper"> <ul class="nav"> <?php echo Nav::widget(['items' => [['label' => 'Data Pribadi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/profil'])]], ['label' => 'Data Penempatan Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/posisi'])]], ['label' => 'Data Departemen Perusahaan', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/departement'])]], ['label' => 'Data Prestasi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/prestasi'])]]]]); ?> </ul> </div> </div> <div class="col-md-12"> <div class="widget widget-green"> <div class="widget-title"> <div class="widget-controls">