Commit 54c4077304dd464916a05105bdb2b2658b290752
1 parent
9c91f7e0
Yarik
Showing
3 changed files
with
60 additions
and
29 deletions
Show diff stats
frontend/views/bus-stop/index.php
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use yii\helpers\Html; | |
| 4 | -use yii\grid\GridView; | |
| 3 | + use common\models\BusStop; | |
| 4 | + use yii\helpers\Html; | |
| 5 | + use yii\grid\GridView; | |
| 5 | 6 | |
| 6 | -/* @var $this yii\web\View */ | |
| 7 | -/* @var $searchModel common\models\BusStopSearch */ | |
| 8 | -/* @var $dataProvider yii\data\ActiveDataProvider */ | |
| 7 | + /* @var $this yii\web\View */ | |
| 8 | + /* @var $searchModel common\models\BusStopSearch */ | |
| 9 | + /* @var $dataProvider yii\data\ActiveDataProvider */ | |
| 9 | 10 | |
| 10 | -$this->title = 'Bus Stops'; | |
| 11 | -$this->params['breadcrumbs'][] = $this->title; | |
| 11 | + $this->title = 'Bus Stops'; | |
| 12 | + $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 12 | 13 | ?> |
| 13 | 14 | <div class="bus-stop-index"> |
| 14 | 15 | |
| ... | ... | @@ -16,30 +17,60 @@ $this->params['breadcrumbs'][] = $this->title; |
| 16 | 17 | <?php // echo $this->render('_search', ['model' => $searchModel]); ?> |
| 17 | 18 | |
| 18 | 19 | <p> |
| 19 | - <?= Html::a('Create Bus Stop', ['create'], ['class' => 'btn btn-success']) ?> | |
| 20 | + <?= Html::a('Create Bus Stop', [ 'create' ], [ 'class' => 'btn btn-success' ]) ?> | |
| 20 | 21 | </p> |
| 21 | 22 | <?= GridView::widget([ |
| 22 | 23 | 'dataProvider' => $dataProvider, |
| 23 | - 'filterModel' => $searchModel, | |
| 24 | - 'columns' => [ | |
| 25 | - ['class' => 'yii\grid\SerialColumn'], | |
| 24 | + 'filterModel' => $searchModel, | |
| 25 | + 'columns' => [ | |
| 26 | + [ 'class' => 'yii\grid\SerialColumn' ], | |
| 27 | + [ | |
| 28 | + 'attribute' => 'road_id', | |
| 29 | + 'value' => function($model) { | |
| 30 | + /** | |
| 31 | + * @var BusStop $model | |
| 32 | + */ | |
| 33 | + return $model->road->name; | |
| 34 | + }, | |
| 35 | + ], | |
| 36 | + [ | |
| 37 | + 'attribute' => 'region_id', | |
| 38 | + 'value' => function($model) { | |
| 39 | + /** | |
| 40 | + * @var BusStop $model | |
| 41 | + */ | |
| 42 | + return $model->region->name; | |
| 43 | + }, | |
| 44 | + ], | |
| 45 | + [ | |
| 46 | + 'attribute' => 'location_right', | |
| 47 | + 'value' => function($model) { | |
| 48 | + /** | |
| 49 | + * @var BusStop $model | |
| 50 | + */ | |
| 51 | + return $model->getRightString(); | |
| 52 | + }, | |
| 53 | + ], | |
| 54 | + [ | |
| 55 | + 'attribute' => 'location_left', | |
| 56 | + 'value' => function($model) { | |
| 57 | + /** | |
| 58 | + * @var BusStop $model | |
| 59 | + */ | |
| 60 | + return $model->getLeftString(); | |
| 61 | + }, | |
| 62 | + ], | |
| 63 | + [ | |
| 64 | + 'attribute' => 'state_common_id', | |
| 65 | + 'value' => function($model) { | |
| 66 | + /** | |
| 67 | + * @var BusStop $model | |
| 68 | + */ | |
| 69 | + return $model->stateCommon->value; | |
| 70 | + }, | |
| 71 | + ], | |
| 26 | 72 | |
| 27 | - 'bus_stop_id', | |
| 28 | - 'road_id', | |
| 29 | - 'region_id', | |
| 30 | - 'settlement_id', | |
| 31 | - 'location_right', | |
| 32 | - // 'location_left', | |
| 33 | - // 'surface_type_id', | |
| 34 | - // 'area_stop_availability', | |
| 35 | - // 'area_land_availability', | |
| 36 | - // 'pocket_availability', | |
| 37 | - // 'toilet_availability', | |
| 38 | - // 'year_build', | |
| 39 | - // 'year_repair', | |
| 40 | - // 'state_common_id', | |
| 41 | - | |
| 42 | - ['class' => 'yii\grid\ActionColumn'], | |
| 73 | + [ 'class' => 'yii\grid\ActionColumn' ], | |
| 43 | 74 | ], |
| 44 | 75 | ]); ?> |
| 45 | 76 | </div> | ... | ... |
frontend/views/road-surface/index.php
| ... | ... | @@ -8,7 +8,7 @@ use yii\grid\GridView; |
| 8 | 8 | /* @var $searchModel common\models\RoadSurfaceSearch */ |
| 9 | 9 | /* @var $dataProvider yii\data\ActiveDataProvider */ |
| 10 | 10 | |
| 11 | -$this->title = 'Road Surfaces'; | |
| 11 | +$this->title = 'Покриття доріг'; | |
| 12 | 12 | $this->params['breadcrumbs'][] = $this->title; |
| 13 | 13 | ?> |
| 14 | 14 | <div class="road-surface-index"> | ... | ... |
frontend/views/service-object/index.php
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | /* @var $searchModel common\models\ServiceObjectSearch */ |
| 9 | 9 | /* @var $dataProvider yii\data\ActiveDataProvider */ |
| 10 | 10 | |
| 11 | - $this->title = 'Service Objects'; | |
| 11 | + $this->title = 'Об\'єкти сервісу'; | |
| 12 | 12 | $this->params[ 'breadcrumbs' ][] = $this->title; |
| 13 | 13 | ?> |
| 14 | 14 | <div class="service-object-index"> | ... | ... |