project.php
23.3 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<?php
/**
* @var View $this
* @var TenderSearch $model
* @var ActiveDataProvider $dataProvider
* @var array $specialization
* @var array $currencies
* @var array $payments
*/
use common\models\TenderSearch;
use kartik\select2\Select2;
use yii\data\ActiveDataProvider;
use \yii\helpers\Html;
use yii\web\JsExpression;
use yii\web\View;
use yii\widgets\ActiveForm;
use yii\widgets\ListView;
$this->title = 'My Yii Application';
?>
<div class="section-box content">
<div class="section-box-22">
<div class="box-wr">
<div class="box-all">
<div class="left-search-work">
<?php
$form = ActiveForm::begin([
'method' => 'get',
'options' => [ 'class' => 'search-work-form' ],
'action' => [ '' ],
]);
echo $form->field($model, 'info', [ 'options' => [ 'class' => 'info-search-input' ] ])
->label('Поиск')
->textInput([ 'class' => 'form-control',
'placeholder' => 'Текст для поиска',
]);
echo $form->field($model, 'specialization')
->dropDownList($specialization, [ 'prompt' => 'Любая' ]);
echo $form->field($model, 'city')
->widget(Select2::classname(), [
'options' => [ 'placeholder' => 'Выбор города ...' ],
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 3,
'ajax' => [
'url' => \yii\helpers\Url::to([ 'site/city' ]),
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {q:params.term}; }'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(city) { return city.text; }'),
'templateSelection' => new JsExpression('function (city) { return city.text; }'),
],
]);
?>
<div class="blocks-check-list-wrapp">
<div class="blocks-check-title">Бюджет</div>
<div class="form-price-wr">
<?= $form->field($model, 'budget_from', [
'template' => "{input}\n{error}",
'options' => [ 'tag' => 'span' ],
])
->textInput([ 'placeholder' => $model->getAttributeLabel('budget_from') ]) ?>
<?= $form->field($model, 'budget_to', [
'template' => "{input}\n{error}",
'options' => [ 'tag' => 'span' ],
])
->textInput([ 'placeholder' => $model->getAttributeLabel('budget_to') ]) ?>
<?= $form->field($model, 'budget_currency', [
'template' => "{input}\n{error}",
'options' => [ 'class' => 'blocks-check-list-wrapp check-valuta' ],
])
->dropDownList($currencies) ?>
</div>
<?= $form->field($model, 'contractual', [
'template' => "{input}\n{label}\n{hint}\n{error}",
'options' => [ 'class' => 'blocks-check-list' ],
])
->label("<span></span>{$model->getAttributeLabel('contractual')}", [ 'class' => '' ])
->checkbox([ ], false) ?>
<?= $form->field($model, 'payment', [ 'template' => "{input}\n{error}" ])
->checkboxList($payments, [
'item' => function($index, $label, $name, $checked, $value) {
$return = '<div class="blocks-check-list">';
$return .= '<input type="checkbox" ' . ( $checked ? "checked" : "" ) . ' name="' . $name . '" class="check-search" value="' . $value . '" id="theme-' . $index . '">';
$return .= '<label for="theme-' . $index . '"><span></span>' . $label . '</label>';
$return .= '</div>';
return $return;
},
]); ?>
</div>
<div class="blocks-check-list-submit">
<?php
echo Html::submitInput('Найти');
?>
</div>
<?php
$form->end();
?>
</div>
<div class="right-search-work">
<div class="search-worker-title style">Сейчас <?= $dataProvider->totalCount ?> предложений</div>
<div class="search-profile-blocks-wr style">
<?= ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_projects_list_view',
'layout' => "{items}\n<div class='navi-buttons-wr style navi-buttons-yet-wr'>{pager}</div>",
]); ?>
</div>
</div>
</div>
</div>
</div>
<div>
<?php
?>
<div class="section-box" style="height: 720px; overflow: hidden">
<div class="map-settings-opacity"></div>
<div class="map-settings-wrapp">
<div class="min_markers-wrapp">
<ul class="min_markers">
<li class="active_m"><span></span>
<p>Все</p></li>
<li><span><img src="/images/markers/marker-min-1.png"/></span>
<p>Жилые</p></li>
<li><span><img src="/images/markers/marker-min-2.png"/></span>
<p>Офисные</p></li>
<li><span><img src="/images/markers/marker-min-3.png"/></span>
<p>Торговые</p></li>
<li><span><img src="/images/markers/marker-min-4.png"/></span>
<p>Мосты</p></li>
<li><span><img src="/images/markers/marker-min-5.png"/></span>
<p>Дороги</p></li>
<li><span><img src="/images/markers/marker-min-6.png"/></span>
<p>Сооружения</p></li>
<li><span><img src="/images/markers/marker-min-7.png"/></span>
<p>Склады</p></li>
<li><span><img src="/images/markers/marker-min-8.png"/></span>
<p>Заводы</p></li>
<li><span><img src="/images/markers/marker-min-9.png"/></span>
<p>Разное</p></li>
</ul>
<ul class="min_markers_two">
<li><span><img src="/images/markers/marker-min-10.png"/></span>
<p><?= Yii::t('app', 'projects') ?></p></li>
<li><span><img src="/images/markers/marker-min-11.png"/></span>
<p>подряды</p></li>
</ul>
</div>
</div>
<div class="slider-map"></div>
<div id="map_cloud" style="display: none;">
<script type="text/javascript">
function initialize()
{
var start_position = new google.maps.LatLng('56', '30');
var settings = {
zoom : 7, // scrollwheel: false,
center : start_position,
mapTypeControl : false,
mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl : false,
navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL},
scaleControl : false,
streetViewControl : false,
rotateControl : false,
zoomControl : false,
mapTypeId : google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
var image1 = new google.maps.MarkerImage(
'/images/markers/marker-we-1.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image2 = new google.maps.MarkerImage(
'/images/markers/marker-we-2.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image3 = new google.maps.MarkerImage(
'/images/markers/marker-we-3.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image4 = new google.maps.MarkerImage(
'/images/markers/marker-we-4.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image5 = new google.maps.MarkerImage(
'/images/markers/marker-we-5.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image6 = new google.maps.MarkerImage(
'/images/markers/marker-we-6.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image7 = new google.maps.MarkerImage(
'/images/markers/marker-we-7.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image8 = new google.maps.MarkerImage(
'/images/markers/marker-we-8.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image9 = new google.maps.MarkerImage(
'/images/markers/marker-we-9.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image10 = new google.maps.MarkerImage(
'/images/markers/marker-empl-1.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image11 = new google.maps.MarkerImage(
'/images/markers/marker-empl-2.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image12 = new google.maps.MarkerImage(
'/images/markers/marker-empl-3.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image13 = new google.maps.MarkerImage(
'/images/markers/marker-empl-4.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image14 = new google.maps.MarkerImage(
'/images/markers/marker-empl-5.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image15 = new google.maps.MarkerImage(
'/images/markers/marker-empl-6.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image16 = new google.maps.MarkerImage(
'/images/markers/marker-empl-7.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image17 = new google.maps.MarkerImage(
'/images/markers/marker-empl-8.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var image18 = new google.maps.MarkerImage(
'/images/markers/marker-empl-9.png', new google.maps.Size(21, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 35)
);
var markers = [];
var marker = new google.maps.Marker(
{
position : new google.maps.LatLng('56', '35.3'),
map : map,
title : 'Marker Title2',
icon : image1
}
);
markers.push(marker);
var marker = new google.maps.Marker(
{
position : new google.maps.LatLng('56', '36'),
map : map,
title : 'Marker Title2',
icon : image2
}
);
markers.push(marker);
var marker = new google.maps.Marker(
{
position : new google.maps.LatLng('56', '34.5'),
map : map,
title : 'Marker Title3',
icon : image18
}
);
markers.push(marker);
var marker = new google.maps.Marker(
{
position : new google.maps.LatLng('56', '35'),
map : map,
title : 'Marker Title4',
icon : image13
}
);
markers.push(marker);
var clusterStyles = [
{
url : '/images/markers/clasters.png',
height : 36,
width : 36
}
];
markerClusterer = new MarkerClusterer(
map, markers, {
maxZoom : 10,
gridSize : 100,
styles : clusterStyles
}
);
//балун
var infowindow = new google.maps.InfoWindow(
{
content : '<div style="width: 112px;"><a href="#" style="text-decoration: none; color: #333"><img style="width: 112px; height: 60px" src="/images/infowindow_marker_slider.jpg" alt=""/><p style="width: 100%; text-align: center; font-family: Ubuntu Bold; font-size: 11px;">Трц “Дарница”</p></a></div>'
}
);
google.maps.event.addListener(
marker, 'click', function()
{
infowindow.open(map, this);
}
);
}
</script>
</div>
<div id="map_canvas" style="width: 100%; height:100%;"></div>
<?php
/* Решено убрать нижний слайдер
?>
<div class="slider_map-wr">
<div class="slider_map_overlay"></div>
<div class="slider_map">
<div id="demo5" class="scroll-img">
<ul>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="slider_a">
<div class="slider-marker-bl">
<div class="slider-marker-bl-img">
<img src="/images/marker_slider.jpg" alt=""/>
</div>
<div class="slider-marker-bl-text">
<div class="slider-marker-bl-text-title">ТЦ «Дарница»</div>
<div class="slider-marker-bl-text-p">Киев, Днепровский район, проспект Воссоединения, 2/1 Район Днепровский</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div id="demo5-btn" class="text-center">
<a id="demo5-backward"></a>
<a id="demo5-forward"></a>
</div>
</div>
</div>
<?php
*/
?>
</div>
</div>
</div>