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,
|
c20d5820
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,
|
c20d5820
Yarik
test
|
93
|
'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false,
|
b4142e17
Yarik
test
|
94
95
|
],
[
|
c20d5820
Yarik
test
|
96
97
|
'label' => 'Блог',
'url' => [
|
baba04c2
Yarik
test
|
98
99
|
'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
|
],
|
c20d5820
Yarik
test
|
102
|
'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false,
|
cefc2aa6
Yarik
test
|
103
|
'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false,
|
eb7e82fb
Administrator
29.02.16
|
104
105
|
],
[
|
76f36646
Yarik
test
|
106
|
'label' => 'Мнения',
|
baba04c2
Yarik
test
|
107
108
109
|
'url' => [
'performer/review',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
110
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
111
|
],
|
eb7e82fb
Administrator
29.02.16
|
112
113
114
|
],
[
'label' => 'Места работы',
|
baba04c2
Yarik
test
|
115
116
117
|
'url' => [
'performer/workplace',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
118
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
119
|
],
|
c20d5820
Yarik
test
|
120
|
'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false,
|
eb7e82fb
Administrator
29.02.16
|
121
122
123
|
],
[
'label' => 'Галерея',
|
baba04c2
Yarik
test
|
124
125
126
|
'url' => [
'performer/gallery',
'performer_id' => $this->params[ 'user' ]->id,
|
76f36646
Yarik
test
|
127
|
'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
|
baba04c2
Yarik
test
|
128
|
],
|
c20d5820
Yarik
test
|
129
|
'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false,
|
eb7e82fb
Administrator
29.02.16
|
130
131
132
133
134
135
136
137
138
139
140
141
142
|
],
],
]);
?>
</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
|
143
|
<div class="performance-vacancy-sidebar-company-title style"><?= $this->params[ 'user' ]->name ?></div>
|
eb7e82fb
Administrator
29.02.16
|
144
145
146
|
<div class="performance-vacancy-sidebar-company-job style">
<ul>
<li class="activejob">
|
76f36646
Yarik
test
|
147
|
<?php
|
272ce289
Yarik
test
|
148
|
if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) {
|
c20d5820
Yarik
test
|
149
|
if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') {
|
272ce289
Yarik
test
|
150
151
152
153
|
echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]);
} else {
echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]);
}
|
76f36646
Yarik
test
|
154
|
} else {
|
272ce289
Yarik
test
|
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
|
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
|
189
190
|
}
?>
|
eb7e82fb
Administrator
29.02.16
|
191
192
193
194
|
</li>
</ul>
</div>
<div class="performance-vacancy-sidebar-stars style">
|
0eb4e7fc
Yarik
test
|
195
196
|
<?php
echo StarRating::widget([
|
93a7a3c1
Yarik
test
|
197
198
199
200
201
202
203
204
205
|
'name' => 'rating_company',
'value' => $this->params[ 'user' ]->userInfo->rating,
'pluginOptions' => [
'displayOnly' => true,
'size' => 'xxs',
'min' => 0,
'max' => 10,
'stars' => 10,
],
|
0eb4e7fc
Yarik
test
|
206
207
|
]);
?>
|
eb7e82fb
Administrator
29.02.16
|
208
|
</div>
|
76f36646
Yarik
test
|
209
210
211
212
213
214
215
216
217
218
|
<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
|
219
220
|
</div>
<div class="performer-vacancy-sidebar-img style">
|
baba04c2
Yarik
test
|
221
|
<?= Html::img($this->params[ 'user' ]->userInfo->image); ?>
|
eb7e82fb
Administrator
29.02.16
|
222
223
|
</div>
<div class="performer-vacancy-sidebar-all style">
|
38a6e1dd
Yarik
test
|
224
225
226
|
<?= $this->render('/patrial/social_list', [
'params' => $this->params,
]) ?>
|
eb7e82fb
Administrator
29.02.16
|
227
228
|
<div class="performer-vacancy-sidebar-views style">
<ul class="style">
|
baba04c2
Yarik
test
|
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
<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
|
244
245
246
247
248
249
250
251
|
<span class="sidebar-views-txt">Последний визит:<br/></span>
<?php
if($this->params[ 'user' ]->isOnline) {
echo 'Онлайн';
} else {
echo $this->params[ 'user' ]->userInfo->lastVisitCabinet;
}
?>
|
baba04c2
Yarik
test
|
252
253
|
</div>
</li>
|
c20d5820
Yarik
test
|
254
255
|
<?php
if(!empty( $this->params[ 'user' ]->userInfo->experience )) {
|
76f36646
Yarik
test
|
256
|
?>
|
c20d5820
Yarik
test
|
257
258
259
260
261
262
263
264
265
266
267
268
|
<li>
<img src="/images/sidebar-ico/ico-10.png" alt=""/>
<div class="sidebarvievstxt">
<span class="sidebar-views-txt">Трудовой стаж:<br/></span>
<?php
echo 'С ' . $this->params[ 'user' ]->userInfo->experience . ' года';
?>
</div>
</li>
<?php
}
?>
|
76f36646
Yarik
test
|
269
270
271
272
273
274
275
276
277
278
279
280
281
|
<?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
|
282
|
<li><img src="/images/sidebar-ico/ico_money.png" alt=""/>
|
baba04c2
Yarik
test
|
283
|
<div class="sidebarvievstxt">
|
38a6e1dd
Yarik
test
|
284
|
<span class="sidebar-views-txt">Стоимость работ:<br/></span>
|
76f36646
Yarik
test
|
285
286
|
<?php
if(!empty( $this->params[ 'user' ]->userInfo->salary )) {
|
93a7a3c1
Yarik
test
|
287
|
echo 'от ' . $this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label . ' за час';
|
76f36646
Yarik
test
|
288
289
290
291
|
} else {
echo 'Не указано';
}
?>
|
baba04c2
Yarik
test
|
292
293
|
</div>
</li>
|
76f36646
Yarik
test
|
294
295
296
297
298
299
300
301
302
303
304
305
|
<?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
|
306
307
308
309
310
311
312
313
314
315
316
317
|
<?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
|
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
</ul>
</div>
</div>
</div>
</div>
<div class="section-box performer-vacancy-vacant-wr">
<?= $content ?>
</div>
</div>
</div>
</div>
</div>
<script>
|
baba04c2
Yarik
test
|
333
334
|
$('div.rating').rating(
{
|
93a7a3c1
Yarik
test
|
335
336
337
|
fx : 'full',
readOnly : 'true',
url : 'rating.php'
|
baba04c2
Yarik
test
|
338
339
|
}
);
|
eb7e82fb
Administrator
29.02.16
|
340
341
|
</script>
|
97fb6489
Yarik
test
|
342
|
<?php $this->endContent() ?>
|