template.php
1.4 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
<? if($arResult['ITEMS']) { ?>
<?
/** @var \Sh\Entities\Award $item */
$colCount = 3;
$c = count($arResult['ITEMS']);
$thumbParams = array('width' => 287, 'height' => 500);
?>
<div class="awards row">
<? for($j = 0; $j < $colCount; $j++) { ?>
<div class="awards-col col-4">
<? for($i = $j; $i < $c; $i += $colCount) { ?>
<? if(!isset($arResult['ITEMS'][$i])) continue ?>
<? $item = $arResult['ITEMS'][$i] ?>
<div class="awards-item">
<? if(empty($arParams['NON_CLICKABLE'])) { ?>
<a href="<?= $item->getDetailImageUrl() ?>" class="lightbox awards-item-image responsive-image" target="_blank">
<? } else { ?>
<span class="awards-item-image responsive-image">
<? } ?>
<img src="<?= $item->getDetailImageThumb($thumbParams) ?>" alt="<?= $item->getName() ?>"/>
<? if(empty($arParams['NON_CLICKABLE'])) { ?>
</a>
<? } else { ?>
</span>
<? } ?>
<div class="awards-item-content">
<? if($val = $item->getType()) { ?>
<span class="awards-item-type"><?= $val ?></span>
<? } ?>
<span class="awards-item-title"><?= $item->getName() ?></span>
<? if($item->ACTIVE_FROM) { ?>
<span class="awards-item-date"><?= $item->getActiveFromDate('d F Y') ?></span>
<? } ?>
<div class="awards-item-text"><?= $item->getText() ?></div>
</div>
</div>
<? } ?>
</div>
<? } ?>
</div>
<? } ?>