259 lines
19 KiB
HTML
259 lines
19 KiB
HTML
title = "rentals_and_sales"
|
||
url = "/rentals_and_sales"
|
||
layout = "default"
|
||
is_hidden = 0
|
||
==
|
||
<?php
|
||
function onStart(){
|
||
$this['rentals_and_sales'] = Tps\Shops\Models\RentalsAndSales::orderBy('id', 'desc')->get();
|
||
$this['rentals_and_sales_all'] = $this['rentals_and_sales'];
|
||
$this['rentals'] = $this['rentals_and_sales']->where("type", "rental");
|
||
$this['sales'] = $this['rentals_and_sales']->where("type", "sale");
|
||
|
||
//dd($this['sales']);
|
||
|
||
}
|
||
|
||
function onUpdate()
|
||
{
|
||
|
||
$floorID = post('floorID');
|
||
|
||
$floorID = strval(intval($floorID) - 1);
|
||
//dd($floorID);
|
||
$this['floor_data'] = Tps\Shops\Models\RentalsAndSales::orderBy('created_at')->where('floor', $floorID)->get();
|
||
|
||
$this['rentals_and_sales_all'] = $this['floor_data'];
|
||
$this['rentals'] = $this['floor_data']->where("type", "rental");
|
||
$this['sales'] = $this['floor_data']->where("type", "sale");
|
||
|
||
|
||
//dd($this['rentals_and_sales_all']);
|
||
//dd(['rentals_and_sales_all' => $this['rentals_and_sales_all'], 'rentals' => $this['rentals'], 'sales' => $this['sales']]);
|
||
return [
|
||
'home/rentals_and_sales/rentals_and_sales' => $this->renderPartial('home/rentals_and_sales/rentals_and_sales', ['rentals_and_sales_all' => $this['rentals_and_sales_all']]),
|
||
'home/rentals_and_sales/rentals' => $this->renderPartial('home/rentals_and_sales/rentals', ['rentals' => $this['rentals']]),
|
||
'home/rentals_and_sales/sales' => $this->renderPartial('home/rentals_and_sales/sales', ['sales' => $this['sales']])
|
||
];
|
||
|
||
}
|
||
?>
|
||
==
|
||
<section class="crumb">
|
||
<div class="auto_container">
|
||
<div class="crumb_wrap">
|
||
<div class="crumb_row">
|
||
<a href="{{'home'|page}}" class="crumb_title">
|
||
<span>
|
||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||
xmlns="http://www.w3.org/2000/svg">
|
||
<path
|
||
d="M1.25 12.88V6.91459C1.25 6.33752 1.51642 5.79278 1.97193 5.4385L6.85193 1.64294C7.52721 1.11773 8.47279 1.11773 9.14807 1.64294L14.0281 5.4385C14.4836 5.79278 14.75 6.33752 14.75 6.91459V12.88C14.75 13.9128 13.9128 14.75 12.88 14.75H10.75C10.4739 14.75 10.25 14.5261 10.25 14.25V11.6487C10.25 11.3855 10.207 11.1193 10.0677 10.896C9.88545 10.6039 9.64228 10.3523 9.35303 10.1595C8.95253 9.89251 8.48167 9.75 8 9.75C7.51833 9.75 7.04747 9.89251 6.64697 10.1595C6.35772 10.3523 6.11455 10.6039 5.93234 10.896C5.79305 11.1193 5.75 11.3855 5.75 11.6487V14.25C5.75 14.5261 5.52614 14.75 5.25 14.75H3.12C2.08723 14.75 1.25 13.9128 1.25 12.88Z"
|
||
stroke="#292929" stroke-width="1.5" stroke-linecap="round"
|
||
stroke-linejoin="round" />
|
||
</svg>
|
||
</span>
|
||
{{'Главная'|_}}
|
||
</a>
|
||
|
||
<h4 class="crumb_title">
|
||
{{'Аренда и продажа '|_}}
|
||
</h4>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Shops ============================ -->
|
||
<style>
|
||
.pagination-buttons{
|
||
margin-top: 30px;
|
||
}
|
||
</style>
|
||
<section class="shops">
|
||
<div class="auto_container">
|
||
<div class="shops_wrap">
|
||
|
||
<div class="shops_sort">
|
||
|
||
<form action="{{ 'search_rentals_and_sales'|page }}" method="GET" class="menu_search">
|
||
<div class="shops_search">
|
||
<input type="text" name="q" placeholder="{{'Поиск аренды и продажи'|_}}">
|
||
|
||
<button type="submit">
|
||
<svg width="19" height="19" viewBox="0 0 19 19" fill="none"
|
||
xmlns="http://www.w3.org/2000/svg">
|
||
<path
|
||
d="M17.71 16.29L14.31 12.9C15.407 11.5025 16.0022 9.77666 16 8C16 6.41775 15.5308 4.87103 14.6518 3.55544C13.7727 2.23985 12.5233 1.21447 11.0615 0.608967C9.59966 0.00346625 7.99113 -0.15496 6.43928 0.153721C4.88743 0.462403 3.46197 1.22433 2.34315 2.34315C1.22433 3.46197 0.462403 4.88743 0.153721 6.43928C-0.15496 7.99113 0.00346625 9.59966 0.608967 11.0615C1.21447 12.5233 2.23985 13.7727 3.55544 14.6518C4.87103 15.5308 6.41775 16 8 16C9.77666 16.0022 11.5025 15.407 12.9 14.31L16.29 17.71C16.383 17.8037 16.4936 17.8781 16.6154 17.9289C16.7373 17.9797 16.868 18.0058 17 18.0058C17.132 18.0058 17.2627 17.9797 17.3846 17.9289C17.5064 17.8781 17.617 17.8037 17.71 17.71C17.8037 17.617 17.8781 17.5064 17.9289 17.3846C17.9797 17.2627 18.0058 17.132 18.0058 17C18.0058 16.868 17.9797 16.7373 17.9289 16.6154C17.8781 16.4936 17.8037 16.383 17.71 16.29ZM2 8C2 6.81332 2.3519 5.65328 3.01119 4.66658C3.67047 3.67989 4.60755 2.91085 5.7039 2.45673C6.80026 2.0026 8.00666 1.88378 9.17055 2.11529C10.3344 2.3468 11.4035 2.91825 12.2426 3.75736C13.0818 4.59648 13.6532 5.66558 13.8847 6.82946C14.1162 7.99335 13.9974 9.19975 13.5433 10.2961C13.0892 11.3925 12.3201 12.3295 11.3334 12.9888C10.3467 13.6481 9.18669 14 8 14C6.4087 14 4.88258 13.3679 3.75736 12.2426C2.63214 11.1174 2 9.5913 2 8Z"
|
||
fill="white" />
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
|
||
<div class="custom-select w150" id="mySelect">
|
||
|
||
|
||
<select name="rentals_and_sales" onchange="handleChange(this)">
|
||
<option value="">{{'Все этажы'|_}}</option>
|
||
<option value="0">0</option>
|
||
<option value="1">1</option>
|
||
<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>
|
||
|
||
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="shops_tab">
|
||
<h4 class="shops_tab-link tabBtn active" data-tab="#all">
|
||
{{'ВСЕ'|_}}
|
||
</h4>
|
||
<h4 class="shops_tab-link tabBtn" data-tab="#rentals">
|
||
{{'Аренда'|_}}
|
||
</h4>
|
||
<h4 class="shops_tab-link tabBtn" data-tab="#sales">
|
||
{{'продажа'|_}}
|
||
</h4>
|
||
</div>
|
||
|
||
|
||
|
||
<!-- <div id="data_rentals_and_sales_all"> -->
|
||
<div class="shops_block tabItem active" id="all">
|
||
{% partial 'home/rentals_and_sales/rentals_and_sales' rentals_and_sales_all=rentals_and_sales_all%}
|
||
</div>
|
||
<!-- </div> -->
|
||
<div class="pag_group pagination-buttons shops_block_all_pagination" id="all_pagination">
|
||
<div class="pag_btn prev prev-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect x="50" y="50" width="50" height="50" rx="10" transform="rotate(-180 50 50)" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3784)">
|
||
<path d="M22.0212 25.0001C22.0211 24.9041 22.04 24.809 22.0767 24.7203C22.1134 24.6316 22.1673 24.551 22.2352 24.4831L26.7292 19.9881C26.8666 19.8507 27.0529 19.7736 27.2472 19.7736C27.4415 19.7736 27.6278 19.8507 27.7652 19.9881C27.9026 20.1255 27.9798 20.3118 27.9798 20.5061C27.9798 20.7004 27.9026 20.8867 27.7652 21.0241L23.7882 25.0001L27.7652 28.9741C27.8334 29.0421 27.8874 29.1229 27.9244 29.2119C27.9613 29.3008 27.9804 29.3961 27.9805 29.4924C27.9806 29.5887 27.9617 29.6841 27.9249 29.7731C27.8882 29.8621 27.8342 29.943 27.7662 30.0111C27.6982 30.0793 27.6174 30.1334 27.5285 30.1703C27.4395 30.2072 27.3442 30.2263 27.2479 30.2264C27.1516 30.2265 27.0562 30.2076 26.9672 30.1708C26.8782 30.1341 26.7974 30.0801 26.7292 30.0121L22.2352 25.5171C22.1673 25.4493 22.1134 25.3687 22.0767 25.2799C22.04 25.1912 22.0211 25.0961 22.0212 25.0001Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3784">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(27.9785 19.774) rotate(90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
<input type="text" name="page" value="1" class="input_page" disabled>
|
||
|
||
<div class="pag_btn next next-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect width="50" height="50" rx="10" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3788)">
|
||
<path d="M27.9808 24.9999C27.9808 25.0959 27.962 25.191 27.9253 25.2797C27.8885 25.3684 27.8347 25.449 27.7668 25.5169L23.2728 30.0119C23.1354 30.1493 22.949 30.2264 22.7548 30.2264C22.5605 30.2264 22.3741 30.1493 22.2368 30.0119C22.0994 29.8745 22.0222 29.6882 22.0222 29.4939C22.0222 29.2996 22.0994 29.1133 22.2368 28.9759L26.2138 24.9999L22.2368 21.0259C22.1686 20.9579 22.1145 20.8771 22.0776 20.7881C22.0406 20.6992 22.0216 20.6039 22.0215 20.5076C22.0214 20.4113 22.0403 20.3159 22.077 20.2269C22.1138 20.1379 22.1677 20.057 22.2358 19.9889C22.3038 19.9207 22.3846 19.8666 22.4735 19.8297C22.5624 19.7928 22.6578 19.7737 22.754 19.7736C22.8503 19.7735 22.9457 19.7924 23.0347 19.8292C23.1237 19.8659 23.2046 19.9199 23.2728 19.9879L27.7668 24.4829C27.8347 24.5507 27.8885 24.6313 27.9253 24.7201C27.962 24.8088 27.9808 24.9039 27.9808 24.9999Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3788">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(22.0215 30.226) rotate(-90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
</div>
|
||
<!-- <div id="data_rentals"> -->
|
||
<div class="shops_block tabItem" id="rentals">
|
||
{% partial 'home/rentals_and_sales/rentals' rentals=rentals%}
|
||
</div>
|
||
<!-- </div> -->
|
||
<div class="pag_group pagination-buttons shops_block_rentals_pagination" id="rentals_pagination">
|
||
<div class="pag_btn prev prev-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect x="50" y="50" width="50" height="50" rx="10" transform="rotate(-180 50 50)" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3784)">
|
||
<path d="M22.0212 25.0001C22.0211 24.9041 22.04 24.809 22.0767 24.7203C22.1134 24.6316 22.1673 24.551 22.2352 24.4831L26.7292 19.9881C26.8666 19.8507 27.0529 19.7736 27.2472 19.7736C27.4415 19.7736 27.6278 19.8507 27.7652 19.9881C27.9026 20.1255 27.9798 20.3118 27.9798 20.5061C27.9798 20.7004 27.9026 20.8867 27.7652 21.0241L23.7882 25.0001L27.7652 28.9741C27.8334 29.0421 27.8874 29.1229 27.9244 29.2119C27.9613 29.3008 27.9804 29.3961 27.9805 29.4924C27.9806 29.5887 27.9617 29.6841 27.9249 29.7731C27.8882 29.8621 27.8342 29.943 27.7662 30.0111C27.6982 30.0793 27.6174 30.1334 27.5285 30.1703C27.4395 30.2072 27.3442 30.2263 27.2479 30.2264C27.1516 30.2265 27.0562 30.2076 26.9672 30.1708C26.8782 30.1341 26.7974 30.0801 26.7292 30.0121L22.2352 25.5171C22.1673 25.4493 22.1134 25.3687 22.0767 25.2799C22.04 25.1912 22.0211 25.0961 22.0212 25.0001Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3784">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(27.9785 19.774) rotate(90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
<input type="text" name="page" value="1" class="input_page" disabled>
|
||
|
||
<div class="pag_btn next next-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect width="50" height="50" rx="10" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3788)">
|
||
<path d="M27.9808 24.9999C27.9808 25.0959 27.962 25.191 27.9253 25.2797C27.8885 25.3684 27.8347 25.449 27.7668 25.5169L23.2728 30.0119C23.1354 30.1493 22.949 30.2264 22.7548 30.2264C22.5605 30.2264 22.3741 30.1493 22.2368 30.0119C22.0994 29.8745 22.0222 29.6882 22.0222 29.4939C22.0222 29.2996 22.0994 29.1133 22.2368 28.9759L26.2138 24.9999L22.2368 21.0259C22.1686 20.9579 22.1145 20.8771 22.0776 20.7881C22.0406 20.6992 22.0216 20.6039 22.0215 20.5076C22.0214 20.4113 22.0403 20.3159 22.077 20.2269C22.1138 20.1379 22.1677 20.057 22.2358 19.9889C22.3038 19.9207 22.3846 19.8666 22.4735 19.8297C22.5624 19.7928 22.6578 19.7737 22.754 19.7736C22.8503 19.7735 22.9457 19.7924 23.0347 19.8292C23.1237 19.8659 23.2046 19.9199 23.2728 19.9879L27.7668 24.4829C27.8347 24.5507 27.8885 24.6313 27.9253 24.7201C27.962 24.8088 27.9808 24.9039 27.9808 24.9999Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3788">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(22.0215 30.226) rotate(-90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
</div>
|
||
<!-- <div id="data_sales"> -->
|
||
<div class="shops_block tabItem" id="sales">
|
||
{% partial 'home/rentals_and_sales/sales' sales=sales%}
|
||
</div>
|
||
<!-- </div> -->
|
||
<div class="pag_group pagination-buttons shops_block_sales_pagination" id="sales_pagination">
|
||
<div class="pag_btn prev prev-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect x="50" y="50" width="50" height="50" rx="10" transform="rotate(-180 50 50)" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3784)">
|
||
<path d="M22.0212 25.0001C22.0211 24.9041 22.04 24.809 22.0767 24.7203C22.1134 24.6316 22.1673 24.551 22.2352 24.4831L26.7292 19.9881C26.8666 19.8507 27.0529 19.7736 27.2472 19.7736C27.4415 19.7736 27.6278 19.8507 27.7652 19.9881C27.9026 20.1255 27.9798 20.3118 27.9798 20.5061C27.9798 20.7004 27.9026 20.8867 27.7652 21.0241L23.7882 25.0001L27.7652 28.9741C27.8334 29.0421 27.8874 29.1229 27.9244 29.2119C27.9613 29.3008 27.9804 29.3961 27.9805 29.4924C27.9806 29.5887 27.9617 29.6841 27.9249 29.7731C27.8882 29.8621 27.8342 29.943 27.7662 30.0111C27.6982 30.0793 27.6174 30.1334 27.5285 30.1703C27.4395 30.2072 27.3442 30.2263 27.2479 30.2264C27.1516 30.2265 27.0562 30.2076 26.9672 30.1708C26.8782 30.1341 26.7974 30.0801 26.7292 30.0121L22.2352 25.5171C22.1673 25.4493 22.1134 25.3687 22.0767 25.2799C22.04 25.1912 22.0211 25.0961 22.0212 25.0001Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3784">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(27.9785 19.774) rotate(90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
<input type="text" name="page" value="1" class="input_page" disabled>
|
||
|
||
<div class="pag_btn next next-button">
|
||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<rect width="50" height="50" rx="10" fill="#FFB100"></rect>
|
||
<g clip-path="url(#clip0_551_3788)">
|
||
<path d="M27.9808 24.9999C27.9808 25.0959 27.962 25.191 27.9253 25.2797C27.8885 25.3684 27.8347 25.449 27.7668 25.5169L23.2728 30.0119C23.1354 30.1493 22.949 30.2264 22.7548 30.2264C22.5605 30.2264 22.3741 30.1493 22.2368 30.0119C22.0994 29.8745 22.0222 29.6882 22.0222 29.4939C22.0222 29.2996 22.0994 29.1133 22.2368 28.9759L26.2138 24.9999L22.2368 21.0259C22.1686 20.9579 22.1145 20.8771 22.0776 20.7881C22.0406 20.6992 22.0216 20.6039 22.0215 20.5076C22.0214 20.4113 22.0403 20.3159 22.077 20.2269C22.1138 20.1379 22.1677 20.057 22.2358 19.9889C22.3038 19.9207 22.3846 19.8666 22.4735 19.8297C22.5624 19.7928 22.6578 19.7737 22.754 19.7736C22.8503 19.7735 22.9457 19.7924 23.0347 19.8292C23.1237 19.8659 23.2046 19.9199 23.2728 19.9879L27.7668 24.4829C27.8347 24.5507 27.8885 24.6313 27.9253 24.7201C27.962 24.8088 27.9808 24.9039 27.9808 24.9999Z" fill="#292929"></path>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_551_3788">
|
||
<rect width="10.452" height="5.958" fill="white" transform="translate(22.0215 30.226) rotate(-90)"></rect>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
</div>
|
||
<!-- </div> -->
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- Shops end ========================= -->
|
||
<div class="shops_block tabItem" id="js_code">
|
||
{% partial 'home/rentals_and_sales/js_code'%}
|
||
</div>
|