57 lines
1.5 KiB
PHP
Executable File
57 lines
1.5 KiB
PHP
Executable File
<?php
|
|
|
|
use common\models\GisGeoFeatures;
|
|
use yii\helpers\Html;
|
|
use yii\helpers\Url;
|
|
use yii\grid\ActionColumn;
|
|
use yii\grid\GridView;
|
|
|
|
/** @var yii\web\View $this */
|
|
/** @var backend\modules\gis\models\GisGeoFeaturesSearch $searchModel */
|
|
/** @var yii\data\ActiveDataProvider $dataProvider */
|
|
|
|
$this->title = 'ข้อมูลพิกัด';
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
?>
|
|
<div class="gis-geo-features-index">
|
|
|
|
<h1><?= Html::encode($this->title) ?></h1>
|
|
|
|
<p>
|
|
<?= Html::a('เพิ่มข้อมูล', ['create'], ['class' => 'btn btn-success']) ?>
|
|
</p>
|
|
|
|
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
|
|
|
<?= GridView::widget([
|
|
'dataProvider' => $dataProvider,
|
|
'filterModel' => $searchModel,
|
|
'columns' => [
|
|
['class' => 'yii\grid\SerialColumn'],
|
|
|
|
//'id',
|
|
[
|
|
'attribute' => 'gis_base_id',
|
|
'value' => function($model) {
|
|
return $model->gisBase->name;
|
|
}
|
|
],
|
|
'name',
|
|
//'geometry',
|
|
//'type',
|
|
//'created_at',
|
|
//'updated_at',
|
|
//'created_by',
|
|
//'updated_by',
|
|
[
|
|
'class' => ActionColumn::className(),
|
|
'urlCreator' => function ($action, GisGeoFeatures $model, $key, $index, $column) {
|
|
return Url::toRoute([$action, 'id' => $model->id]);
|
|
}
|
|
],
|
|
],
|
|
]); ?>
|
|
|
|
|
|
</div>
|