title = 'Road Surfaces'; $this->params['breadcrumbs'][] = $this->title; ?>
= Html::a('Create Road Surface', ['create'], ['class' => 'btn btn-success']) ?>
= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => null, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'road_id', 'value' => function($model) { /** * @var RoadSurface $model */ return $model->road->name; } ], [ 'attribute' => 'region_id', 'value' => function($model) { /** * @var RoadSurface $model */ return $model->region->name; } ], [ 'attribute' => 'road_direction_id', 'value' => function($model) { /** * @var RoadSurface $model */ return $model->roadDirection->direction_name; } ], [ 'attribute' => 'begin', 'value' => function($model) { /** * @var RoadSurface $model */ return $model->getBeginString(); } ], [ 'attribute' => 'end', 'value' => function($model) { /** * @var RoadSurface $model */ return $model->getEndString(); } ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?>