tab-office.php
3.8 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
70
71
72
73
74
75
76
77
78
79
<? //if(!$arResult['ITEMS']) return ?>
<?
/** @var \Sh\Entities\Contact $contact */
/** @var \Sh\Entities\Office $item */
?>
<div class="contacts-tabs-item _active js-tab" data-id="1">
<ul class="contacts-list js-list-container">
<? foreach ($arResult['OFFICES'] as $i => $item) { ?>
<span style="display:none"
itemprop="name">Stroy House<? if ($subtitle = $item->getSubtitle()) { ?> (<?= $subtitle ?>)<? } ?></span>
<li class="contacts-list-item-title" data-id="<?= $item->ID ?>">
<b><?= $item->getName() ?></b>
<? if ($subtitle = $item->getSubtitle()) { ?>
<span>(<?= $subtitle ?>)</span>
<? } ?>
</li>
<? if ($address = $item->getAddress()) { ?>
<section class="contacts-list-item-block">
<h6 class="contacts-list-item-block-title">Адрес:</h6>
<article class="contacts-list-item-block-text" itemprop="address"><?= $address ?></article>
</section>
<? } ?>
<li class="contacts-list-item _collapsable js-collapsable<? if (!$i) { ?> <? } ?>" itemscope
itemtype="http://schema.org/Organization">
<a href="#!" class="contacts-tabs-head-item js-collapsable-toggle js-office"
data-id="<?= $item->ID ?>">
<b>Подробно...</b>
</a>
<div class="js-collapsable-content contacts-list-item-content">
<? if ($phones = $item->getPhones()) { ?>
<section class="contacts-list-item-block _half _phones">
<h6 class="contacts-list-item-block-title">Телефоны:</h6>
<article class="contacts-list-item-block-text ">
<? foreach ($phones as $phone) { ?>
<span><a href="tel:<?= $phone ?>" itemprop="telephone"><?= $phone ?></a></span>
<? } ?>
</article>
</section>
<? } ?>
<? if ($times = $item->getTime()) { ?>
<section class="contacts-list-item-block _half _hours">
<h6 class="contacts-list-item-block-title">График работы:</h6>
<article class="contacts-list-item-block-text">
<? foreach ($times as $time) { ?>
<span><?= $time ?></span>
<? } ?>
</article>
</section>
<? } ?>
<? if ($email = $item->getEmail()) { ?>
<section class="contacts-list-item-block _email">
<h6 class="contacts-list-item-block-title">Эл. почта:</h6>
<article class="contacts-list-item-block-text">
<a href="mailto:<?= $email ?>" itemprop="email"><?= $email ?></a>
</article>
</section>
<? } ?>
<? if ($text = $item->getText()) { ?>
<section class="contacts-list-item-block _path">
<h6 class="contacts-list-item-block-title">Как проехать?</h6>
<article class="contacts-list-item-block-text">
<?= $text ?>
</article>
</section>
<? } ?>
</div>
</li>
<? } ?>
</ul>
</div>