From 984ae8aafb298057bd2171e602b910b5e9b422c3 Mon Sep 17 00:00:00 2001 From: Eugeny Galkovskiy Date: Tue, 12 Jul 2016 18:36:04 +0300 Subject: [PATCH] 120716 --- common/models/RoadToCategory.php | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/RoadToCategorySearch.php | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/RoadWidth.php | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/RoadWidthSearch.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160712_142430_create_road_width.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/RoadToCategoryController.php | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/RoadWidthController.php | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-to-category/_form.php | 38 ++++++++++++++++++++++++++++++++++++++ frontend/views/road-to-category/_search.php | 39 +++++++++++++++++++++++++++++++++++++++ frontend/views/road-to-category/create.php | 29 +++++++++++++++++++++++++++++ frontend/views/road-to-category/index.php | 38 ++++++++++++++++++++++++++++++++++++++ frontend/views/road-to-category/update.php | 29 +++++++++++++++++++++++++++++ frontend/views/road-to-category/view.php | 41 +++++++++++++++++++++++++++++++++++++++++ frontend/views/road-width/_form.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-width/_search.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-width/create.php | 27 +++++++++++++++++++++++++++ frontend/views/road-width/index.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-width/update.php | 27 +++++++++++++++++++++++++++ frontend/views/road-width/view.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 19 files changed, 1178 insertions(+), 0 deletions(-) create mode 100644 common/models/RoadToCategory.php create mode 100644 common/models/RoadToCategorySearch.php create mode 100644 common/models/RoadWidth.php create mode 100644 common/models/RoadWidthSearch.php create mode 100644 console/migrations/m160712_142430_create_road_width.php create mode 100644 frontend/controllers/RoadToCategoryController.php create mode 100644 frontend/controllers/RoadWidthController.php create mode 100644 frontend/views/road-to-category/_form.php create mode 100644 frontend/views/road-to-category/_search.php create mode 100644 frontend/views/road-to-category/create.php create mode 100644 frontend/views/road-to-category/index.php create mode 100644 frontend/views/road-to-category/update.php create mode 100644 frontend/views/road-to-category/view.php create mode 100644 frontend/views/road-width/_form.php create mode 100644 frontend/views/road-width/_search.php create mode 100644 frontend/views/road-width/create.php create mode 100644 frontend/views/road-width/index.php create mode 100644 frontend/views/road-width/update.php create mode 100644 frontend/views/road-width/view.php diff --git a/common/models/RoadToCategory.php b/common/models/RoadToCategory.php new file mode 100644 index 0000000..6350013 --- /dev/null +++ b/common/models/RoadToCategory.php @@ -0,0 +1,95 @@ + true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']], + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']], + [['road_category_id'], 'exist', 'skipOnError' => true, 'targetClass' => RoadCategory::className(), 'targetAttribute' => ['road_category_id' => 'road_category_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'road_to_category_id' => 'Індекс', + 'region_id' => 'Область', + 'road_id' => 'Дорога', + 'begin' => 'Місцезнаходження, км+ початок', + 'end' => 'Місцезнаходження, км+ кінець', + 'distance' => 'Протяжність, км', + 'road_category_id' => 'Категорія', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRegion() + { + return $this->hasOne(Region::className(), ['region_id' => 'region_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRoad() + { + return $this->hasOne(Road::className(), ['road_id' => 'road_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRoadCategory() + { + return $this->hasOne(RoadCategory::className(), ['road_category_id' => 'road_category_id']); + } + + public function getBeginString() + { + return floor($this->begin) . '+' . ( str_pad(round(( $this->begin - floor($this->begin) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } + + public function getEndString() + { + return floor($this->end) . '+' . ( str_pad(round(( $this->end - floor($this->end) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } +} diff --git a/common/models/RoadToCategorySearch.php b/common/models/RoadToCategorySearch.php new file mode 100644 index 0000000..35b29db --- /dev/null +++ b/common/models/RoadToCategorySearch.php @@ -0,0 +1,73 @@ + $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([ + 'road_to_category_id' => $this->road_to_category_id, + 'region_id' => $this->region_id, + 'road_id' => $this->road_id, + 'begin' => $this->begin, + 'end' => $this->end, + 'distance' => $this->distance, + 'road_category_id' => $this->road_category_id, + ]); + + return $dataProvider; + } +} diff --git a/common/models/RoadWidth.php b/common/models/RoadWidth.php new file mode 100644 index 0000000..120360f --- /dev/null +++ b/common/models/RoadWidth.php @@ -0,0 +1,95 @@ + true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']], + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'road_width_id' => 'Індекс', + 'region_id' => 'Область', + 'road_id' => 'Дорога', + 'begin' => 'Місцезнаходженя, км+ початок', + 'end' => 'Місцезнаходженя, км+ кінець', + 'width_roadside_left' => 'Ширина, узбіччя зліва', + 'width_reverse_road' => 'Ширина, проїзна зворотнього напрямку', + 'width_strip' => 'Ширина, розподільча смуга', + 'width_roadway_forward' => 'Ширина, проїзна прямого напрямку', + 'width_roadside_right' => 'Ширина, узбіччя справа', + 'count_lane_left' => 'Кількість смуг руху зліва', + 'count_lane_right' => 'Кількість смуг руху справа', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRegion() + { + return $this->hasOne(Region::className(), ['region_id' => 'region_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRoad() + { + return $this->hasOne(Road::className(), ['road_id' => 'road_id']); + } + + public function getBeginString() + { + return floor($this->begin) . '+' . ( str_pad(round(( $this->begin - floor($this->begin) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } + + public function getEndString() + { + return floor($this->end) . '+' . ( str_pad(round(( $this->end - floor($this->end) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } +} diff --git a/common/models/RoadWidthSearch.php b/common/models/RoadWidthSearch.php new file mode 100644 index 0000000..31d7188 --- /dev/null +++ b/common/models/RoadWidthSearch.php @@ -0,0 +1,78 @@ + $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([ + 'road_width_id' => $this->road_width_id, + 'region_id' => $this->region_id, + 'road_id' => $this->road_id, + 'begin' => $this->begin, + 'end' => $this->end, + 'width_roadside_left' => $this->width_roadside_left, + 'width_reverse_road' => $this->width_reverse_road, + 'width_strip' => $this->width_strip, + 'width_roadway_forward' => $this->width_roadway_forward, + 'width_roadside_right' => $this->width_roadside_right, + 'count_lane_left' => $this->count_lane_left, + 'count_lane_right' => $this->count_lane_right, + ]); + + return $dataProvider; + } +} diff --git a/console/migrations/m160712_142430_create_road_width.php b/console/migrations/m160712_142430_create_road_width.php new file mode 100644 index 0000000..8208b81 --- /dev/null +++ b/console/migrations/m160712_142430_create_road_width.php @@ -0,0 +1,43 @@ +createTable('road_width', [ + 'road_width_id' => $this->primaryKey()->comment('Індекс'), + 'region_id' => $this->integer()->comment('Область'), + 'road_id' => $this->integer()->comment('Дорога'), + 'begin' => $this->float()->comment('Місцезнаходженя, км+ початок'), + 'end' => $this->float()->comment('Місцезнаходженя, км+ кінець'), + 'width_roadside_left' => $this->float()->comment('Ширина, узбіччя зліва'), + 'width_reverse_road' => $this->float()->comment('Ширина, проїзна зворотнього напрямку'), + 'width_strip' => $this->float()->comment('Ширина, розподільча смуга'), + 'width_roadway_forward' => $this->float()->comment('Ширина, проїзна прямого напрямку'), + 'width_roadside_right' => $this->float()->comment('Ширина, узбіччя справа'), + 'count_lane_left' => $this->float()->comment('Кількість смуг руху зліва'), + 'count_lane_right' => $this->float()->comment('Кількість смуг руху справа'), + + ]); + $this->addForeignKey('road_width_region', 'road_width', 'region_id', 'region', 'region_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_width_road', 'road_width', 'road_id', 'road', 'road_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('road_width_region', 'road_width'); + $this->dropForeignKey('road_width_road', 'road_width'); + $this->dropTable('road_width'); + } +} diff --git a/frontend/controllers/RoadToCategoryController.php b/frontend/controllers/RoadToCategoryController.php new file mode 100644 index 0000000..e529608 --- /dev/null +++ b/frontend/controllers/RoadToCategoryController.php @@ -0,0 +1,179 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all RoadToCategory models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new RoadToCategorySearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single RoadToCategory model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new RoadToCategory model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new RoadToCategory(); + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->indexBy('region_id') + ->asArray() + ->column(); + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + $road_categories = RoadCategory::find() + ->select([ + 'value', + 'road_category_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->road_to_category_id]); + } else { + return $this->render('create', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + 'road_categories' => $road_categories, + ]); + } + } + + /** + * Updates an existing RoadToCategory model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->indexBy('region_id') + ->asArray() + ->column(); + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + $road_categories = RoadCategory::find() + ->select([ + 'value', + 'road_category_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->road_to_category_id]); + } else { + return $this->render('update', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + 'road_categories' => $road_categories, + ]); + } + } + + /** + * Deletes an existing RoadToCategory model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the RoadToCategory model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return RoadToCategory the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = RoadToCategory::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/frontend/controllers/RoadWidthController.php b/frontend/controllers/RoadWidthController.php new file mode 100644 index 0000000..7a2cf42 --- /dev/null +++ b/frontend/controllers/RoadWidthController.php @@ -0,0 +1,162 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all RoadWidth models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new RoadWidthSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single RoadWidth model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new RoadWidth model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new RoadWidth(); + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->indexBy('region_id') + ->asArray() + ->column(); + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->road_width_id]); + } else { + return $this->render('create', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + ]); + } + } + + /** + * Updates an existing RoadWidth model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->indexBy('region_id') + ->asArray() + ->column(); + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->indexBy('road_id') + ->asArray() + ->column(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->road_width_id]); + } else { + return $this->render('update', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + ]); + } + } + + /** + * Deletes an existing RoadWidth model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the RoadWidth model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return RoadWidth the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = RoadWidth::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/frontend/views/road-to-category/_form.php b/frontend/views/road-to-category/_form.php new file mode 100644 index 0000000..28f0d3e --- /dev/null +++ b/frontend/views/road-to-category/_form.php @@ -0,0 +1,38 @@ + + +
+ + + + field($model, 'region_id')->dropDownList($regions) ?> + + field($model, 'road_id')->dropDownList($roads) ?> + + field($model, 'begin')->textInput() ?> + + field($model, 'end')->textInput() ?> + + field($model, 'distance')->textInput() ?> + + field($model, 'road_category_id')->dropDownList($road_categories) ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/frontend/views/road-to-category/_search.php b/frontend/views/road-to-category/_search.php new file mode 100644 index 0000000..0393e4d --- /dev/null +++ b/frontend/views/road-to-category/_search.php @@ -0,0 +1,39 @@ + + + diff --git a/frontend/views/road-to-category/create.php b/frontend/views/road-to-category/create.php new file mode 100644 index 0000000..602daf6 --- /dev/null +++ b/frontend/views/road-to-category/create.php @@ -0,0 +1,29 @@ +title = 'Create Road To Category'; +$this->params['breadcrumbs'][] = ['label' => 'Road To Categories', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + 'road_categories' => $road_categories, + ]) ?> + +
diff --git a/frontend/views/road-to-category/index.php b/frontend/views/road-to-category/index.php new file mode 100644 index 0000000..60fc793 --- /dev/null +++ b/frontend/views/road-to-category/index.php @@ -0,0 +1,38 @@ +title = 'Road To Categories'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'road_to_category_id', + 'region_id', + 'road_id', + 'begin', + 'end', + // 'distance', + // 'road_category_id', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/frontend/views/road-to-category/update.php b/frontend/views/road-to-category/update.php new file mode 100644 index 0000000..90b32a0 --- /dev/null +++ b/frontend/views/road-to-category/update.php @@ -0,0 +1,29 @@ +title = 'Update Road To Category: ' . $model->road_to_category_id; +$this->params['breadcrumbs'][] = ['label' => 'Road To Categories', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->road_to_category_id, 'url' => ['view', 'id' => $model->road_to_category_id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + 'road_categories' => $road_categories, + ]) ?> + +
diff --git a/frontend/views/road-to-category/view.php b/frontend/views/road-to-category/view.php new file mode 100644 index 0000000..1464927 --- /dev/null +++ b/frontend/views/road-to-category/view.php @@ -0,0 +1,41 @@ +title = $model->road_to_category_id; +$this->params['breadcrumbs'][] = ['label' => 'Road To Categories', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->road_to_category_id], ['class' => 'btn btn-primary']) ?> + $model->road_to_category_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'road_to_category_id', + 'region_id', + 'road_id', + 'begin', + 'end', + 'distance', + 'road_category_id', + ], + ]) ?> + +
diff --git a/frontend/views/road-width/_form.php b/frontend/views/road-width/_form.php new file mode 100644 index 0000000..a580a9c --- /dev/null +++ b/frontend/views/road-width/_form.php @@ -0,0 +1,47 @@ + + +
+ + + + field($model, 'region_id')->dropDownList($regions) ?> + + field($model, 'road_id')->dropDownList($roads) ?> + + field($model, 'begin')->textInput() ?> + + field($model, 'end')->textInput() ?> + + field($model, 'width_roadside_left')->textInput() ?> + + field($model, 'width_reverse_road')->textInput() ?> + + field($model, 'width_strip')->textInput() ?> + + field($model, 'width_roadway_forward')->textInput() ?> + + field($model, 'width_roadside_right')->textInput() ?> + + field($model, 'count_lane_left')->textInput() ?> + + field($model, 'count_lane_right')->textInput() ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/frontend/views/road-width/_search.php b/frontend/views/road-width/_search.php new file mode 100644 index 0000000..00b7cca --- /dev/null +++ b/frontend/views/road-width/_search.php @@ -0,0 +1,49 @@ + + + diff --git a/frontend/views/road-width/create.php b/frontend/views/road-width/create.php new file mode 100644 index 0000000..4f3e748 --- /dev/null +++ b/frontend/views/road-width/create.php @@ -0,0 +1,27 @@ +title = 'Create Road Width'; +$this->params['breadcrumbs'][] = ['label' => 'Road Widths', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + ]) ?> + +
diff --git a/frontend/views/road-width/index.php b/frontend/views/road-width/index.php new file mode 100644 index 0000000..9d5d74f --- /dev/null +++ b/frontend/views/road-width/index.php @@ -0,0 +1,43 @@ +title = 'Road Widths'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'road_width_id', + 'region_id', + 'road_id', + 'begin', + 'end', + // 'width_roadside_left', + // 'width_reverse_road', + // 'width_strip', + // 'width_roadway_forward', + // 'width_roadside_right', + // 'count_lane_left', + // 'count_lane_right', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/frontend/views/road-width/update.php b/frontend/views/road-width/update.php new file mode 100644 index 0000000..2374056 --- /dev/null +++ b/frontend/views/road-width/update.php @@ -0,0 +1,27 @@ +title = 'Update Road Width: ' . $model->road_width_id; +$this->params['breadcrumbs'][] = ['label' => 'Road Widths', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->road_width_id, 'url' => ['view', 'id' => $model->road_width_id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'regions' => $regions, + 'roads' => $roads, + ]) ?> + +
diff --git a/frontend/views/road-width/view.php b/frontend/views/road-width/view.php new file mode 100644 index 0000000..95cb269 --- /dev/null +++ b/frontend/views/road-width/view.php @@ -0,0 +1,46 @@ +title = $model->road_width_id; +$this->params['breadcrumbs'][] = ['label' => 'Road Widths', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->road_width_id], ['class' => 'btn btn-primary']) ?> + $model->road_width_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'road_width_id', + 'region_id', + 'road_id', + 'begin', + 'end', + 'width_roadside_left', + 'width_reverse_road', + 'width_strip', + 'width_roadway_forward', + 'width_roadside_right', + 'count_lane_left', + 'count_lane_right', + ], + ]) ?> + +
-- libgit2 0.21.4