list.php
1.45 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
<?
/** @var $item \SH\Entities\People */
if(empty($arResult['ITEMS'])) return;
$thumbParams = array('width' => 287, 'height' => 287, 'type' => 'put_out');
?>
<? foreach($arResult['ITEMS'] as $item) { ?>
<?
$hasDetail = (bool) $item->DETAIL_TEXT;
?>
<? if($hasDetail) { ?>
<a href="<?= $item->getUrl() ?>" class="people-item col-4 js-equal-blocks">
<? } else { ?>
<div class="people-item col-4 js-equal-blocks">
<? } ?>
<div class="people-item-wr">
<? if($item->hasPreviewImage()) { ?>
<figure class="people-item-image responsive-image">
<img src="<?= $item->getPreviewImageThumb($thumbParams) ?>" alt="<?= $item->getName() ?>"/>
<? if($hasDetail) { ?>
<span class="people-item-image-link">
<span class="people-item-image-link-icon _interview"></span>
<span class="people-item-image-link-text">интервью</span>
</span>
<? } ?>
</figure>
<? } ?>
<div class="people-item-content">
<span class="people-item-name"><?= $item->getName() ?></span>
<? if($val = $item->getPost()) { ?>
<span class="people-item-position"><?= $val ?></span>
<? } ?>
<? if($val = $item->PREVIEW_TEXT) { ?>
<div class="people-item-text"><?= $val ?></div>
<? } ?>
</div>
</div>
<? if($hasDetail) { ?>
</a>
<? } else { ?>
</div>
<? } ?>
<? } ?>