eb7e82fb
Administrator
29.02.16
|
1
|
<?php
|
baba04c2
Yarik
test
|
2
3
4
5
|
/**
* @var string $content
* @var View $this
*/
|
eb7e82fb
Administrator
29.02.16
|
6
|
|
baba04c2
Yarik
test
|
7
|
use common\models\User;
|
0eb4e7fc
Yarik
test
|
8
|
use kartik\rating\StarRating;
|
baba04c2
Yarik
test
|
9
10
11
12
13
|
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\web\View;
use yii\widgets\Menu;
|
eb7e82fb
Administrator
29.02.16
|
14
|
|
baba04c2
Yarik
test
|
15
16
|
\frontend\assets\AppAsset::register($this);
$this->beginContent('@app/views/layouts/main.php');
|
eb7e82fb
Administrator
29.02.16
|
17
18
|
?>
<div class="section-box content">
|
baba04c2
Yarik
test
|
19
|
<div class="section-box-16" style="background: url('<?= $this->params[ 'user' ]->userInfo->poster; ?>') 50% no-repeat">
|
eb7e82fb
Administrator
29.02.16
|
20
21
22
|
<div class="box-wr">
<div class="box-all">
<div class="blog-buttons-wr style">
|
32ed90fd
Yarik
test
|
23
|
<?php
|
76f36646
Yarik
test
|
24
25
|
if($this->params[ 'user' ]->id != \Yii::$app->user->getId()) {
// Offer project button
|
3735dff7
Yarik
test
|
26
|
if(empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] != 'customer') {
|
b9a54f61
Yarik
test
|
27
|
echo Html::a(Yii::t('app', 'Offer project'), [ '#' ], [
|
76f36646
Yarik
test
|
28
29
|
'class' => 'blog-buttons-offer',
'data-performer-id' => $this->params[ 'user' ]->id,
|
32ed90fd
Yarik
test
|
30
31
|
]);
}
|
76f36646
Yarik
test
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// Write message
echo Html::a('Написать сообщение', Url::toRoute([
'chat/message',
'user_id' => $this->params[ 'user' ]->id,
]), [ 'class' => 'blog-buttons-write' ]);
// Bookmarks
if(!empty( \Yii::$app->user->identity )) {
if($this->params[ 'user' ]->isBookmarked) {
echo Html::a('Убрать из закладок', [ '#' ], [
'class' => 'get-list artbox_bookmark_remove_performer',
'data-id' => $this->params[ 'user' ]->id,
]);
} else {
echo Html::a('Добавить в закладки', [ '#' ], [
'class' => 'get-list artbox_bookmark_add_performer',
'data-id' => $this->params[ 'user' ]->id,
]);
}
}
|
32ed90fd
Yarik
test
|
51
52
|
}
?>
|
eb7e82fb
Administrator
29.02.16
|
53
54
55
56
57
58
59
60
61
|
</div>
</div>
</div>
</div>
<div class="section-box menu-content-wr">
<div class="box-wr">
<div class="box-all">
<?php
echo Menu::widget([
|
38a6e1dd
Yarik
test
|
62
|
'options' => [
|
eb7e82fb
Administrator
29.02.16
|
63
64
65
|
'class' => 'menu-content',
],
'activeCssClass' => 'active-menu-content',
|
38a6e1dd
Yarik
test
|
66
|
'items' => [
|
eb7e82fb
Administrator
29.02.16
|
67
68
|
[
'label' => 'Общее',
|
baba04c2
Yarik
test
|
69
70
71
|
'url' => [
'performer/common',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
72
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
73
|
],
|
eb7e82fb
Administrator
29.02.16
|
74
75
|
],
[
|
76f36646
Yarik
test
|
76
77
|
'label' => 'Портфолио',
'url' => [
|
baba04c2
Yarik
test
|
78
79
|
'performer/portfolio',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
80
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
81
|
],
|
76f36646
Yarik
test
|
82
|
'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false,
|
cefc2aa6
Yarik
test
|
83
|
'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false,
|
eb7e82fb
Administrator
29.02.16
|
84
85
|
],
[
|
76f36646
Yarik
test
|
86
87
|
'label' => 'Заказанные работы',
'url' => [
|
b4142e17
Yarik
test
|
88
89
|
'performer/projects',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
90
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
b4142e17
Yarik
test
|
91
|
],
|
76f36646
Yarik
test
|
92
|
'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false,
|
cefc2aa6
Yarik
test
|
93
|
'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false,
|
b4142e17
Yarik
test
|
94
95
|
],
[
|
eb7e82fb
Administrator
29.02.16
|
96
|
'label' => 'Блог',
|
baba04c2
Yarik
test
|
97
98
99
|
'url' => [
'performer/blog-list',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
100
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
101
|
],
|
cefc2aa6
Yarik
test
|
102
|
'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false,
|
eb7e82fb
Administrator
29.02.16
|
103
104
|
],
[
|
76f36646
Yarik
test
|
105
|
'label' => 'Мнения',
|
baba04c2
Yarik
test
|
106
107
108
|
'url' => [
'performer/review',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
109
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
110
|
],
|
eb7e82fb
Administrator
29.02.16
|
111
112
113
|
],
[
'label' => 'Места работы',
|
baba04c2
Yarik
test
|
114
115
116
|
'url' => [
'performer/workplace',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
117
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
118
|
],
|
eb7e82fb
Administrator
29.02.16
|
119
120
121
|
],
[
'label' => 'Галерея',
|
baba04c2
Yarik
test
|
122
123
124
|
'url' => [
'performer/gallery',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
125
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
126
|
],
|
eb7e82fb
Administrator
29.02.16
|
127
128
129
130
131
132
133
134
135
136
137
138
139
|
],
],
]);
?>
</div>
</div>
</div>
<div class="section-box-15 section-box-17">
<div class="box-wr">
<div class="box-all">
<div class="performer-vacancy-sidebar-left-wr">
<div class="performer-vacancy-sidebar-left">
<div class="performance-vacancy-sidebar-company-wr">
|
38a6e1dd
Yarik
test
|
140
|
<div class="performance-vacancy-sidebar-company-title style"><?= $this->params[ 'user' ]->name ?></div>
|
eb7e82fb
Administrator
29.02.16
|
141
142
143
|
<div class="performance-vacancy-sidebar-company-job style">
<ul>
<li class="activejob">
|
76f36646
Yarik
test
|
144
|
<?php
|
272ce289
Yarik
test
|
145
|
if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) {
|
4f7ef4a2
Yarik
test
|
146
|
if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') {
|
272ce289
Yarik
test
|
147
148
149
150
|
echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]);
} else {
echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]);
}
|
76f36646
Yarik
test
|
151
|
} else {
|
272ce289
Yarik
test
|
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
|
if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') {
echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ]));
} elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') {
echo Html::a('Заказчик', Url::current([ 'type' => NULL ]));
} else {
echo Html::a('Исполнитель', Url::current([ 'type' => NULL ]));
}
?>
<div class="sidebar-droped-wr style">
<ul>
<li>
<?php
if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') {
echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ]));
} elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') {
echo Html::a('Исполнитель', Url::current([ 'type' => NULL ]));
} else {
echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ]));
}
?>
</li>
<li style="display: none">
<?php
if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') {
echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ]));
} elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') {
echo Html::a('Заказчик', Url::current([ 'type' => NULL ]));
} else {
echo Html::a('Исполнитель', Url::current([ 'type' => NULL ]));
}
?>
</ul>
</div>
<?php
|
76f36646
Yarik
test
|
186
187
|
}
?>
|
eb7e82fb
Administrator
29.02.16
|
188
189
190
191
|
</li>
</ul>
</div>
<div class="performance-vacancy-sidebar-stars style">
|
0eb4e7fc
Yarik
test
|
192
193
|
<?php
echo StarRating::widget([
|
93a7a3c1
Yarik
test
|
194
195
196
197
198
199
200
201
202
|
'name' => 'rating_company',
'value' => $this->params[ 'user' ]->userInfo->rating,
'pluginOptions' => [
'displayOnly' => true,
'size' => 'xxs',
'min' => 0,
'max' => 10,
'stars' => 10,
],
|
0eb4e7fc
Yarik
test
|
203
204
|
]);
?>
|
eb7e82fb
Administrator
29.02.16
|
205
|
</div>
|
76f36646
Yarik
test
|
206
207
208
209
210
211
212
213
214
215
|
<div class="performance-vacancy-sidebar-comm style"><?= count($this->params[ 'user' ]->comments) ?> мнений</div>
<?php
if($this->params[ 'user' ]->id != \Yii::$app->user->getId()) {
echo Html::a('написать мнение', [
'performer/review',
'performer_id' => $this->params[ 'user' ]->id,
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
], [ 'class' => 'performance-vacancy-sidebar-write style' ]);
}
?>
|
eb7e82fb
Administrator
29.02.16
|
216
217
|
</div>
<div class="performer-vacancy-sidebar-img style">
|
baba04c2
Yarik
test
|
218
|
<?= Html::img($this->params[ 'user' ]->userInfo->image); ?>
|
eb7e82fb
Administrator
29.02.16
|
219
220
|
</div>
<div class="performer-vacancy-sidebar-all style">
|
38a6e1dd
Yarik
test
|
221
222
223
|
<?= $this->render('/patrial/social_list', [
'params' => $this->params,
]) ?>
|
eb7e82fb
Administrator
29.02.16
|
224
225
|
<div class="performer-vacancy-sidebar-views style">
<ul class="style">
|
baba04c2
Yarik
test
|
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
<li><img src="/images/sidebar-ico/ico-1.png" alt=""/>
<div class="sidebarvievstxt"><?= $this->params[ 'user' ]->userInfo->view_count ?> просмотра</div>
</li>
<li><img src="/images/sidebar-ico/ico-9.png" alt=""/>
<div class="sidebarvievstxt">
<span class="sidebar-views-txt">Статус: </span><?= $this->params[ 'user' ]->userInfo->busyText ?>
</div>
</li>
<li><img src="/images/sidebar-ico/ico-2.png" alt=""/>
<div class="sidebarvievstxt">
<span class="sidebar-views-txt">На сайте: </span><?= $this->params[ 'user' ]->liveTime ?>
</div>
</li>
<li><img src="/images/sidebar-ico/ico-3.png" alt=""/>
<div class="sidebarvievstxt">
|
76f36646
Yarik
test
|
241
242
243
244
245
246
247
248
|
<span class="sidebar-views-txt">Последний визит:<br/></span>
<?php
if($this->params[ 'user' ]->isOnline) {
echo 'Онлайн';
} else {
echo $this->params[ 'user' ]->userInfo->lastVisitCabinet;
}
?>
|
baba04c2
Yarik
test
|
249
250
|
</div>
</li>
|
76f36646
Yarik
test
|
251
252
|
<li>
<img src="/images/sidebar-ico/ico-10.png" alt=""/>
|
baba04c2
Yarik
test
|
253
|
<div class="sidebarvievstxt">
|
76f36646
Yarik
test
|
254
255
256
257
258
259
260
261
|
<span class="sidebar-views-txt">Трудовой стаж:<br/></span>
<?php
if(!empty( $this->params[ 'user' ]->userInfo->experience )) {
echo 'С ' . $this->params[ 'user' ]->userInfo->experience . ' года';
} else {
echo 'Не указано';
}
?>
|
baba04c2
Yarik
test
|
262
263
|
</div>
</li>
|
76f36646
Yarik
test
|
264
265
266
267
268
269
270
271
272
273
274
275
276
|
<?php
// Predefined in DB variable rank will be used further
if(!empty( $this->params[ 'user' ]->userInfo->member )) {
?>
<li>
<img src="/images/sidebar-ico/ico-11.png" alt=""/>
<div class="sidebarvievstxt">
<span class="sidebar-views-txt">Звание в МФП:<br/></span><?= \Yii::$app->formatter->asBoolean($this->params[ 'user' ]->userInfo->member) ?>
</div>
</li>
<?php
}
?>
|
38a6e1dd
Yarik
test
|
277
|
<li><img src="/images/sidebar-ico/ico_money.png" alt=""/>
|
baba04c2
Yarik
test
|
278
|
<div class="sidebarvievstxt">
|
38a6e1dd
Yarik
test
|
279
|
<span class="sidebar-views-txt">Стоимость работ:<br/></span>
|
76f36646
Yarik
test
|
280
281
|
<?php
if(!empty( $this->params[ 'user' ]->userInfo->salary )) {
|
93a7a3c1
Yarik
test
|
282
|
echo 'от ' . $this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label . ' за час';
|
76f36646
Yarik
test
|
283
284
285
286
|
} else {
echo 'Не указано';
}
?>
|
baba04c2
Yarik
test
|
287
288
|
</div>
</li>
|
76f36646
Yarik
test
|
289
290
291
292
293
294
295
296
297
298
299
300
|
<?php
if(!empty( $this->params[ 'user' ]->payments )) {
?>
<li>
<img src="/images/sidebar-ico/ico-13.png" alt=""/>
<div class="sidebarvievstxt">
<?= implode(', ', ArrayHelper::getColumn($this->params[ 'user' ]->payments, 'name')) ?>
</div>
</li>
<?php
}
?>
|
4b85f536
Yarik
test
|
301
302
303
304
305
306
307
308
309
310
311
312
|
<?php
if(!empty( $this->params[ 'user' ]->currentJob )) {
?>
<li>
<img src="/images/sidebar-ico/ico-14.png" alt=""/>
<div class="sidebarvievstxt">
<span class="sidebar-views-txt">Текущее место работы:<br/></span><?= $this->params[ 'user' ]->currentJob->name ?>
</div>
</li>
<?php
}
?>
|
eb7e82fb
Administrator
29.02.16
|
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
</ul>
</div>
</div>
</div>
</div>
<div class="section-box performer-vacancy-vacant-wr">
<?= $content ?>
</div>
</div>
</div>
</div>
</div>
<script>
|
baba04c2
Yarik
test
|
328
329
|
$('div.rating').rating(
{
|
93a7a3c1
Yarik
test
|
330
331
332
|
fx : 'full',
readOnly : 'true',
url : 'rating.php'
|
baba04c2
Yarik
test
|
333
334
|
}
);
|
eb7e82fb
Administrator
29.02.16
|
335
336
|
</script>
|
97fb6489
Yarik
test
|
337
|
<?php $this->endContent() ?>
|