view.php
9.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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?php
use yii\widgets\ListView;
$this->registerCssFile('/css/spots.css');
$this->registerJsFile('/js/jquery.scrollbox.min.js');
$this->registerCssFile('/js/raty-2.7.0/lib/jquery.raty.css');
$this->registerJsFile('/js/raty-2.7.0/lib/jquery.raty.js');
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Споты', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kite-wrap-pages-all">
<div class="kite-wrap-pages">
<div class="kite-cont">
<div class="kite-block-foto-wrap">
<div id="kite-block-foto-wrap-bg"></div>
<div class="block-title-kites"><?= $model->name ?></div>
<div class="school-windrider">
<div class="school-windrider-left">
<div class="school-windrider-left-c">
<div id="google-map" style="width: 695px; height: 280px;"></div>
</div>
<div class="school-windrider-left-l">
<div class="school-windrider-left-contacts">
<table class="kite-contacts-phones-graph" cellspacing="0" cellpadding="0" border="0" style="margin-top: 65px;">
<tr id="adress-position">
<td id="adress-position2">
<table width="23" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td><img id="img-tb" src="/images/loc-ico.png"></td></tr></tbody></table>
</td>
<td>
<table width="187" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td><span style="font-size: 12px;"><?= $model->address?></span></td></tr></tbody></table>
</td>
</tr>
<?php foreach($phone as $one_phone):?>
<tr>
<td>
<table width="23" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td><img id="img-tb" src="/images/phone-ico.png"></td></tr></tbody></table>
</td>
<td>
<table width="187" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td><span id="table-phon"><?=$one_phone['value']?></span></td></tr></tbody></table>
</td>
</tr>
<?php endforeach;?>
</table>
<table class="tb-email-kites" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="25"><img src="/images/email.jpg"/></td>
<td width="180"><a href=""><?= $model->email?></a></td>
</tr>
</table>
</div>
</div>
<div class="school-windrider-left-r">
<?= $model->description?>
</div>
</div>
<div class="school-windrider-right">
<div class="school-windrider-right-bg"></div>
<ul>
<li>О школе windrider</li>
<li><a href="#blocks-1" class="ancLinks">Фото</a></li>
<li><a href="#blocks-2" class="ancLinks">Видео</a></li>
<li><a href="#blocks-3" class="ancLinks">Школы на споте</a></li>
<li><a href="#blocks-4" class="ancLinks">как добраться</a></li>
<li><a href="#blocks-5" class="ancLinks">Где поселиться</a></li>
</ul>
</div>
</div>
<div class="block-title-kites video">Фото</div>
<a id="blocks-1" class="links"></a>
<?=$this->render('_image_gallery', [
'model'=>$model
]);?>
<div class="block-title-kites video">ВИдео</div>
<a id="blocks-2" class="links"></a>
<div class="kites-video-wr-all">
<div class="kites-video-wr">
<?php foreach($video as $one_video):?>
<div class="kites-video"><iframe width="450" height="250" src="<?=$one_video['value']?>" frameborder="0" allowfullscreen></iframe></div>
<?php endforeach;?>
</div>
</div>
<div class="block-title-kites video">Школы на споте</div>
<a id="blocks-3" class="links"></a>
<div class="block-school-spots">
<div class="block-school-spots-wrap">
<?php
echo \yii\widgets\ListView::widget( [
'dataProvider' => $schools,
'itemView'=>'@app/views/schools/_one_school',
'summary'=>'',
] );
?>
</div>
</div>
<div class="block-title-kites video">Как добраться</div>
<a id="blocks-4" class="links"></a>
<div class="kites-education">
<?= $model->how_to_get?>
</div>
<div class="block-title-kites video">Где поселиться</div>
<a id="blocks-5" class="links"></a>
<div class="kites-price-table">
<table cellpadding="0" class="kites-price-tb tb-two" cellspacing="0" border="0" width="920">
<?php foreach($hotels as $hotel):?>
<tr>
<td data-score="<?= $hotel->rating ?>" class="stars_block" style="padding-left: 10px;"></td>
<td style="color: #329cda; font-size: 16px; "><?= $hotel->name ?></td>
<td style="color: #555555; font-size: 13px;"><?= $hotel->address ?></td>
<td style="color: #555555; font-size: 13px;"><span style="font-size: 15px; font-weight: bold;"><?= $hotel->price ?></span></td>
<td align="right" style="padding-right:10px;">
<div style="color: #fff; font-size: 11px; width:97px; height: 24px; background: url('/images/arr-where.png'); text-align: center; line-height: 26px;"><?= $hotel->distance ?></div>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<div class="block-title-kites-prgnz">
<div id="title">Прогноз</div>
<div id="clear"></div>
</div>
<a id="blocks-6" class="links"></a>
<div>
<?=$this->render('_forecast', [
'model'=>$model
]);?>
</div>
</div>
<div class="kite-margin-block"></div>
</div>
</div>
</div>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
function map_initialize( map_element_id )
{
var mapLat = <?= $model->coordinates_x?>;
var mapLng = <?= $model->coordinates_y?>;
var image = '/images/icon_map.png';
var latlng = new google.maps.LatLng(mapLat,mapLng);
var myOptions = {
zoom: 10,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
scrollwheel: false
};
var map = new google.maps.Map(document.getElementById( map_element_id ),myOptions);
var marker = new google.maps.Marker({
position: latlng,
map: map,
icon: image
});
var contentString = '';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
window.onload = function()
{
if( document.getElementById('google-map') )
{
map_initialize( 'google-map' );
}
};
$(function () {
$('#demo5').scrollbox({
direction: 'h',
distance: 150,
autoPlay: false
});
$('#prew').click(function () {
$('#demo5').trigger('backward');
});
$('#next').click(function () {
$('#demo5').trigger('forward');
});
$('.stars_block').raty({ readOnly: true,
starOff : '/images/star-off.png',
starOn : '/images/star-on.png',
score: function() {
return $(this).attr('data-score');
}});
});
</script>