fbdb1f1c
Yarik
test
|
1
2
|
<?php
|
35b03e57
Administrator
add yii jquery
|
3
4
5
|
use common\models\Vacancy;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
|
fbdb1f1c
Yarik
test
|
6
|
use \yii\helpers\Html;
|
35b03e57
Administrator
add yii jquery
|
7
8
9
10
11
|
use yii\helpers\Url;
use yii\jui\SliderInput;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
use yii\widgets\LinkSorter;
|
eb7e82fb
Administrator
29.02.16
|
12
|
use yii\widgets\ListView;
|
fbdb1f1c
Yarik
test
|
13
14
15
|
/* @var $this yii\web\View */
|
35b03e57
Administrator
add yii jquery
|
16
17
18
19
20
|
$sort_array = $dataProvider->sort->getAttributeOrders();
$active_key = array_keys($sort_array)[0];
$active_value = $sort_array[$active_key];
$sort_name = (($active_value == 4)?'-':'').$active_key;
|
26e94ae5
Administrator
add yii jquery
|
21
22
|
|
fbdb1f1c
Yarik
test
|
23
24
25
26
27
28
29
30
|
$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">
|
35b03e57
Administrator
add yii jquery
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?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; }'),
],
]); ?>
|
fbdb1f1c
Yarik
test
|
52
|
|
fbdb1f1c
Yarik
test
|
53
|
|
35b03e57
Administrator
add yii jquery
|
54
55
56
57
|
<?=
$form->field($model, 'specialization')
->dropDownList($specialization, ['prompt' => 'Любая']);
?>
|
fbdb1f1c
Yarik
test
|
58
|
|
fbdb1f1c
Yarik
test
|
59
|
|
35b03e57
Administrator
add yii jquery
|
60
61
62
63
|
<?=
$form->field($model, 'type')
->dropDownList(['1'=>'Частное лицо','2'=>'Компания'], ['prompt' => 'Любой']);
?>
|
fbdb1f1c
Yarik
test
|
64
|
|
35b03e57
Administrator
add yii jquery
|
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
|
<?=
$form->field ($model, 'working_conditions')
->checkboxList (
[
'guarantee' => 'С гарантией',
'contract' => 'С договором',
'estimate' => 'Со сметой',
'prepayment' => 'Без предоплаты'
],
[
'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 class="blocks-check-list-wrapp">
<div id="slider-value"></div>
<?php
echo $form->field($model, 'rating', [
'template' => "{label}<br><div id='{$form->id}-rating'>{$model->rating}</div><br>{input}\n{hint}\n{error}",
'labelOptions' => [
'class' => 'blocks-check-title',
],
])
->widget(SliderInput::className(), [
'clientOptions' => [
'min' => 0,
'max' => 5,
'step' => 0.5,
],
'clientEvents' => [
'slide' => "function( event, ui ) {
$( '#{$form->id}-rating' ).text(ui.value);
$('input[name=\"{$model->formName()}[rating]\"]').val(ui.value);
}",
],
]);
?>
</div>
<?=
$form->field($model, 'online', [
'options' => [
'class' => 'blocks-check-list-wrapp',
],
'template' => "<div class='blocks-check-title'>{label}</div>\n{input}\n{hint}\n{error}",
])
->radioList([
'' => 'Все',
1 => 'Онлайн',
], [
'item' => function($index, $label, $name, $checked, $value) use ($model) {
return "<div class='blocks-check-list'><input type='radio' id='{$model->formName()}-{$index}' name='{$name}' class='check-search' value='{$value}' " . ($checked?'checked':'') . "><label for='{$model->formName()}-{$index}'><span></span>{$label}</label></div>";
},
'unselect' => NULL,
]);
?>
<?=
$form->field ($model, 'additional_parameters')
->checkboxList (
[
'with_portfolio' => 'Только с портфолио',
'with_comments' => 'Только с отзывами',
'only_free' => 'Только свободные',
],
[
'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="theme2-'.$index.'">';
$return .= '<label for="theme2-'.$index.'"><span></span>'.$label.'</label>';
$return .= '</div>';
return $return;
}
]
);
?>
<div class="blocks-check-list-submit">
<?= Html::submitInput('Найти') ?>
</div>
<?php
$form->end();
?>
|
fbdb1f1c
Yarik
test
|
163
164
165
|
</div>
<div class="right-search-work">
<div class="search-worker-title style">Найти исполнителя</div>
|
35b03e57
Administrator
add yii jquery
|
166
|
<div class="search-worker-title-two style">Проектанты готовые приступить к работе <span><?= $dataProvider->totalCount ?></span></div>
|
fbdb1f1c
Yarik
test
|
167
|
<div class="search-worker-search-wr style">
|
35b03e57
Administrator
add yii jquery
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
<?php
$form2 = ActiveForm::begin(['method' => 'get', 'action' => [''], 'options' => ['class' => 'search-worker-form']]);
?>
<?= $form2->field($model, 'search', ['options' => ['tag' => 'span']])->label(false)->textInput(['placeholder' => $model->getAttributeLabel('search')]);?>
<?= Html::submitInput('Найти');?>
<?php
$form2->end();
?>
<?= Html::a('Добавить себя в каталог',Url::toRoute('accounts/service'),['class'=>'add-to-catalog-search-worker'])?>
|
fbdb1f1c
Yarik
test
|
183
184
185
186
|
<div class="search-worker-sort-wr style">
<div class="search-worker-sort">Сортировать: </div>
<ul>
<li class="activejob">
|
35b03e57
Administrator
add yii jquery
|
187
|
<a href="#" data-sort-name="<?=$sort_name?>"></a>
|
fbdb1f1c
Yarik
test
|
188
|
<div class="sidebar-droped-wr style">
|
35b03e57
Administrator
add yii jquery
|
189
190
191
192
193
|
<?php
echo LinkSorter::widget([
'sort' => $dataProvider->sort,
]);
?>
|
fbdb1f1c
Yarik
test
|
194
195
196
197
198
199
200
|
</div>
</li>
</ul>
</div>
</div>
<div class="search-worker-blocks-wr style">
|
fbdb1f1c
Yarik
test
|
201
|
|
eb7e82fb
Administrator
29.02.16
|
202
|
<?=
|
35b03e57
Administrator
add yii jquery
|
203
|
|
eb7e82fb
Administrator
29.02.16
|
204
|
ListView::widget( [
|
35b03e57
Administrator
add yii jquery
|
205
|
'dataProvider' => $dataProvider,
|
eb7e82fb
Administrator
29.02.16
|
206
207
208
209
|
'itemView'=>'_performer_list_view',
'layout' => "{items}\n<div class='navi-buttons-wr style'>{pager}</div>"
] );
?>
|
fbdb1f1c
Yarik
test
|
210
|
|
fbdb1f1c
Yarik
test
|
211
|
|
fbdb1f1c
Yarik
test
|
212
|
|
fbdb1f1c
Yarik
test
|
213
214
|
</div>
|
fbdb1f1c
Yarik
test
|
215
216
217
218
219
220
|
</div>
</div>
</div>
</div>
</div>
|