add column to table rentals_and_sales
This commit is contained in:
parent
70523bbcec
commit
0a1bc04fd6
|
|
@ -9,6 +9,7 @@ class RentalsAndSales extends Model
|
||||||
{
|
{
|
||||||
use \October\Rain\Database\Traits\Validation;
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
public $implement = ['RainLab.Translate.Behaviors.TranslatableModel'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The database table used by the model.
|
* @var string The database table used by the model.
|
||||||
|
|
@ -24,4 +25,9 @@ class RentalsAndSales extends Model
|
||||||
public $attachMany = [
|
public $attachMany = [
|
||||||
'images' => 'Tps\Shops\Classes\Attachment',
|
'images' => 'Tps\Shops\Classes\Attachment',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public $translatable = ['name', 'sector','description'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ columns:
|
||||||
type:
|
type:
|
||||||
label: type
|
label: type
|
||||||
type: text
|
type: text
|
||||||
|
center_type:
|
||||||
|
label: center_type
|
||||||
|
type: text
|
||||||
name:
|
name:
|
||||||
label: name
|
label: name
|
||||||
type: text
|
type: text
|
||||||
|
|
@ -20,3 +23,4 @@ columns:
|
||||||
updated_at:
|
updated_at:
|
||||||
label: updated_at
|
label: updated_at
|
||||||
type: datetime
|
type: datetime
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ fields:
|
||||||
type:
|
type:
|
||||||
label: Тип
|
label: Тип
|
||||||
options:
|
options:
|
||||||
|
not_selected: 'Не выбран'
|
||||||
rental: Аренда
|
rental: Аренда
|
||||||
sale: Продажа
|
sale: Продажа
|
||||||
showSearch: true
|
showSearch: true
|
||||||
|
|
@ -24,6 +25,14 @@ fields:
|
||||||
- '3'
|
- '3'
|
||||||
- '4'
|
- '4'
|
||||||
- '5'
|
- '5'
|
||||||
|
- '6'
|
||||||
|
- '7'
|
||||||
|
- '8'
|
||||||
|
- '9'
|
||||||
|
- '10'
|
||||||
|
- '11'
|
||||||
|
- '12'
|
||||||
|
- '13'
|
||||||
showSearch: true
|
showSearch: true
|
||||||
span: auto
|
span: auto
|
||||||
type: dropdown
|
type: dropdown
|
||||||
|
|
@ -45,3 +54,12 @@ fields:
|
||||||
extension: auto
|
extension: auto
|
||||||
span: auto
|
span: auto
|
||||||
type: fileupload
|
type: fileupload
|
||||||
|
center_type:
|
||||||
|
label: 'Тип центра'
|
||||||
|
options:
|
||||||
|
not_selected: 'Не выбран'
|
||||||
|
business: 'Бизнес центр'
|
||||||
|
trade: 'Торговый центр'
|
||||||
|
showSearch: true
|
||||||
|
span: auto
|
||||||
|
type: dropdown
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace Tps\Shops\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsShopsRentalsAndSales extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_shops_rentals_and_sales', function($table)
|
||||||
|
{
|
||||||
|
$table->string('center_type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_shops_rentals_and_sales', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('center_type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -93,3 +93,6 @@
|
||||||
1.0.32:
|
1.0.32:
|
||||||
- 'Created table tps_shops_rentals_and_sales'
|
- 'Created table tps_shops_rentals_and_sales'
|
||||||
- builder_table_create_tps_shops_rentals_and_sales.php
|
- 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
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,14 @@ function onStart(){
|
||||||
</span>
|
</span>
|
||||||
+993 {{sale.number}}
|
+993 {{sale.number}}
|
||||||
</a>
|
</a>
|
||||||
|
<h6 class="post_info-cnt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".13s">
|
||||||
|
{% if sale.center_type == 'business' %}
|
||||||
|
{{'Бизнес центр'|_}}
|
||||||
|
{% elseif sale.center_type == 'trade' %}
|
||||||
|
{{'Торговый центр'|_}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</h6>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,15 @@ function onStart(){
|
||||||
<option value="2">2</option>
|
<option value="2">2</option>
|
||||||
<option value="3">3</option>
|
<option value="3">3</option>
|
||||||
<option value="4">4</option>
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="6">6</option>
|
||||||
|
<option value="7">7</option>
|
||||||
|
<option value="8">8</option>
|
||||||
|
<option value="9">9</option>
|
||||||
|
<option value="10">10</option>
|
||||||
|
<option value="11">11</option>
|
||||||
|
<option value="12">12</option>
|
||||||
|
<option value="13">13</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<div id="output"></div>
|
<div id="output"></div>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,25 @@
|
||||||
{{'Аренда'|_}}
|
{{'Аренда'|_}}
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
|
<div class="shops_item-info">
|
||||||
|
<h5 class="shops_item-name">
|
||||||
|
{% if sale.center_type == 'business' %}
|
||||||
|
{{'Бизнес центр'|_}}
|
||||||
|
{% elseif sale.center_type == 'trade' %}
|
||||||
|
{{'Торговый центр'|_}}
|
||||||
|
{% else %}
|
||||||
|
{{'Не выбран'|_}}
|
||||||
|
{% endif %}
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<h5 class="shops_item-floor">
|
||||||
|
{{sale.floor}}
|
||||||
|
<span>
|
||||||
|
{{'ЭТАЖ'|_}}
|
||||||
|
</span>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="shops_item-content">
|
<div class="shops_item-content">
|
||||||
<h4 class="shops_item-content-txt">
|
<h4 class="shops_item-content-txt">
|
||||||
{{sale.name}}
|
{{sale.name}}
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,20 @@
|
||||||
{{'Аренда'|_}}
|
{{'Аренда'|_}}
|
||||||
{% elseif sale.type == "sale"%}
|
{% elseif sale.type == "sale"%}
|
||||||
{{'Продажа'|_}}
|
{{'Продажа'|_}}
|
||||||
|
{% else %}
|
||||||
|
{{'Не выбран'|_}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
<div class="shops_item-info">
|
<div class="shops_item-info">
|
||||||
<h5 class="shops_item-name">
|
<h5 class="shops_item-name">
|
||||||
{{sale.name}}
|
{% if sale.center_type == 'business' %}
|
||||||
|
{{'Бизнес центр'|_}}
|
||||||
|
{% elseif sale.center_type == 'trade' %}
|
||||||
|
{{'Торговый центр'|_}}
|
||||||
|
{% else %}
|
||||||
|
{{'Не выбран'|_}}
|
||||||
|
{% endif %}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<h5 class="shops_item-floor">
|
<h5 class="shops_item-floor">
|
||||||
|
|
@ -26,6 +34,7 @@
|
||||||
</span>
|
</span>
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shops_item-content">
|
<div class="shops_item-content">
|
||||||
<h4 class="shops_item-content-txt">
|
<h4 class="shops_item-content-txt">
|
||||||
{{sale.name}}
|
{{sale.name}}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,25 @@
|
||||||
{{'Продажа'|_}}
|
{{'Продажа'|_}}
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
|
<div class="shops_item-info">
|
||||||
|
<h5 class="shops_item-name">
|
||||||
|
{% if sale.center_type == 'business' %}
|
||||||
|
{{'Бизнес центр'|_}}
|
||||||
|
{% elseif sale.center_type == 'trade' %}
|
||||||
|
{{'Торговый центр'|_}}
|
||||||
|
{% else %}
|
||||||
|
{{'Не выбран'|_}}
|
||||||
|
{% endif %}
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<h5 class="shops_item-floor">
|
||||||
|
{{sale.floor}}
|
||||||
|
<span>
|
||||||
|
{{'ЭТАЖ'|_}}
|
||||||
|
</span>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="shops_item-content">
|
<div class="shops_item-content">
|
||||||
<h4 class="shops_item-content-txt">
|
<h4 class="shops_item-content-txt">
|
||||||
{{sale.name}}
|
{{sale.name}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue