tesst

parent f8c05d3e
......@@ -4,7 +4,7 @@ namespace backend\modules\evin\controllers;
use Yii;
use backend\modules\evin\models\EvinTahunan;
use backend\modules\evin\models\EvinTahunanPertanyaanSearch;
use backend\modules\evin\models\EvinTahunanSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
......@@ -35,7 +35,7 @@ class EvintahunanController extends Controller
*/
public function actionIndex()
{
$searchModel = new EvinTahunanPertanyaanSearch();
$searchModel = new EvinTahunanSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
......
......@@ -3,6 +3,7 @@
namespace backend\modules\evin\controllers;
use Yii;
use backend\modules\evin\models\EvinTahunanPertanyaan;
use backend\modules\evin\models\EvinTahunanJawaban;
use backend\modules\evin\models\EvinTahunanJawabanSearch;
use yii\web\Controller;
......
<?php
namespace backend\modules\evin\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\evin\models\EvinTahunan;
/**
* EvinTahunanSearch represents the model behind the search form about `backend\modules\evin\models\EvinTahunan`.
*/
class EvinTahunanSearch extends EvinTahunan
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['evaluasi_tahunan_id', 'ta'], 'integer'],
[['nama', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'update_by'], 'safe'],
[['nilai'], 'number'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = EvinTahunan::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'evaluasi_tahunan_id' => $this->evaluasi_tahunan_id,
'ta' => $this->ta,
'nilai' => $this->nilai,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
]);
$query->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'update_by', $this->update_by]);
return $dataProvider;
}
}
......@@ -18,17 +18,6 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'nilai')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'update_by')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
......@@ -4,7 +4,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\evin\models\EvinTahunanPertanyaanSearch */
/* @var $model backend\modules\evin\models\EvinTahunanSearch */
/* @var $form yii\widgets\ActiveForm */
?>
......
......@@ -4,7 +4,7 @@ use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\evin\models\EvinTahunanPertanyaanSearch */
/* @var $searchModel backend\modules\evin\models\EvinTahunanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Evin Tahunans';
......@@ -24,11 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'evaluasi_tahunan_id',
//'evaluasi_tahunan_id',
'ta',
'nama',
'nilai',
'deleted_at',
//'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
......
......@@ -2,7 +2,8 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use backend\modules\evin\models\EvinTahunanPertanyaan;
/* @var $this yii\web\View */
/* @var $model backend\modules\evin\models\EvinTahunanJawaban */
/* @var $form yii\widgets\ActiveForm */
......@@ -14,24 +15,10 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'tahunan_jawaban_id')->textInput() ?>
<?= $form->field($model, 'tahunan_pertanyaan_id')->textInput() ?>
<?= $form->field($model, 'tahunan_pertanyaan_id')->dropDownList(ArrayHelper::map(EvinTahunanPertanyaan::find()->all(),'tahunan_pertanyaan_id','pertanyaan'),['prompt'=>'--Pilih pertanyaan--'])?>
<?= $form->field($model, 'jawaban')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'peserta')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'dosen_id')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput() ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
......
......@@ -24,11 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'tahunan_jawaban_id',
//'tahunan_jawaban_id',
'tahunan_pertanyaan_id',
'jawaban:ntext',
'peserta',
'dosen_id',
//'peserta',
//'dosen_id',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
......
......@@ -23,16 +23,6 @@ use backend\modules\evin\models\EvinTahunanKategori;
<?= $form->field($model, 'pertanyaan')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'update_by')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
......
......@@ -129,6 +129,8 @@ $this->beginPage();
<?php
MenuRenderer::renderSidebarMenu(\Yii::$app->params['sidebarMenu']);
?>
<li><a href="http://localhost/cis-lite/backend/web/index.php/evin/tahunanpertanyaan/index"><i class="fa fa-circle-o text-aqua"></i> <span>Mengelola Pertanyaan</span></a></li>
<li><a href="http://localhost/cis-lite/backend/web/index.php/evin/tahunanjawaban/index"><i class="fa fa-circle-o text-aqua"></i> <span>Mengelola Jawaban</span></a></li>
<!-- <li class="header">LABELS</li>
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
......
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