Exemple #1
0
/* @var $this yii\web\View */
/* @var $model app\modules\kerja\models\DataKerja */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Data Kerjas'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-kerja-view">
 <?php 
echo $this->render('_menu');
?>
 
    <!--<h1><?php 
echo Html::encode($this->title);
?>
</h1>-->

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['judul', 'tipe', 'klien', 'marketing', 'programmer', 'reminder_email:email', 'status_pekerjaan', ['attribute' => 'informasi', 'format' => 'raw'], ['attribute' => 'status', 'format' => 'raw', 'value' => DataKerja::data_status($model)], 'created_at', 'modified_at']]);
?>

</div>
Exemple #2
0
use yii\helpers\Html;
use app\modules\kerja\models\DataKerja;
//use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\kerja\models\search\DataKerjaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Data Kerjas');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-kerja-index">
 <?php 
echo $this->render('_menu');
?>
 
    <!--<h1><?php 
echo Html::encode($this->title);
?>
</h1>-->
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

 
    <?php 
echo DynaGrid::widget(['options' => ['id' => Yii::$app->controller->id . "-" . Yii::$app->controller->action->id . "-" . Yii::$app->user->identity->id], 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel], 'columns' => [['attribute' => 'status', 'format' => 'raw', 'filter' => DataKerja::status(), 'value' => function ($data) {
    return DataKerja::data_status($data);
}, 'visible' => true], ['attribute' => 'judul', 'visible' => true], ['attribute' => 'status_pekerjaan', 'visible' => true], ['attribute' => 'marketing', 'visible' => true], ['attribute' => 'programmer', 'visible' => true], ['attribute' => 'tipe', 'visible' => true], ['attribute' => 'klien', 'visible' => true], ['attribute' => 'reminder_email', 'visible' => true], ['attribute' => 'created_at', 'visible' => false], ['attribute' => 'modified_at', 'visible' => false], ['class' => 'kartik\\grid\\ActionColumn']]]);
?>
 
</div>