diff --git a/plugins/tps/shops/models/RentalsAndSales.php b/plugins/tps/shops/models/RentalsAndSales.php index e854290..889454b 100644 --- a/plugins/tps/shops/models/RentalsAndSales.php +++ b/plugins/tps/shops/models/RentalsAndSales.php @@ -9,6 +9,7 @@ class RentalsAndSales extends Model { use \October\Rain\Database\Traits\Validation; + public $implement = ['RainLab.Translate.Behaviors.TranslatableModel']; /** * @var string The database table used by the model. @@ -24,4 +25,9 @@ class RentalsAndSales extends Model public $attachMany = [ 'images' => 'Tps\Shops\Classes\Attachment', ]; + + public $translatable = ['name', 'sector','description']; } + + + diff --git a/plugins/tps/shops/models/rentalsandsales/columns.yaml b/plugins/tps/shops/models/rentalsandsales/columns.yaml index 8e2018f..3b499e0 100644 --- a/plugins/tps/shops/models/rentalsandsales/columns.yaml +++ b/plugins/tps/shops/models/rentalsandsales/columns.yaml @@ -5,6 +5,9 @@ columns: type: label: type type: text + center_type: + label: center_type + type: text name: label: name type: text @@ -20,3 +23,4 @@ columns: updated_at: label: updated_at type: datetime + diff --git a/plugins/tps/shops/models/rentalsandsales/fields.yaml b/plugins/tps/shops/models/rentalsandsales/fields.yaml index da4debb..6a836fe 100644 --- a/plugins/tps/shops/models/rentalsandsales/fields.yaml +++ b/plugins/tps/shops/models/rentalsandsales/fields.yaml @@ -2,6 +2,7 @@ fields: type: label: Тип options: + not_selected: 'Не выбран' rental: Аренда sale: Продажа showSearch: true @@ -24,6 +25,14 @@ fields: - '3' - '4' - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - '11' + - '12' + - '13' showSearch: true span: auto type: dropdown @@ -45,3 +54,12 @@ fields: extension: auto span: auto type: fileupload + center_type: + label: 'Тип центра' + options: + not_selected: 'Не выбран' + business: 'Бизнес центр' + trade: 'Торговый центр' + showSearch: true + span: auto + type: dropdown diff --git a/plugins/tps/shops/updates/builder_table_update_tps_shops_rentals_and_sales.php b/plugins/tps/shops/updates/builder_table_update_tps_shops_rentals_and_sales.php new file mode 100644 index 0000000..52357ba --- /dev/null +++ b/plugins/tps/shops/updates/builder_table_update_tps_shops_rentals_and_sales.php @@ -0,0 +1,23 @@ +string('center_type'); + }); + } + + public function down() + { + Schema::table('tps_shops_rentals_and_sales', function($table) + { + $table->dropColumn('center_type'); + }); + } +} diff --git a/plugins/tps/shops/updates/version.yaml b/plugins/tps/shops/updates/version.yaml index c76f528..2983239 100644 --- a/plugins/tps/shops/updates/version.yaml +++ b/plugins/tps/shops/updates/version.yaml @@ -93,3 +93,6 @@ 1.0.32: - 'Created table tps_shops_rentals_and_sales' - builder_table_create_tps_shops_rentals_and_sales.php +1.0.33: + - 'Updated table tps_shops_rentals_and_sales' + - builder_table_update_tps_shops_rentals_and_sales.php diff --git a/themes/berkarar/pages/rental_or_sale.htm b/themes/berkarar/pages/rental_or_sale.htm index 90d3519..2dff5d7 100644 --- a/themes/berkarar/pages/rental_or_sale.htm +++ b/themes/berkarar/pages/rental_or_sale.htm @@ -74,6 +74,14 @@ function onStart(){ +993 {{sale.number}} +