From 31f7c78afdceee6815e2b6c0eca01a44953793aa Mon Sep 17 00:00:00 2001 From: yarik Date: Tue, 12 Jul 2016 19:14:15 +0300 Subject: [PATCH] Yarik --- common/models/BusStop.php | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/BusStopSearch.php | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/DepartmentAffiliation.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/RoadSurface.php | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/RoadSurfaceSearch.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ServiceObject.php | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ServiceObjectSearch.php | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ServiceObjectType.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SurfaceTreatment.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160712_130834_create_road_surface.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160712_144805_create_service_object.php | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160712_144806_create_bus_stop.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/BusStopController.php | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/RoadController.php | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- frontend/controllers/RoadSurfaceController.php | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/ServiceObjectController.php | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/_form.php | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/_search.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/create.php | 35 +++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/index.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/update.php | 42 ++++++++++++++++++++++++++++++++++++++++++ frontend/views/bus-stop/view.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/cross-section/index.php | 38 +++++++++++++++++++++----------------- frontend/views/road-surface/_form.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-surface/_search.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-surface/create.php | 37 +++++++++++++++++++++++++++++++++++++ frontend/views/road-surface/index.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road-surface/update.php | 35 +++++++++++++++++++++++++++++++++++ frontend/views/road-surface/view.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/views/road/bus-stop.php | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road/cross-section.php | 10 +++++++++- frontend/views/road/road-surface.php | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road/service-object.php | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/road/view.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/service-object/_form.php | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/service-object/_search.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/service-object/create.php | 35 +++++++++++++++++++++++++++++++++++ frontend/views/service-object/index.php | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/service-object/update.php | 42 ++++++++++++++++++++++++++++++++++++++++++ frontend/views/service-object/view.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 40 files changed, 3208 insertions(+), 19 deletions(-) create mode 100644 common/models/BusStop.php create mode 100644 common/models/BusStopSearch.php create mode 100644 common/models/DepartmentAffiliation.php create mode 100644 common/models/RoadSurface.php create mode 100644 common/models/RoadSurfaceSearch.php create mode 100644 common/models/ServiceObject.php create mode 100644 common/models/ServiceObjectSearch.php create mode 100644 common/models/ServiceObjectType.php create mode 100644 common/models/SurfaceTreatment.php create mode 100644 console/migrations/m160712_130834_create_road_surface.php create mode 100644 console/migrations/m160712_144805_create_service_object.php create mode 100644 console/migrations/m160712_144806_create_bus_stop.php create mode 100644 frontend/controllers/BusStopController.php create mode 100644 frontend/controllers/RoadSurfaceController.php create mode 100644 frontend/controllers/ServiceObjectController.php create mode 100644 frontend/views/bus-stop/_form.php create mode 100644 frontend/views/bus-stop/_search.php create mode 100644 frontend/views/bus-stop/create.php create mode 100644 frontend/views/bus-stop/index.php create mode 100644 frontend/views/bus-stop/update.php create mode 100644 frontend/views/bus-stop/view.php create mode 100644 frontend/views/road-surface/_form.php create mode 100644 frontend/views/road-surface/_search.php create mode 100644 frontend/views/road-surface/create.php create mode 100644 frontend/views/road-surface/index.php create mode 100644 frontend/views/road-surface/update.php create mode 100644 frontend/views/road-surface/view.php create mode 100755 frontend/views/road/bus-stop.php create mode 100755 frontend/views/road/road-surface.php create mode 100755 frontend/views/road/service-object.php create mode 100644 frontend/views/service-object/_form.php create mode 100644 frontend/views/service-object/_search.php create mode 100644 frontend/views/service-object/create.php create mode 100644 frontend/views/service-object/index.php create mode 100644 frontend/views/service-object/update.php create mode 100644 frontend/views/service-object/view.php diff --git a/common/models/BusStop.php b/common/models/BusStop.php new file mode 100644 index 0000000..b16abf8 --- /dev/null +++ b/common/models/BusStop.php @@ -0,0 +1,129 @@ + true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']], + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']], + [['settlement_id'], 'exist', 'skipOnError' => true, 'targetClass' => Settlement::className(), 'targetAttribute' => ['settlement_id' => 'settlement_id']], + [['state_common_id'], 'exist', 'skipOnError' => true, 'targetClass' => StateCommon::className(), 'targetAttribute' => ['state_common_id' => 'state_common_id']], + [['surface_type_id'], 'exist', 'skipOnError' => true, 'targetClass' => SurfaceType::className(), 'targetAttribute' => ['surface_type_id' => 'surface_type_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'bus_stop_id' => 'Індекс', + 'road_id' => 'Дорога', + 'region_id' => 'Область', + 'settlement_id' => 'Назва населеного пункту', + 'location_right' => 'Місцезнаходження, км+ справа', + 'location_left' => 'Місцезнаходження, км+ зліва', + 'surface_type_id' => 'Тип покриття', + 'area_stop_availability' => 'Наявність елементів зупин. майдан', + 'area_land_availability' => 'Наявність елементів посад. майдан', + 'pocket_availability' => 'Наявність елементів заїзна кишеня', + 'toilet_availability' => 'Наявність елементів туалет', + 'year_build' => 'Рік будівництва', + 'year_repair' => 'Рік ремонту', + 'state_common_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 getSettlement() + { + return $this->hasOne(Settlement::className(), ['settlement_id' => 'settlement_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getStateCommon() + { + return $this->hasOne(StateCommon::className(), ['state_common_id' => 'state_common_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSurfaceType() + { + return $this->hasOne(SurfaceType::className(), ['surface_type_id' => 'surface_type_id']); + } + + public function getRightString() + { + return floor($this->location_right) . '+' . ( str_pad(round(( $this->location_right - floor($this->location_right) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } + + public function getLeftString() + { + return floor($this->location_left) . '+' . ( str_pad(round(( $this->location_left - floor($this->location_left) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } +} diff --git a/common/models/BusStopSearch.php b/common/models/BusStopSearch.php new file mode 100644 index 0000000..2e049c8 --- /dev/null +++ b/common/models/BusStopSearch.php @@ -0,0 +1,80 @@ + $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([ + 'bus_stop_id' => $this->bus_stop_id, + 'road_id' => $this->road_id, + 'region_id' => $this->region_id, + 'settlement_id' => $this->settlement_id, + 'location_right' => $this->location_right, + 'location_left' => $this->location_left, + 'surface_type_id' => $this->surface_type_id, + 'area_stop_availability' => $this->area_stop_availability, + 'area_land_availability' => $this->area_land_availability, + 'pocket_availability' => $this->pocket_availability, + 'toilet_availability' => $this->toilet_availability, + 'year_build' => $this->year_build, + 'year_repair' => $this->year_repair, + 'state_common_id' => $this->state_common_id, + ]); + + return $dataProvider; + } +} diff --git a/common/models/DepartmentAffiliation.php b/common/models/DepartmentAffiliation.php new file mode 100644 index 0000000..6c3aa68 --- /dev/null +++ b/common/models/DepartmentAffiliation.php @@ -0,0 +1,53 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'department_affiliation_id' => 'Department Affiliation ID', + 'name' => 'Name', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getServiceObjects() + { + return $this->hasMany(ServiceObject::className(), ['department_affiliation_id' => 'department_affiliation_id']); + } +} diff --git a/common/models/RoadSurface.php b/common/models/RoadSurface.php new file mode 100644 index 0000000..9b83310 --- /dev/null +++ b/common/models/RoadSurface.php @@ -0,0 +1,129 @@ + true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']], + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']], + [['road_direction_id'], 'exist', 'skipOnError' => true, 'targetClass' => RoadDirection::className(), 'targetAttribute' => ['road_direction_id' => 'road_direction_id']], + [['state_common_id'], 'exist', 'skipOnError' => true, 'targetClass' => StateCommon::className(), 'targetAttribute' => ['state_common_id' => 'state_common_id']], + [['surface_treatment_id'], 'exist', 'skipOnError' => true, 'targetClass' => SurfaceTreatment::className(), 'targetAttribute' => ['surface_treatment_id' => 'surface_treatment_id']], + [['surface_type_id'], 'exist', 'skipOnError' => true, 'targetClass' => SurfaceType::className(), 'targetAttribute' => ['surface_type_id' => 'surface_type_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'road_surface_id' => 'Індекс', + 'road_id' => 'Дорога', + 'region_id' => 'Область', + 'road_direction_id' => 'Напрямок смуги руху', + 'begin' => 'Місцезнаходження, км+ початок', + 'end' => 'Місцезнаходження, км+ кінець', + 'surface_type_id' => 'Тип покриття', + 'surface_treatment_id' => 'Тип поверхневої обробки', + 'state_common_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 getRoadDirection() + { + return $this->hasOne(RoadDirection::className(), ['road_direction_id' => 'road_direction_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getStateCommon() + { + return $this->hasOne(StateCommon::className(), ['state_common_id' => 'state_common_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSurfaceTreatment() + { + return $this->hasOne(SurfaceTreatment::className(), ['surface_treatment_id' => 'surface_treatment_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSurfaceType() + { + return $this->hasOne(SurfaceType::className(), ['surface_type_id' => 'surface_type_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/RoadSurfaceSearch.php b/common/models/RoadSurfaceSearch.php new file mode 100644 index 0000000..1733c01 --- /dev/null +++ b/common/models/RoadSurfaceSearch.php @@ -0,0 +1,75 @@ + $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_surface_id' => $this->road_surface_id, + 'road_id' => $this->road_id, + 'region_id' => $this->region_id, + 'road_direction_id' => $this->road_direction_id, + 'begin' => $this->begin, + 'end' => $this->end, + 'surface_type_id' => $this->surface_type_id, + 'surface_treatment_id' => $this->surface_treatment_id, + 'state_common_id' => $this->state_common_id, + ]); + + return $dataProvider; + } +} diff --git a/common/models/ServiceObject.php b/common/models/ServiceObject.php new file mode 100644 index 0000000..cef7a3d --- /dev/null +++ b/common/models/ServiceObject.php @@ -0,0 +1,131 @@ + true, 'targetClass' => DepartmentAffiliation::className(), 'targetAttribute' => ['department_affiliation_id' => 'department_affiliation_id']], + [['region_id'], 'exist', 'skipOnError' => true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']], + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']], + [['service_object_type_id'], 'exist', 'skipOnError' => true, 'targetClass' => ServiceObjectType::className(), 'targetAttribute' => ['service_object_type_id' => 'service_object_type_id']], + [['settlement_id'], 'exist', 'skipOnError' => true, 'targetClass' => Settlement::className(), 'targetAttribute' => ['settlement_id' => 'settlement_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'service_object_id' => 'Індекс', + 'road_id' => 'Дорога', + 'region_id' => 'Область', + 'service_object_type_id' => 'Вид споруди чи об\'єкту', + 'settlement_id' => 'Назва підприємства та населеного пункту', + 'department_affiliation_id' => 'Відоча приналежність', + 'location_right' => 'Місцезнаходження, км+ справа', + 'location_left' => 'Місцезнаходження, км+ зліва', + 'location_axis' => 'Місцезнаходження, км+ по осі', + 'distance' => 'Відстань до об\'єкту від вісі дор., м', + 'capacity' => 'Потужність', + 'arrangement_elements' => 'Елементи облаштування', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getDepartmentAffiliation() + { + return $this->hasOne(DepartmentAffiliation::className(), ['department_affiliation_id' => 'department_affiliation_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 getServiceObjectType() + { + return $this->hasOne(ServiceObjectType::className(), ['service_object_type_id' => 'service_object_type_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSettlement() + { + return $this->hasOne(Settlement::className(), ['settlement_id' => 'settlement_id']); + } + + public function getLeftString() + { + return floor($this->location_left) . '+' . ( str_pad(round(( $this->location_left - floor($this->location_left) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } + + public function getRightString() + { + return floor($this->location_right) . '+' . ( str_pad(round(( $this->location_right - floor($this->location_right) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } + + public function getAxisString() + { + return floor($this->location_axis) . '+' . ( str_pad(round(( $this->location_axis - floor($this->location_axis) ) * 1000), 3, '0', STR_PAD_LEFT) ); + } +} diff --git a/common/models/ServiceObjectSearch.php b/common/models/ServiceObjectSearch.php new file mode 100644 index 0000000..8e25e71 --- /dev/null +++ b/common/models/ServiceObjectSearch.php @@ -0,0 +1,80 @@ + $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([ + 'service_object_id' => $this->service_object_id, + 'road_id' => $this->road_id, + 'region_id' => $this->region_id, + 'service_object_type_id' => $this->service_object_type_id, + 'settlement_id' => $this->settlement_id, + 'department_affiliation_id' => $this->department_affiliation_id, + 'location_right' => $this->location_right, + 'location_left' => $this->location_left, + 'location_axis' => $this->location_axis, + 'distance' => $this->distance, + 'capacity' => $this->capacity, + ]); + + $query->andFilterWhere(['like', 'arrangement_elements', $this->arrangement_elements]); + + return $dataProvider; + } +} diff --git a/common/models/ServiceObjectType.php b/common/models/ServiceObjectType.php new file mode 100644 index 0000000..ee18489 --- /dev/null +++ b/common/models/ServiceObjectType.php @@ -0,0 +1,53 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'service_object_type_id' => 'Service Object Type ID', + 'name' => 'Name', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getServiceObjects() + { + return $this->hasMany(ServiceObject::className(), ['service_object_type_id' => 'service_object_type_id']); + } +} diff --git a/common/models/SurfaceTreatment.php b/common/models/SurfaceTreatment.php new file mode 100644 index 0000000..8b1aa0d --- /dev/null +++ b/common/models/SurfaceTreatment.php @@ -0,0 +1,53 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'surface_treatment_id' => 'Surface Treatment ID', + 'name' => 'Name', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRoadSurfaces() + { + return $this->hasMany(RoadSurface::className(), ['surface_treatment_id' => 'surface_treatment_id']); + } +} diff --git a/console/migrations/m160712_130834_create_road_surface.php b/console/migrations/m160712_130834_create_road_surface.php new file mode 100644 index 0000000..ba4908d --- /dev/null +++ b/console/migrations/m160712_130834_create_road_surface.php @@ -0,0 +1,55 @@ +createTable('road_surface', [ + 'road_surface_id' => $this->primaryKey()->comment('Індекс'), + 'road_id' => $this->integer()->comment('Дорога'), + 'region_id' => $this->integer()->comment('Область'), + 'road_direction_id' => $this->integer()->comment('Напрямок смуги руху'), + 'begin' => $this->float()->comment('Місцезнаходження, км+ початок'), + 'end' => $this->float()->comment('Місцезнаходження, км+ кінець'), + 'surface_type_id' => $this->integer()->comment('Тип покриття'), + 'surface_treatment_id' => $this->integer()->comment('Тип поверхневої обробки'), + 'state_common_id' => $this->integer()->comment('Стан покриття'), + ]); + $this->createTable('surface_treatment', [ + 'surface_treatment_id' => $this->primaryKey(), + 'name' => $this->string(), + ]); + $this->batchInsert('surface_treatment', [ 'name' ], [ + [ 'нема' ], + ]); + $this->addForeignKey('road_surface_road_direction', 'road_surface', 'road_direction_id', 'road_direction', 'road_direction_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_surface_region', 'road_surface', 'region_id', 'region', 'region_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_surface_road', 'road_surface', 'road_id', 'road', 'road_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_surface_surface_type', 'road_surface', 'surface_type_id', 'surface_type', 'surface_type_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_surface_state_common', 'road_surface', 'state_common_id', 'state_common', 'state_common_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('road_surface_surface_treatment', 'road_surface', 'surface_treatment_id', 'surface_treatment', 'surface_treatment_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('road_surface_road_direction', 'road_surface'); + $this->dropForeignKey('road_surface_region', 'road_surface'); + $this->dropForeignKey('road_surface_road', 'road_surface'); + $this->dropForeignKey('road_surface_surface_type', 'road_surface'); + $this->dropForeignKey('road_surface_state_common', 'road_surface'); + $this->dropForeignKey('road_surface_surface_treatment', 'road_surface'); + $this->dropTable('road_surface'); + $this->dropTable('surface_treatment'); + } +} diff --git a/console/migrations/m160712_144805_create_service_object.php b/console/migrations/m160712_144805_create_service_object.php new file mode 100644 index 0000000..50febf1 --- /dev/null +++ b/console/migrations/m160712_144805_create_service_object.php @@ -0,0 +1,79 @@ +createTable('service_object', [ + 'service_object_id' => $this->primaryKey() + ->comment('Індекс'), + 'road_id' => $this->integer() + ->comment('Дорога'), + 'region_id' => $this->integer() + ->comment('Область'), + 'service_object_type_id' => $this->integer() + ->comment('Вид споруди чи об\'єкту'), + 'settlement_id' => $this->integer() + ->comment('Назва підприємства та населеного пункту'), + 'department_affiliation_id' => $this->integer() + ->comment('Відоча приналежність'), + 'location_right' => $this->float() + ->comment('Місцезнаходження, км+ справа'), + 'location_left' => $this->float() + ->comment('Місцезнаходження, км+ зліва'), + 'location_axis' => $this->float() + ->comment('Місцезнаходження, км+ по осі'), + 'distance' => $this->float() + ->comment('Відстань до об\'єкту від вісі дор., м'), + 'capacity' => $this->float() + ->comment('Потужність'), + 'arrangement_elements' => $this->text() + ->comment('Елементи облаштування'), + ]); + $this->createTable('service_object_type', [ + 'service_object_type_id' => $this->primaryKey(), + 'name' => $this->string(), + ]); + $this->createTable('department_affiliation', [ + 'department_affiliation_id' => $this->primaryKey(), + 'name' => $this->string(), + ]); + $this->batchInsert('service_object_type', [ 'name' ], [ + [ 'кафе' ], + [ 'автозаправочна станція (АЗС)' ], + [ 'мотель' ], + ]); + $this->batchInsert('department_affiliation', [ 'name' ], [ + [ 'Приватне підприємство' ], + ]); + $this->addForeignKey('service_object_road', 'service_object', 'road_id', 'road', 'road_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('service_object_region', 'service_object', 'region_id', 'region', 'region_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('service_object_settlement', 'service_object', 'settlement_id', 'settlement', 'settlement_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('service_object_department_affiliation', 'service_object', 'department_affiliation_id', 'department_affiliation', 'department_affiliation_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('service_object_service_object_type', 'service_object', 'service_object_type_id', 'service_object_type', 'service_object_type_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('service_object_road', 'service_object'); + $this->dropForeignKey('service_object_region', 'service_object'); + $this->dropForeignKey('service_object_settlement', 'service_object'); + $this->dropForeignKey('service_object_department_affiliation', 'service_object'); + $this->dropForeignKey('service_object_service_object_type', 'service_object'); + $this->dropTable('service_object'); + $this->dropTable('service_object_type'); + $this->dropTable('department_affiliation'); + } + } diff --git a/console/migrations/m160712_144806_create_bus_stop.php b/console/migrations/m160712_144806_create_bus_stop.php new file mode 100644 index 0000000..d41d23e --- /dev/null +++ b/console/migrations/m160712_144806_create_bus_stop.php @@ -0,0 +1,65 @@ +createTable('bus_stop', [ + 'bus_stop_id' => $this->primaryKey() + ->comment('Індекс'), + 'road_id' => $this->integer() + ->comment('Дорога'), + 'region_id' => $this->integer() + ->comment('Область'), + 'settlement_id' => $this->integer() + ->comment('Назва населеного пункту'), + 'location_right' => $this->float() + ->comment('Місцезнаходження, км+ справа'), + 'location_left' => $this->float() + ->comment('Місцезнаходження, км+ зліва'), + 'surface_type_id' => $this->integer() + ->comment('Тип покриття'), + 'area_stop_availability' => $this->integer() + ->comment('Наявність елементів зупин. майдан'), + 'area_land_availability' => $this->integer() + ->comment('Наявність елементів посад. майдан'), + 'pocket_availability' => $this->integer() + ->comment('Наявність елементів заїзна кишеня'), + 'toilet_availability' => $this->integer() + ->comment('Наявність елементів туалет'), + 'year_build' => $this->integer() + ->comment('Рік будівництва'), + 'year_repair' => $this->integer() + ->comment('Рік ремонту'), + 'state_common_id' => $this->integer() + ->comment('Технічний стан'), + ]); + $this->addForeignKey('bus_stop_road', 'bus_stop', 'road_id', 'road', 'road_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('bus_stop_region', 'bus_stop', 'region_id', 'region', 'region_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('bus_stop_settlement', 'bus_stop', 'settlement_id', 'settlement', 'settlement_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('bus_stop_surface_type', 'bus_stop', 'surface_type_id', 'surface_type', 'surface_type_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('bus_stop_state_common', 'bus_stop', 'state_common_id', 'state_common', 'state_common_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('bus_stop_road', 'bus_stop'); + $this->dropForeignKey('bus_stop_region', 'bus_stop'); + $this->dropForeignKey('bus_stop_settlement', 'bus_stop'); + $this->dropForeignKey('bus_stop_surface_type', 'bus_stop'); + $this->dropForeignKey('bus_stop_state_common', 'bus_stop'); + $this->dropTable('bus_stop'); + } + } diff --git a/frontend/controllers/BusStopController.php b/frontend/controllers/BusStopController.php new file mode 100644 index 0000000..0aed4d1 --- /dev/null +++ b/frontend/controllers/BusStopController.php @@ -0,0 +1,245 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => [ 'POST' ], + ], + ], + ]; + } + + /** + * Lists all BusStop models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new BusStopSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single BusStop model. + * + * @param integer $id + * + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new BusStop model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new BusStop(); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $settlements = Settlement::find() + ->select([ + 'name', + 'settlement_id', + ]) + ->asArray() + ->indexBy('settlement_id') + ->column(); + + $surface_types = SurfaceType::find() + ->select([ + 'name', + 'surface_type_id', + ]) + ->asArray() + ->indexBy('surface_type_id') + ->column(); + + $state_commons = StateCommon::find() + ->select([ + 'value', + 'state_common_id', + ]) + ->asArray() + ->indexBy('state_common_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->bus_stop_id, + ]); + } else { + return $this->render('create', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'settlements' => $settlements, + 'surface_types' => $surface_types, + 'state_commons' => $state_commons, + ]); + } + } + + /** + * Updates an existing BusStop 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); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $settlements = Settlement::find() + ->select([ + 'name', + 'settlement_id', + ]) + ->asArray() + ->indexBy('settlement_id') + ->column(); + + $surface_types = SurfaceType::find() + ->select([ + 'name', + 'surface_type_id', + ]) + ->asArray() + ->indexBy('surface_type_id') + ->column(); + + $state_commons = StateCommon::find() + ->select([ + 'value', + 'state_common_id', + ]) + ->asArray() + ->indexBy('state_common_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->bus_stop_id, + ]); + } else { + return $this->render('update', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'settlements' => $settlements, + 'surface_types' => $surface_types, + 'state_commons' => $state_commons, + ]); + } + } + + /** + * Deletes an existing BusStop 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 BusStop model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * + * @param integer $id + * + * @return BusStop the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if(( $model = BusStop::findOne($id) ) !== NULL) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + } diff --git a/frontend/controllers/RoadController.php b/frontend/controllers/RoadController.php index 416210a..7c9b543 100755 --- a/frontend/controllers/RoadController.php +++ b/frontend/controllers/RoadController.php @@ -1,14 +1,17 @@ where([ 'region_id' => $region_ids ]) ->all(); } + $road_surface_regions = [ ]; + $region_ids = [ ]; + $region_ids = RoadSurface::find() + ->distinct() + ->select('region_id') + ->where([ 'road_id' => $id ]) + ->column(); + if(!empty( $region_ids )) { + $road_surface_regions = Region::find() + ->where([ 'region_id' => $region_ids ]) + ->all(); + } + $service_object_regions = [ ]; + $region_ids = [ ]; + $region_ids = ServiceObject::find() + ->distinct() + ->select('region_id') + ->where([ 'road_id' => $id ]) + ->column(); + if(!empty( $region_ids )) { + $service_object_regions = Region::find() + ->where([ 'region_id' => $region_ids ]) + ->all(); + } + $bus_stop_regions = [ ]; + $region_ids = [ ]; + $region_ids = BusStop::find() + ->distinct() + ->select('region_id') + ->where([ 'road_id' => $id ]) + ->column(); + if(!empty( $region_ids )) { + $bus_stop_regions = Region::find() + ->where([ 'region_id' => $region_ids ]) + ->all(); + } $road_to_categories = [ ]; $region_ids = [ ]; $region_ids = RoadToCategory::find() @@ -215,6 +254,9 @@ 'cross_section_regions' => $cross_section_regions, 'road_to_categories' => $road_to_categories, 'road_width' => $road_width, + 'road_surface_regions' => $road_surface_regions, + 'service_object_regions' => $service_object_regions, + 'bus_stop_regions' => $bus_stop_regions, ]); } @@ -317,7 +359,7 @@ ]); } - public function actionCrossSection($id, $region_id) + public function actionCrossSection(int $id, int $region_id) { $road = Road::findOne($id); if(empty( $road )) { @@ -341,4 +383,79 @@ 'dataProvider' => $dataProvider, ]); } + + public function actionRoadSurface(int $id, int $region_id) + { + $road = Road::findOne($id); + if(empty( $road )) { + throw new NotFoundHttpException('Road not found'); + } + $region = Region::findOne($region_id); + if(empty( $region )) { + throw new NotFoundHttpException('Region not found'); + } + $dataProvider = new ActiveDataProvider([ + 'query' => RoadSurface::find() + ->where([ + 'road_id' => $id, + 'region_id' => $region_id, + ]), + 'pagination' => false, + ]); + return $this->render('road-surface', [ + 'road' => $road, + 'region' => $region, + 'dataProvider' => $dataProvider, + ]); + } + + public function actionServiceObject(int $id, int $region_id) + { + $road = Road::findOne($id); + if(empty( $road )) { + throw new NotFoundHttpException('Road not found'); + } + $region = Region::findOne($region_id); + if(empty( $region )) { + throw new NotFoundHttpException('Region not found'); + } + $dataProvider = new ActiveDataProvider([ + 'query' => ServiceObject::find() + ->where([ + 'road_id' => $id, + 'region_id' => $region_id, + ]), + 'pagination' => false, + ]); + return $this->render('service-object', [ + 'road' => $road, + 'region' => $region, + 'dataProvider' => $dataProvider, + ]); + } + + public function actionBusStop(int $id, int $region_id) + { + $road = Road::findOne($id); + if(empty( $road )) { + throw new NotFoundHttpException('Road not found'); + } + $region = Region::findOne($region_id); + if(empty( $region )) { + throw new NotFoundHttpException('Region not found'); + } + $dataProvider = new ActiveDataProvider([ + 'query' => BusStop::find() + ->where([ + 'road_id' => $id, + 'region_id' => $region_id, + ]), + 'pagination' => false, + ]); + return $this->render('bus-stop', [ + 'road' => $road, + 'region' => $region, + 'dataProvider' => $dataProvider, + ]); + } } diff --git a/frontend/controllers/RoadSurfaceController.php b/frontend/controllers/RoadSurfaceController.php new file mode 100644 index 0000000..5d8b02b --- /dev/null +++ b/frontend/controllers/RoadSurfaceController.php @@ -0,0 +1,266 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => [ 'POST' ], + ], + ], + ]; + } + + /** + * Lists all RoadSurface models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new RoadSurfaceSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single RoadSurface model. + * + * @param integer $id + * + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new RoadSurface model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new RoadSurface(); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $road_directions = RoadDirection::find() + ->select([ + 'direction_name', + 'road_direction_id', + ]) + ->asArray() + ->indexBy('road_direction_id') + ->column(); + + $surface_types = SurfaceType::find() + ->select([ + 'name', + 'surface_type_id', + ]) + ->asArray() + ->indexBy('surface_type_id') + ->column(); + + $surface_treatments = SurfaceTreatment::find() + ->select([ + 'name', + 'surface_treatment_id', + ]) + ->asArray() + ->indexBy('surface_treatment_id') + ->column(); + + $state_commons = StateCommon::find() + ->select([ + 'value', + 'state_common_id', + ]) + ->asArray() + ->indexBy('state_common_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->road_surface_id, + ]); + } else { + return $this->render('create', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'road_directions' => $road_directions, + 'surface_types' => $surface_types, + 'surface_treatments' => $surface_treatments, + 'state_commons' => $state_commons, + ]); + } + } + + /** + * Updates an existing RoadSurface 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); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $road_directions = RoadDirection::find() + ->select([ + 'direction_name', + 'road_direction_id', + ]) + ->asArray() + ->indexBy('road_direction_id') + ->column(); + + $surface_types = SurfaceType::find() + ->select([ + 'name', + 'surface_type_id', + ]) + ->asArray() + ->indexBy('surface_type_id') + ->column(); + + $surface_treatments = SurfaceTreatment::find() + ->select([ + 'name', + 'surface_treatment_id', + ]) + ->asArray() + ->indexBy('surface_treatment_id') + ->column(); + + $state_commons = StateCommon::find() + ->select([ + 'value', + 'state_common_id', + ]) + ->asArray() + ->indexBy('state_common_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->road_surface_id, + ]); + } else { + return $this->render('update', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'road_directions' => $road_directions, + 'surface_types' => $surface_types, + 'surface_treatments' => $surface_treatments, + 'state_commons' => $state_commons, + ]); + } + } + + /** + * Deletes an existing RoadSurface 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 RoadSurface model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * + * @param integer $id + * + * @return RoadSurface the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if(( $model = RoadSurface::findOne($id) ) !== NULL) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + } diff --git a/frontend/controllers/ServiceObjectController.php b/frontend/controllers/ServiceObjectController.php new file mode 100644 index 0000000..fd41069 --- /dev/null +++ b/frontend/controllers/ServiceObjectController.php @@ -0,0 +1,245 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => [ 'POST' ], + ], + ], + ]; + } + + /** + * Lists all ServiceObject models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new ServiceObjectSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single ServiceObject model. + * + * @param integer $id + * + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new ServiceObject model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new ServiceObject(); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $service_object_types = ServiceObjectType::find() + ->select([ + 'name', + 'service_object_type_id', + ]) + ->asArray() + ->indexBy('service_object_type_id') + ->column(); + + $settlements = Settlement::find() + ->select([ + 'name', + 'settlement_id', + ]) + ->asArray() + ->indexBy('settlement_id') + ->column(); + + $department_affiliations = DepartmentAffiliation::find() + ->select([ + 'name', + 'department_affiliation_id', + ]) + ->asArray() + ->indexBy('department_affiliation_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->service_object_id, + ]); + } else { + return $this->render('create', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'service_object_types' => $service_object_types, + 'settlements' => $settlements, + 'department_affiliations' => $department_affiliations, + ]); + } + } + + /** + * Updates an existing ServiceObject 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); + + $roads = Road::find() + ->select([ + 'name', + 'road_id', + ]) + ->asArray() + ->indexBy('road_id') + ->column(); + + $regions = Region::find() + ->select([ + 'name', + 'region_id', + ]) + ->asArray() + ->indexBy('region_id') + ->column(); + + $service_object_types = ServiceObjectType::find() + ->select([ + 'name', + 'service_object_type_id', + ]) + ->asArray() + ->indexBy('service_object_type_id') + ->column(); + + $settlements = Settlement::find() + ->select([ + 'name', + 'settlement_id', + ]) + ->asArray() + ->indexBy('settlement_id') + ->column(); + + $department_affiliations = DepartmentAffiliation::find() + ->select([ + 'name', + 'department_affiliation_id', + ]) + ->asArray() + ->indexBy('department_affiliation_id') + ->column(); + + if($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect([ + 'view', + 'id' => $model->service_object_id, + ]); + } else { + return $this->render('update', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'service_object_types' => $service_object_types, + 'settlements' => $settlements, + 'department_affiliations' => $department_affiliations, + ]); + } + } + + /** + * Deletes an existing ServiceObject 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 ServiceObject model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * + * @param integer $id + * + * @return ServiceObject the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if(( $model = ServiceObject::findOne($id) ) !== NULL) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + } diff --git a/frontend/views/bus-stop/_form.php b/frontend/views/bus-stop/_form.php new file mode 100644 index 0000000..37e4b99 --- /dev/null +++ b/frontend/views/bus-stop/_form.php @@ -0,0 +1,67 @@ + + +
+ + + + field($model, 'road_id') + ->dropDownList($roads) ?> + + field($model, 'region_id') + ->dropDownList($regions) ?> + + field($model, 'settlement_id') + ->dropDownList($settlements) ?> + + field($model, 'location_right') + ->textInput() ?> + + field($model, 'location_left') + ->textInput() ?> + + field($model, 'surface_type_id') + ->dropDownList($surface_types) ?> + + field($model, 'area_stop_availability') + ->dropDownList([0 => 'Нет', 1 => 'Да']) ?> + + field($model, 'area_land_availability') + ->dropDownList([0 => 'Нет', 1 => 'Да']) ?> + + field($model, 'pocket_availability') + ->dropDownList([0 => 'Нет', 1 => 'Да']) ?> + + field($model, 'toilet_availability') + ->dropDownList([0 => 'Нет', 1 => 'Да']) ?> + + field($model, 'year_build') + ->textInput() ?> + + field($model, 'year_repair') + ->textInput() ?> + + field($model, 'state_common_id') + ->dropDownList($state_commons) ?> + +
+ isNewRecord ? 'Create' : 'Update', [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]) ?> +
+ + + +
diff --git a/frontend/views/bus-stop/_search.php b/frontend/views/bus-stop/_search.php new file mode 100644 index 0000000..9f99b6d --- /dev/null +++ b/frontend/views/bus-stop/_search.php @@ -0,0 +1,53 @@ + + + diff --git a/frontend/views/bus-stop/create.php b/frontend/views/bus-stop/create.php new file mode 100644 index 0000000..2236ba0 --- /dev/null +++ b/frontend/views/bus-stop/create.php @@ -0,0 +1,35 @@ +title = 'Create Bus Stop'; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Bus Stops', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'settlements' => $settlements, + 'surface_types' => $surface_types, + 'state_commons' => $state_commons, + ]) ?> + +
diff --git a/frontend/views/bus-stop/index.php b/frontend/views/bus-stop/index.php new file mode 100644 index 0000000..a94d8ce --- /dev/null +++ b/frontend/views/bus-stop/index.php @@ -0,0 +1,45 @@ +title = 'Bus Stops'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

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

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

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'bus_stop_id', + 'road_id', + 'region_id', + 'settlement_id', + 'location_right', + // 'location_left', + // 'surface_type_id', + // 'area_stop_availability', + // 'area_land_availability', + // 'pocket_availability', + // 'toilet_availability', + // 'year_build', + // 'year_repair', + // 'state_common_id', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/frontend/views/bus-stop/update.php b/frontend/views/bus-stop/update.php new file mode 100644 index 0000000..da6d7ff --- /dev/null +++ b/frontend/views/bus-stop/update.php @@ -0,0 +1,42 @@ +title = 'Update Bus Stop: ' . $model->bus_stop_id; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Bus Stops', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $model->bus_stop_id, + 'url' => [ + 'view', + 'id' => $model->bus_stop_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'settlements' => $settlements, + 'surface_types' => $surface_types, + 'state_commons' => $state_commons, + ]) ?> + +
diff --git a/frontend/views/bus-stop/view.php b/frontend/views/bus-stop/view.php new file mode 100644 index 0000000..679d5d7 --- /dev/null +++ b/frontend/views/bus-stop/view.php @@ -0,0 +1,48 @@ +title = $model->bus_stop_id; +$this->params['breadcrumbs'][] = ['label' => 'Bus Stops', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

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

+ + $model, + 'attributes' => [ + 'bus_stop_id', + 'road_id', + 'region_id', + 'settlement_id', + 'location_right', + 'location_left', + 'surface_type_id', + 'area_stop_availability', + 'area_land_availability', + 'pocket_availability', + 'toilet_availability', + 'year_build', + 'year_repair', + 'state_common_id', + ], + ]) ?> + +
diff --git a/frontend/views/cross-section/index.php b/frontend/views/cross-section/index.php index 91efa7f..57d97d8 100644 --- a/frontend/views/cross-section/index.php +++ b/frontend/views/cross-section/index.php @@ -1,6 +1,7 @@ params['breadcrumbs'][] = $this->title; 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], - - 'cross_section_id', - 'region_id', - 'road_id', + [ + 'attribute' => 'region_id', + 'value' => function($model) { + /** + * @var CrossSection $model + */ + return $model->region->name; + } + ], + [ + 'attribute' => 'road_id', + 'value' => function($model) { + /** + * @var CrossSection $model + */ + return $model->road->name; + } + ], 'location_left', 'location_right', - // 'direction', - // 'surface_type_id', - // 'length_section', - // 'length_surface', - // 'distance_edge', - // 'width', - // 'angle', - // 'tube_availability', - // 'safety_availability', - // 'year_build', - // 'year_repair', - // 'state_common_id', + 'direction', ['class' => 'yii\grid\ActionColumn'], ], diff --git a/frontend/views/road-surface/_form.php b/frontend/views/road-surface/_form.php new file mode 100644 index 0000000..d9d8e8a --- /dev/null +++ b/frontend/views/road-surface/_form.php @@ -0,0 +1,53 @@ + + +
+ + + + field($model, 'road_id') + ->dropDownList($roads) ?> + + field($model, 'region_id') + ->dropDownList($regions) ?> + + field($model, 'road_direction_id') + ->dropDownList($road_directions) ?> + + field($model, 'begin') + ->textInput() ?> + + field($model, 'end') + ->textInput() ?> + + field($model, 'surface_type_id') + ->dropDownList($surface_types) ?> + + field($model, 'surface_treatment_id') + ->dropDownList($surface_treatments) ?> + + field($model, 'state_common_id') + ->dropDownList($state_commons) ?> + +
+ isNewRecord ? 'Create' : 'Update', [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]) ?> +
+ + + +
diff --git a/frontend/views/road-surface/_search.php b/frontend/views/road-surface/_search.php new file mode 100644 index 0000000..56a7f28 --- /dev/null +++ b/frontend/views/road-surface/_search.php @@ -0,0 +1,43 @@ + + + diff --git a/frontend/views/road-surface/create.php b/frontend/views/road-surface/create.php new file mode 100644 index 0000000..8a62c61 --- /dev/null +++ b/frontend/views/road-surface/create.php @@ -0,0 +1,37 @@ +title = 'Create Road Surface'; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Road Surfaces', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'road_directions' => $road_directions, + 'surface_types' => $surface_types, + 'surface_treatments' => $surface_treatments, + 'state_commons' => $state_commons, + ]) ?> + +
diff --git a/frontend/views/road-surface/index.php b/frontend/views/road-surface/index.php new file mode 100644 index 0000000..6bcc406 --- /dev/null +++ b/frontend/views/road-surface/index.php @@ -0,0 +1,76 @@ +title = 'Road Surfaces'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

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

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

+ $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'], + ], + ]); ?> +
diff --git a/frontend/views/road-surface/update.php b/frontend/views/road-surface/update.php new file mode 100644 index 0000000..7b727b9 --- /dev/null +++ b/frontend/views/road-surface/update.php @@ -0,0 +1,35 @@ +title = 'Update Road Surface: ' . $model->road_surface_id; +$this->params['breadcrumbs'][] = ['label' => 'Road Surfaces', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->road_surface_id, 'url' => ['view', 'id' => $model->road_surface_id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'road_directions' => $road_directions, + 'surface_types' => $surface_types, + 'surface_treatments' => $surface_treatments, + 'state_commons' => $state_commons, + ]) ?> + +
diff --git a/frontend/views/road-surface/view.php b/frontend/views/road-surface/view.php new file mode 100644 index 0000000..8bb6885 --- /dev/null +++ b/frontend/views/road-surface/view.php @@ -0,0 +1,43 @@ +title = $model->road_surface_id; +$this->params['breadcrumbs'][] = ['label' => 'Road Surfaces', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

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

+ + $model, + 'attributes' => [ + 'road_surface_id', + 'road_id', + 'region_id', + 'road_direction_id', + 'begin', + 'end', + 'surface_type_id', + 'surface_treatment_id', + 'state_common_id', + ], + ]) ?> + +
diff --git a/frontend/views/road/bus-stop.php b/frontend/views/road/bus-stop.php new file mode 100755 index 0000000..af9b76a --- /dev/null +++ b/frontend/views/road/bus-stop.php @@ -0,0 +1,109 @@ +title = $road->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Дороги', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $this->title, + 'url' => [ + 'view', + 'id' => $road->road_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = 'Відомість наявності та технічного стану автобусних зупинок - ' . ucfirst($region->name). ' область'; +?> +
+
+ Міністрество транспорту України
+ Державна служба автомобільних доріг
+ України +
+
+ Служба автомобільних доріг у name; ?> області +
+
+
+

Відомість

+

наявності та технічного стану

+

автобусних зупинок

+

на автомобільній дорозі

+

name; ?>

+

roadType->definition;?> значення станом на р.

+
+
+ $dataProvider, + 'layout' => "{items}", + 'columns' => [ + [ + 'attribute' => 'location_right', + 'value' => function($model) { + /** + * @var BusStop $model + */ + return $model->getRightString(); + } + ], + [ + 'attribute' => 'location_left', + 'value' => function($model) { + /** + * @var BusStop $model + */ + return $model->getLeftString(); + } + ], + [ + 'attribute' => 'settlement_id', + 'value' => function($model) { + /** + * @var BusStop $model + */ + return $model->settlement->name; + } + ], + [ + 'attribute' => 'surface_type_id', + 'value' => function($model) { + /** + * @var BusStop $model + */ + return $model->surfaceType->name; + } + ], + 'area_stop_availability', + 'area_land_availability', + 'pocket_availability', + 'toilet_availability', + 'year_build', + 'year_repair', + [ + 'attribute' => 'state_common_id', + 'value' => function($model) { + /** + * @var BusStop $model + */ + return $model->stateCommon->value; + } + ], + ], + ]); + ?> +
+
diff --git a/frontend/views/road/cross-section.php b/frontend/views/road/cross-section.php index c60f6c1..34ffbc9 100755 --- a/frontend/views/road/cross-section.php +++ b/frontend/views/road/cross-section.php @@ -86,7 +86,15 @@ 'safety_availability:boolean', 'year_build', 'year_repair', - 'state_common_id', + [ + 'attribute' => 'state_common_id', + 'value' => function($model) { + /** + * @var CrossSection $model + */ + return $model->stateCommon->value; + } + ], ], ]); ?> diff --git a/frontend/views/road/road-surface.php b/frontend/views/road/road-surface.php new file mode 100755 index 0000000..5e30abd --- /dev/null +++ b/frontend/views/road/road-surface.php @@ -0,0 +1,111 @@ +title = $road->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Дороги', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $this->title, + 'url' => [ + 'view', + 'id' => $road->road_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = 'Відомість наявності та технічного стану покриття автодоріг - ' . ucfirst($region->name). ' область'; +?> +
+
+ Міністрество транспорту України
+ Державна служба автомобільних доріг
+ України +
+
+ Служба автомобільних доріг у name; ?> області +
+
+
+

Відомість

+

наявності та технічного стану покриття

+

покриття автодоріг

+

на автомобільній дорозі

+

name; ?>

+

roadType->definition;?> значення станом на р.

+
+
+ $dataProvider, + 'layout' => "{items}", + 'columns' => [ + [ + '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(); + } + ], + [ + 'attribute' => 'surface_type_id', + 'value' => function($model) { + /** + * @var RoadSurface $model + */ + return $model->surfaceType->name; + } + ], + [ + 'attribute' => 'surface_treatment_id', + 'value' => function($model) { + /** + * @var RoadSurface $model + */ + return $model->surfaceTreatment->name; + } + ], + [ + 'attribute' => 'state_common_id', + 'value' => function($model) { + /** + * @var RoadSurface $model + */ + return $model->stateCommon->value; + } + ], + ], + ]); + ?> +
+
diff --git a/frontend/views/road/service-object.php b/frontend/views/road/service-object.php new file mode 100755 index 0000000..b637678 --- /dev/null +++ b/frontend/views/road/service-object.php @@ -0,0 +1,127 @@ +title = $road->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Дороги', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $this->title, + 'url' => [ + 'view', + 'id' => $road->road_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = 'Відомість наявності споруд автослужб, об\'єктів сервісу - ' . ucfirst($region->name) . ' область'; +?> +
+
+ Міністрество транспорту України
+ Державна служба автомобільних доріг
+ України +
+
+ Служба автомобільних доріг у name; ?> області +
+
+
+

Відомість

+

наявносіті

+

споруд автослужб, об'єктів сервісу

+

на автомобільній дорозі

+

+ name; ?> +

+

+ roadType->definition; ?> + значення станом на + р. +

+
+
+ $dataProvider, + 'layout' => "{items}", + 'columns' => [ + [ + 'attribute' => 'location_right', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getRightString(); + }, + ], + [ + 'attribute' => 'location_axis', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getAxisString(); + }, + ], + [ + 'attribute' => 'location_left', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getLeftString(); + }, + ], + [ + 'attribute' => 'service_object_type_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->serviceObjectType->name; + }, + ], + [ + 'attribute' => 'settlement_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + if(!empty($model->settlement->name)) { + return $model->settlement->name; + } else { + return false; + } + }, + ], + 'distance', + 'capacity', + [ + 'attribute' => 'department_affiliation_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->departmentAffiliation->name; + }, + ], + 'arrangement_elements', + ], + ]); + ?> +
+
diff --git a/frontend/views/road/view.php b/frontend/views/road/view.php index a4ba66c..341fdc1 100755 --- a/frontend/views/road/view.php +++ b/frontend/views/road/view.php @@ -5,6 +5,9 @@ * @var Region[] $settlement_regions * @var Region[] $flow_intensity_regions * @var Region[] $cross_section_regions + * @var Region[] $road_surface_regions + * @var Region[] $service_object_regions + * @var Region[] $bus_stop_regions * @var Region[] $road_to_categories * @var Region[] $road_width */ @@ -128,6 +131,84 @@
+
+ +
+ name . ' область', [ + 'road-surface', + 'id' => $road->road_id, + 'region_id' => $region->region_id, + ]); + } + ?> +
+ +
+
+
+ +
+ +
+ name . ' область', [ + 'service-object', + 'id' => $road->road_id, + 'region_id' => $region->region_id, + ]); + } + ?> +
+ +
+
+
+ +
+ +
+ name . ' область', [ + 'bus-stop', + 'id' => $road->road_id, + 'region_id' => $region->region_id, + ]); + } + ?> +
+ +
+
+
+
diff --git a/frontend/views/service-object/_form.php b/frontend/views/service-object/_form.php new file mode 100644 index 0000000..f29fb62 --- /dev/null +++ b/frontend/views/service-object/_form.php @@ -0,0 +1,61 @@ + + +
+ + + + field($model, 'road_id') + ->dropDownList($roads) ?> + + field($model, 'region_id') + ->dropDownList($regions) ?> + + field($model, 'service_object_type_id') + ->dropDownList($service_object_types) ?> + + field($model, 'settlement_id') + ->dropDownList($settlements, ['prompt' => 'Нет']) ?> + + field($model, 'department_affiliation_id') + ->dropDownList($department_affiliations) ?> + + field($model, 'location_right') + ->textInput() ?> + + field($model, 'location_left') + ->textInput() ?> + + field($model, 'location_axis') + ->textInput() ?> + + field($model, 'distance') + ->textInput() ?> + + field($model, 'capacity') + ->textInput() ?> + + field($model, 'arrangement_elements') + ->textarea([ 'rows' => 6 ]) ?> + +
+ isNewRecord ? 'Create' : 'Update', [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]) ?> +
+ + + +
diff --git a/frontend/views/service-object/_search.php b/frontend/views/service-object/_search.php new file mode 100644 index 0000000..c390d63 --- /dev/null +++ b/frontend/views/service-object/_search.php @@ -0,0 +1,49 @@ + + + diff --git a/frontend/views/service-object/create.php b/frontend/views/service-object/create.php new file mode 100644 index 0000000..a420663 --- /dev/null +++ b/frontend/views/service-object/create.php @@ -0,0 +1,35 @@ +title = 'Create Service Object'; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Service Objects', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'service_object_types' => $service_object_types, + 'settlements' => $settlements, + 'department_affiliations' => $department_affiliations, + ]) ?> + +
diff --git a/frontend/views/service-object/index.php b/frontend/views/service-object/index.php new file mode 100644 index 0000000..5a80f30 --- /dev/null +++ b/frontend/views/service-object/index.php @@ -0,0 +1,84 @@ +title = 'Service Objects'; + $this->params[ 'breadcrumbs' ][] = $this->title; +?> +
+ +

title) ?>

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

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

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + [ 'class' => 'yii\grid\SerialColumn' ], + [ + 'attribute' => 'location_right', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getRightString(); + }, + ], + [ + 'attribute' => 'location_left', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getLeftString(); + }, + ], + [ + 'attribute' => 'location_axis', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->getAxisString(); + }, + ], + [ + 'attribute' => 'road_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->road->name; + }, + ], + [ + 'attribute' => 'region_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->region->name; + }, + ], + [ + 'attribute' => 'service_object_type_id', + 'value' => function($model) { + /** + * @var ServiceObject $model + */ + return $model->serviceObjectType->name; + }, + ], + [ 'class' => 'yii\grid\ActionColumn' ], + ], + ]); ?> +
diff --git a/frontend/views/service-object/update.php b/frontend/views/service-object/update.php new file mode 100644 index 0000000..c491a24 --- /dev/null +++ b/frontend/views/service-object/update.php @@ -0,0 +1,42 @@ +title = 'Update Service Object: ' . $model->service_object_id; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Service Objects', + 'url' => [ 'index' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $model->service_object_id, + 'url' => [ + 'view', + 'id' => $model->service_object_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'roads' => $roads, + 'regions' => $regions, + 'service_object_types' => $service_object_types, + 'settlements' => $settlements, + 'department_affiliations' => $department_affiliations, + ]) ?> + +
diff --git a/frontend/views/service-object/view.php b/frontend/views/service-object/view.php new file mode 100644 index 0000000..495ae41 --- /dev/null +++ b/frontend/views/service-object/view.php @@ -0,0 +1,46 @@ +title = $model->service_object_id; +$this->params['breadcrumbs'][] = ['label' => 'Service Objects', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

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

+ + $model, + 'attributes' => [ + 'service_object_id', + 'road_id', + 'region_id', + 'service_object_type_id', + 'settlement_id', + 'department_affiliation_id', + 'location_right', + 'location_left', + 'location_axis', + 'distance', + 'capacity', + 'arrangement_elements:ntext', + ], + ]) ?> + +
-- libgit2 0.21.4