project-list.php
2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?
/** @var $item \SH\Entities\Project */
$i = 2;
if(empty($arResult['ITEMS'])) return;
?>
<? foreach($arResult['ITEMS'] as $item) {
($i % 2) == 0 ? $class='leftside' : $class='rightside';
?>
<?
$square = $item->getSquare();
$floors = $item->getFloorCount();
$bedrooms = $item->getBedroomCount();
$gallery = $item->getPreviewGallery();
$price = $item->Object_Price['~VALUE'];
//$item->getObjectPrice();
?>
<li class="tiles-item <?=$class;?>" data-id="<?= $item->ID ?>">
<div class="tiles-item-wr">
<a href="<?= $item->getUrl() ?>" class="tiles-item-content" target="_blank">
<? if($arParams['SHOW_LIKE_BUTTON']) { ?>
<span class="fav-toggle js-fav-toggle">Нравится</span>
<? } ?>
<span class="tiles-item-content-icon"><img src="<?= $item->getIcon() ?>" alt=""/></span>
<span class="tiles-item-content-title"><?= $item->getName() ?>
<? if ($price) { ?> <span class="tiles-item-content-price"> от <?= $price ?> руб. за 1 кв.м. </span> <?}?>
</span>
<? if($square || $floors || $bedrooms) { ?>
<span class="tiles-item-content-specs">
<? if($square) { ?>
<span class="tiles-item-content-specs-item _square">
<span class="tiles-item-content-specs-item-value"><?= $square ?></span>
<span class="tiles-item-content-specs-item-unit">м<sup>2</sup></span>
</span>
<? } ?>
<? if($floors) { ?>
<span class="tiles-item-content-specs-item _floors">
<span class="tiles-item-content-specs-item-value"><?= $floors ?></span>
<span class="tiles-item-content-specs-item-unit"><?= num_to_string($floors, 'этаж', 'этажа', 'этажей', false) ?></span>
</span>
<? } ?>
<? if($bedrooms) { ?>
<span class="tiles-item-content-specs-item _bedrooms">
<span class="tiles-item-content-specs-item-value"><?= $bedrooms ?></span>
<span class="tiles-item-content-specs-item-unit"><?= num_to_string($bedrooms, 'спальня', 'спальни', 'спален', false) ?></span>
</span>
<? } ?>
</span>
<? } ?>
</a>
<? if(count($gallery) > 1) { ?>
<a href="#!" class="tiles-item-prev js-slideshow-prev"></a>
<a href="#!" class="tiles-item-next js-slideshow-next"></a>
<? } ?>
<ul class="tiles-item-images js-tile-gallery">
<? foreach($gallery as $imageUrl) { ?>
<li class="tiles-item-images-item js-slide" data-original="<?= $imageUrl ?>" style="background-image: url(/img/empty.png)"></li>
<? } ?>
</ul>
</div>
</li>
<?
$i ++;
} ?>