vacancy.php
7.94 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
<?php
use common\models\Specialization;
use kartik\select2\Select2;
use \yii\helpers\Html;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
use yii\widgets\LinkPager;
use yii\widgets\ListView;
/* @var $this yii\web\View */
$this->title = 'Proektant.net';
?>
<div class="section-box content">
<div class="section-box-15">
<div class="box-wr">
<div class="box-all">
<div class="performer-vacancy-sidebar-left-wr vacancy-general-sidebar-wr">
<div class="left-search-work">
<?php
$form = ActiveForm::begin([
'options' => [ 'class' => 'search-work-form' ],
'action' => [ '' ],
'method' => 'get',
]);
?>
<?= $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; }'),
],
]); ?>
<?php
// New specialization chooser
?>
<div class="input-blocks-wrapper admin-menu-list">
<div class="input-blocks" style="width: 100%; margin-bottom: 5px">
<label>Специализации</label>
<div class="required"></div>
</div>
<div class="new-spec-block style">
<ul class="content-menu-first">
<?php foreach($specializations as $specialization): ?>
<li data-img="<?= $specialization->image ?>">
<span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a>
<ul>
<?php foreach($specialization->children as $child_first): ?>
<?php if($child_first instanceof Specialization): ?>
<li>
<a href="#"><?= $child_first->specialization_name ?></a>
<ul>
<?php foreach($child_first->children as $child_second): ?>
<?php if($child_first instanceof Specialization): ?>
<li>
<a href="#" title="<?= $child_second->specialization_name ?>">
<?= $form->field($model, "specialization[{$child_second->specialization_id}]", [
'template' => '{input}{label}{hint}{error}',
])
->label('<span></span>' . $child_second->specialization_name)
->checkbox([
'value' => $child_second->specialization_id,
'label' => NULL,
'uncheck' => NULL,
'class' => 'custom-check',
], false) ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="style admn-menu-err">
<div class="help-block">Необходимо выбрать хотя бы одну «специализацию».</div>
</div>
</div>
<div class="admin-specialization-selected style">
<ul></ul>
</div>
<?php
// End of new specialization chooser
?>
<?php
/*
$form->field($model, 'specialization')
->dropDownList($specialization, ['prompt' => 'Любая']);
*/
?>
<div class="blocks-check-list-submit">
<?= Html::submitInput('Найти') ?>
</div>
<?php
$form->end();
?>
</div>
</div>
<div class="section-box performer-vacancy-vacant-wr">
<div class="performer-vacancy-vacant-title style">Вакансии</div>
<div class="performer-vacancy-vacant-title-reclam-wr style">
<?= ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_vacancy_list_view',
'summary' => false,
]); ?>
</div>
<div class="navi-buttons-wr style">
<?= LinkPager::widget([
'pagination' => $pagination,
]) ?>
</div>
</div>
</div>
</div>
</div>
</div>