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;
|
||||
|
||||
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'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
- '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
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ function onStart(){
|
|||
</span>
|
||||
+993 {{sale.number}}
|
||||
</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="3">3</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>
|
||||
|
||||
<div id="output"></div>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,25 @@
|
|||
{{'Аренда'|_}}
|
||||
</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">
|
||||
<h4 class="shops_item-content-txt">
|
||||
{{sale.name}}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,20 @@
|
|||
{{'Аренда'|_}}
|
||||
{% elseif sale.type == "sale"%}
|
||||
{{'Продажа'|_}}
|
||||
{% else %}
|
||||
{{'Не выбран'|_}}
|
||||
{% endif %}
|
||||
</h6>
|
||||
|
||||
<div class="shops_item-info">
|
||||
<h5 class="shops_item-name">
|
||||
{{sale.name}}
|
||||
{% if sale.center_type == 'business' %}
|
||||
{{'Бизнес центр'|_}}
|
||||
{% elseif sale.center_type == 'trade' %}
|
||||
{{'Торговый центр'|_}}
|
||||
{% else %}
|
||||
{{'Не выбран'|_}}
|
||||
{% endif %}
|
||||
</h5>
|
||||
|
||||
<h5 class="shops_item-floor">
|
||||
|
|
@ -26,6 +34,7 @@
|
|||
</span>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="shops_item-content">
|
||||
<h4 class="shops_item-content-txt">
|
||||
{{sale.name}}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,25 @@
|
|||
{{'Продажа'|_}}
|
||||
</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">
|
||||
<h4 class="shops_item-content-txt">
|
||||
{{sale.name}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue