Commit 2bb287cd81165f7ccffc5e21db0067a0e977ed2b
Merge remote-tracking branch 'origin/master'
Showing
13 changed files
with
720 additions
and
240 deletions
Show diff stats
1 | +<?php | |
2 | + | |
3 | + namespace common\models; | |
4 | + | |
5 | + use Yii; | |
6 | + use yii\base\Model; | |
7 | + use yii\data\ActiveDataProvider; | |
8 | + use common\models\User; | |
9 | + | |
10 | + /** | |
11 | + * CustomerSearch represents the model behind the search form about `common\models\UserInfo`. | |
12 | + */ | |
13 | + class CustomerSearch extends User | |
14 | + { | |
15 | + | |
16 | + public $type; | |
17 | + | |
18 | + public $rating; | |
19 | + | |
20 | + public $online; | |
21 | + | |
22 | + public $city; | |
23 | + | |
24 | + public $info; | |
25 | + | |
26 | + /** | |
27 | + * @inheritdoc | |
28 | + */ | |
29 | + public function rules() | |
30 | + { | |
31 | + return [ | |
32 | + [ | |
33 | + [ | |
34 | + 'type', | |
35 | + 'rating', | |
36 | + 'online', | |
37 | + ], | |
38 | + 'integer', | |
39 | + ], | |
40 | + [ | |
41 | + [ | |
42 | + 'city', | |
43 | + 'info', | |
44 | + ], | |
45 | + 'safe', | |
46 | + ], | |
47 | + ]; | |
48 | + } | |
49 | + | |
50 | + /** | |
51 | + * @inheritdoc | |
52 | + */ | |
53 | + public function attributeLabels() | |
54 | + { | |
55 | + return [ | |
56 | + 'type' => Yii::t('app', 'Тип заказчика'), | |
57 | + 'rating' => Yii::t('app', 'Рейтинг'), | |
58 | + 'online' => Yii::t('app', 'Статус'), | |
59 | + 'city' => Yii::t('app', 'Город'), | |
60 | + 'info' => Yii::t('app', 'Любая информация о заказчике'), | |
61 | + ]; | |
62 | + } | |
63 | + | |
64 | + /** | |
65 | + * @inheritdoc | |
66 | + */ | |
67 | + public function scenarios() | |
68 | + { | |
69 | + // bypass scenarios() implementation in the parent class | |
70 | + return Model::scenarios(); | |
71 | + } | |
72 | + | |
73 | + /** | |
74 | + * Creates data provider instance with search query applied | |
75 | + * | |
76 | + * @param array $params | |
77 | + * | |
78 | + * @return ActiveDataProvider | |
79 | + */ | |
80 | + public function search($params) | |
81 | + { | |
82 | + $query = User::find() | |
83 | + ->joinWith('userInfo') | |
84 | + ->joinWith('companyInfo'); | |
85 | + | |
86 | + $dataProvider = new ActiveDataProvider([ | |
87 | + 'query' => $query, | |
88 | + ]); | |
89 | + | |
90 | + $this->load($params); | |
91 | + | |
92 | + if(!$this->validate()) { | |
93 | + // uncomment the following line if you do not want to return any records when validation fails | |
94 | + // $query->where('0=1'); | |
95 | + return $dataProvider; | |
96 | + } | |
97 | + | |
98 | + $query->andWhere([ | |
99 | + 'is_customer' => 1, | |
100 | + ]); | |
101 | + | |
102 | + if($this->type == 2) { | |
103 | + $query->andWhere([ | |
104 | + 'not', | |
105 | + [ 'company_info.company_info_id' => NULL ], | |
106 | + ]); | |
107 | + | |
108 | + $query->andWhere([ | |
109 | + 'type' => 2, | |
110 | + ]); | |
111 | + } elseif($this->type == 1) { | |
112 | + $query->andWhere([ | |
113 | + 'type' => 1, | |
114 | + ]); | |
115 | + } | |
116 | + | |
117 | + if($this->online == 1) { | |
118 | + $query->andWhere([ | |
119 | + '>=', | |
120 | + 'user_info.date_visit', | |
121 | + date('Y-m-d H:i:s.u', time() - 1800), | |
122 | + ]); | |
123 | + } | |
124 | + | |
125 | + $query->andFilterWhere([ | |
126 | + 'like', | |
127 | + 'user_info.city', | |
128 | + $this->city, | |
129 | + ])->andFilterWhere([ | |
130 | + 'or', | |
131 | + [ | |
132 | + 'like', | |
133 | + 'LOWER(username)', | |
134 | + mb_strtolower($this->info), | |
135 | + ], | |
136 | + [ | |
137 | + 'like', | |
138 | + 'LOWER(lastname)', | |
139 | + mb_strtolower($this->info), | |
140 | + ], | |
141 | + [ | |
142 | + 'like', | |
143 | + 'LOWER(firstname)', | |
144 | + mb_strtolower($this->info), | |
145 | + ], | |
146 | + [ | |
147 | + 'like', | |
148 | + 'LOWER(middlename)', | |
149 | + mb_strtolower($this->info), | |
150 | + ], | |
151 | + [ | |
152 | + 'like', | |
153 | + 'LOWER(company_info.name)', | |
154 | + mb_strtolower($this->info), | |
155 | + ], | |
156 | + [ | |
157 | + 'like', | |
158 | + 'LOWER(company_info.street)', | |
159 | + mb_strtolower($this->info), | |
160 | + ], | |
161 | + [ | |
162 | + 'like', | |
163 | + 'LOWER(user_info.country)', | |
164 | + mb_strtolower($this->info), | |
165 | + ], | |
166 | + [ | |
167 | + 'like', | |
168 | + 'LOWER(user_info.city)', | |
169 | + mb_strtolower($this->info), | |
170 | + ], | |
171 | + [ | |
172 | + 'like', | |
173 | + 'LOWER(user_info.about)', | |
174 | + mb_strtolower($this->info), | |
175 | + ], | |
176 | + ]); | |
177 | + | |
178 | + return $dataProvider; | |
179 | + } | |
180 | + } | ... | ... |
common/models/User.php
1 | 1 | <?php |
2 | 2 | namespace common\models; |
3 | 3 | |
4 | + use common\modules\comment\models\Comment; | |
5 | + use common\modules\comment\models\Rating; | |
4 | 6 | use Yii; |
7 | + use yii\base\InvalidConfigException; | |
5 | 8 | use yii\base\NotSupportedException; |
6 | 9 | use yii\behaviors\TimestampBehavior; |
7 | 10 | use yii\db\ActiveQuery; |
... | ... | @@ -13,17 +16,18 @@ |
13 | 16 | |
14 | 17 | /** |
15 | 18 | * User model |
16 | - * @property integer $id | |
17 | - * @property string $username | |
18 | - * @property string $password_hash | |
19 | - * @property string $password_reset_token | |
20 | - * @property string $email | |
21 | - * @property string $auth_key | |
22 | - * @property integer $status | |
23 | - * @property integer $created_at | |
24 | - * @property integer $updated_at | |
25 | - * @property string $password write-only password | |
26 | - * @property string $type | |
19 | + * @property integer $id | |
20 | + * @property string $username | |
21 | + * @property string $password_hash | |
22 | + * @property string $password_reset_token | |
23 | + * @property string $email | |
24 | + * @property string $auth_key | |
25 | + * @property integer $status | |
26 | + * @property integer $created_at | |
27 | + * @property integer $updated_at | |
28 | + * @property string $password write-only password | |
29 | + * @property string $type | |
30 | + * @property UserInfo $userInfo | |
27 | 31 | */ |
28 | 32 | class User extends ActiveRecord implements IdentityInterface, UserRbacInterface |
29 | 33 | { |
... | ... | @@ -57,9 +61,6 @@ |
57 | 61 | ]; |
58 | 62 | } |
59 | 63 | |
60 | - | |
61 | - | |
62 | - | |
63 | 64 | /** |
64 | 65 | * @inheritdoc |
65 | 66 | */ |
... | ... | @@ -93,10 +94,15 @@ |
93 | 94 | [ |
94 | 95 | 'specializationInput', |
95 | 96 | 'paymentInput', |
96 | - 'type' | |
97 | + 'type', | |
97 | 98 | ], |
98 | 99 | 'safe', |
99 | 100 | ], |
101 | + [ | |
102 | + 'type', | |
103 | + 'default', | |
104 | + 'value' => 1, | |
105 | + ], | |
100 | 106 | ]; |
101 | 107 | } |
102 | 108 | |
... | ... | @@ -107,8 +113,8 @@ |
107 | 113 | { |
108 | 114 | return [ |
109 | 115 | 'firstname' => Yii::t('app', 'Имя'), |
110 | - 'lastname' => Yii::t('app', 'Фамилия'), | |
111 | - 'email' => Yii::t('app', 'Email'), | |
116 | + 'lastname' => Yii::t('app', 'Фамилия'), | |
117 | + 'email' => Yii::t('app', 'Email'), | |
112 | 118 | ]; |
113 | 119 | } |
114 | 120 | |
... | ... | @@ -343,7 +349,8 @@ |
343 | 349 | */ |
344 | 350 | public function getUserInfo() |
345 | 351 | { |
346 | - return $this->hasOne(UserInfo::className(), [ 'user_id' => 'id' ])->inverseOf('user'); | |
352 | + return $this->hasOne(UserInfo::className(), [ 'user_id' => 'id' ]) | |
353 | + ->inverseOf('user'); | |
347 | 354 | } |
348 | 355 | |
349 | 356 | /** |
... | ... | @@ -403,11 +410,11 @@ |
403 | 410 | $date1 = new \DateTime(date('Y-m-d H:i:s', $this->created_at)); |
404 | 411 | $result = explode(',', \Yii::$app->formatter->asDuration($date1->diff($now))); |
405 | 412 | |
406 | - if($result >= 4){ | |
413 | + if($result >= 4) { | |
407 | 414 | array_splice($result, 2); |
408 | 415 | } |
409 | 416 | |
410 | - return implode(',',$result); | |
417 | + return implode(',', $result); | |
411 | 418 | } |
412 | 419 | |
413 | 420 | /** |
... | ... | @@ -544,7 +551,8 @@ |
544 | 551 | */ |
545 | 552 | public function getVacancies() |
546 | 553 | { |
547 | - return $this->hasMany(Vacancy::className(), [ 'user_id' => 'id' ])->inverseOf('user'); | |
554 | + return $this->hasMany(Vacancy::className(), [ 'user_id' => 'id' ]) | |
555 | + ->inverseOf('user'); | |
548 | 556 | } |
549 | 557 | |
550 | 558 | public function getGalleries() |
... | ... | @@ -554,22 +562,44 @@ |
554 | 562 | |
555 | 563 | public function getOwner() |
556 | 564 | { |
557 | - if($this->type == 1){ | |
558 | - return $this->hasOne(UserInfo::className(), [ 'user_id' => 'id' ]); | |
559 | - } else if($this->type == 2) { | |
565 | + if($this->type == 2) { | |
560 | 566 | return $this->hasOne(CompanyInfo::className(), [ 'user_id' => 'id' ]); |
567 | + } else { | |
568 | + return $this->hasOne(UserInfo::className(), [ 'user_id' => 'id' ]); | |
561 | 569 | } |
562 | - | |
563 | 570 | } |
564 | 571 | |
565 | - public function getName(){ | |
566 | - if($this->type == 1){ | |
567 | - return $this->firstname. ' '.$this->lastname; | |
568 | - } else if($this->type == 2){ | |
572 | + public function getName() | |
573 | + { | |
574 | + if($this->type == 2) { | |
569 | 575 | return $this->companyInfo->name; |
576 | + } else { | |
577 | + return $this->firstname . ' ' . $this->lastname; | |
570 | 578 | } |
579 | + } | |
571 | 580 | |
581 | + public function getComments() | |
582 | + { | |
583 | + $entity = 'user-' . $this->id; | |
584 | + $comments = (new Comment())->getComments($entity); | |
585 | + return $comments; | |
572 | 586 | } |
573 | 587 | |
588 | + public function getRatingPG() | |
589 | + { | |
590 | + if(\Yii::$app->db->driverName != 'pgsql') { | |
591 | + throw new InvalidConfigException('This method is available only in PostgreSQL'); | |
592 | + } | |
593 | + $entity = 'user-' . $this->id; | |
594 | + $rating = (new Comment())->getComments($entity) | |
595 | + ->select('ROUND(SUM("rating"."value")/COUNT("rating"."rating_id")::float) as rating') | |
596 | + ->leftJoin(Rating::tableName(), "CONCAT('Comment-', \"comment\".\"comment_id\") = \"rating\".\"entity\"") | |
597 | + ->andWhere([ | |
598 | + 'not', | |
599 | + [ 'rating.value' => NULL ], | |
600 | + ]) | |
601 | + ->one(); | |
602 | + return $rating; | |
603 | + } | |
574 | 604 | |
575 | 605 | } | ... | ... |
common/modules/comment/models/Comment.php
1 | 1 | <?php |
2 | 2 | namespace common\modules\comment\models; |
3 | 3 | |
4 | + use yii\db\ActiveQuery; | |
5 | + | |
4 | 6 | /** |
5 | 7 | * Class Comment |
6 | 8 | * @property bool $guestComment |
... | ... | @@ -19,6 +21,8 @@ |
19 | 21 | const SCENARIO_USER = 'user'; |
20 | 22 | const SCENARIO_GUEST = 'guest'; |
21 | 23 | |
24 | + public $rating; | |
25 | + | |
22 | 26 | /** |
23 | 27 | * @var bool |
24 | 28 | */ |
... | ... | @@ -130,12 +134,17 @@ |
130 | 134 | $this->guestComment = $value; |
131 | 135 | } |
132 | 136 | |
137 | + /** | |
138 | + * @param string $entity | |
139 | + * | |
140 | + * @return ActiveQuery | |
141 | + */ | |
133 | 142 | public function getComments($entity) |
134 | 143 | { |
135 | 144 | return $this->find() |
136 | 145 | ->where([ |
137 | - 'entity' => $this->entity, | |
138 | - 'status' => 1, | |
146 | + 'comment.entity' => $entity, | |
147 | + 'comment.status' => 1, | |
139 | 148 | ]); |
140 | 149 | } |
141 | 150 | ... | ... |
frontend/controllers/SearchController.php
1 | 1 | <?php |
2 | 2 | namespace frontend\controllers; |
3 | 3 | |
4 | +use common\models\CustomerSearch; | |
4 | 5 | use common\models\Project; |
5 | 6 | use common\models\UserInfo; |
6 | 7 | use common\models\Vacancy; |
... | ... | @@ -68,7 +69,65 @@ class SearchController extends Controller |
68 | 69 | |
69 | 70 | |
70 | 71 | public function actionCustomer(){ |
72 | + $model = new CustomerSearch(); | |
73 | + $dataProvider = $model->search(Yii::$app->request->queryParams); | |
74 | + $dataProvider->setPagination([ | |
75 | + 'pageSize' => 5 | |
76 | + ]); | |
77 | + $dataProvider->setSort([ | |
78 | + 'attributes' => [ | |
79 | + 'name' => [ | |
80 | + 'asc' => [ | |
81 | + 'company_info.name' => SORT_ASC, | |
82 | + 'firstname' => SORT_ASC, | |
83 | + 'lastname' => SORT_ASC, | |
84 | + ], | |
85 | + 'desc' => [ | |
86 | + 'company_info.name' => SORT_DESC, | |
87 | + 'firstname' => SORT_DESC, | |
88 | + 'lastname' => SORT_DESC, | |
89 | + ], | |
90 | + 'default' => SORT_ASC, | |
91 | + 'label' => 'Название', | |
92 | + ], | |
93 | + 'staff' => [ | |
94 | + 'asc' => [ | |
95 | + 'company_info.staff' => SORT_ASC, | |
96 | + ], | |
97 | + 'desc' => [ | |
98 | + 'company_info.staff' => SORT_DESC, | |
99 | + ], | |
100 | + 'default' => SORT_DESC, | |
101 | + 'label' => 'Количество сотрудников', | |
102 | + ], | |
103 | + 'visit' => [ | |
104 | + 'asc' => [ | |
105 | + 'user_info.date_visit' => SORT_ASC, | |
106 | + ], | |
107 | + 'desc' => [ | |
108 | + 'user_info.date_visit' => SORT_DESC, | |
109 | + ], | |
110 | + 'default' => SORT_DESC, | |
111 | + 'label' => 'Последний визит', | |
112 | + ], | |
113 | + 'city' => [ | |
114 | + 'asc' => [ | |
115 | + 'user_info.city' => SORT_ASC, | |
116 | + ], | |
117 | + 'desc' => [ | |
118 | + 'user_info.city' => SORT_DESC, | |
119 | + ], | |
120 | + 'default' => SORT_ASC, | |
121 | + 'label' => 'Город', | |
122 | + ], | |
123 | + ], | |
124 | + ]); | |
125 | + $model->load(Yii::$app->request->queryParams); | |
126 | + $cities = UserInfo::find()->select('city')->distinct()->asArray()->indexBy('city')->column(); | |
71 | 127 | return $this->render('customer',[ |
128 | + 'model' => $model, | |
129 | + 'dataProvider' => $dataProvider, | |
130 | + 'cities' => $cities, | |
72 | 131 | ]); |
73 | 132 | } |
74 | 133 | ... | ... |
frontend/views/layouts/company.php
... | ... | @@ -16,10 +16,17 @@ $this->beginContent('@app/views/layouts/main.php'); |
16 | 16 | <div class="performance-vacancy-call-back"> |
17 | 17 | <div class="performance-vacancy-call-back-title">Оставьте заявку<br />и мы вам перезвоним</div> |
18 | 18 | <form class="callback" action=""> |
19 | - <label for="callbac_name">Имя</label> | |
20 | - <input id="callbac_name" type="text"/> | |
21 | - <label for="callbac_phone">Телефон</label> | |
22 | - <input id="callbac_phone" type="text"/> | |
19 | + | |
20 | + <div class="input-blocks-wrapper"> | |
21 | + <label for="callbac_name">Имя</label> | |
22 | + <input id="callbac_name" type="text"/> | |
23 | + </div> | |
24 | + | |
25 | + <div class="input-blocks-wrapper"> | |
26 | + <label for="callbac_phone">Телефон</label> | |
27 | + <input id="callbac_phone" type="text"/> | |
28 | + </div> | |
29 | + | |
23 | 30 | <input id="callbac_submit" type="submit" value="Перезвонить мне"/> |
24 | 31 | </form> |
25 | 32 | <div class="performance-vacancy-call-back-conf">Гарантируем конфидециальность</div> | ... | ... |
1 | +<?php | |
2 | + /** | |
3 | + * @var User $model | |
4 | + * @var mixed $key | |
5 | + * @var integer $index | |
6 | + * @var ListView $widget | |
7 | + */ | |
8 | + use common\models\Project; | |
9 | + use common\models\User; | |
10 | + use frontend\helpers\TextHelper; | |
11 | + use yii\bootstrap\Html; | |
12 | + use yii\helpers\Url; | |
13 | + use yii\widgets\ListView; | |
14 | +?> | |
15 | +<div class="search_perform_txt-wr"> | |
16 | + <div class="search_perform_title"> | |
17 | + <?php | |
18 | + if($model->type == 2) { | |
19 | + echo Html::a($model->companyInfo->name, ['company/common', 'company_id' => $model->id]); | |
20 | + } else { | |
21 | + echo Html::a($model->firstname . $model->lastname, ['performer/common', 'performer_id' => $model->id]); | |
22 | + } | |
23 | + ?> | |
24 | + </div> | |
25 | + <div class="search_perform-stars-wr"> | |
26 | + <div class="rating_search_performer"> | |
27 | + <!--оценка--> | |
28 | + <?php | |
29 | + if($rating = $model->getRatingPG()->rating) { | |
30 | + echo "<input type='hidden' class='val' value='{$rating}'/>"; | |
31 | + } else { | |
32 | + echo "<input type='hidden' class='val' value='0'/>"; | |
33 | + } | |
34 | + ?> | |
35 | + <input type="hidden" class="val" value="4"/> | |
36 | + </div> | |
37 | + <div class="search_perform-stars-txt"> | |
38 | + <?= $model->getComments()->count() ?> отзывов | |
39 | + <?php | |
40 | + if(!empty( $model->userInfo->city )) { | |
41 | + echo ", {$model->userInfo->city}"; | |
42 | + } | |
43 | + ?> | |
44 | + </div> | |
45 | + </div> | |
46 | + <?php | |
47 | + if($model->type == 2 && !empty( $model->companyInfo->staff )) { | |
48 | + ?> | |
49 | + <div class="search_perform_leng"> | |
50 | + <div>Сотрудники: <?= $model->companyInfo->staff ?></div> | |
51 | + </div> | |
52 | + <?php | |
53 | + } | |
54 | + ?> | |
55 | + <div class="search_perform_visit"> | |
56 | + <span>Послелний визит:</span> <?= \Yii::$app->formatter->asRelativeTime($model->userInfo->date_visit) ?> | |
57 | + </div> | |
58 | + <div class="search_perform_projets_nam"> | |
59 | + <?= Html::a("Заказано проектов {$model->getProjects()->count()}", ['search/project', (new Project())->formName().'[user_id]' => $model->id]) ?> | |
60 | + </div> | |
61 | +</div> | |
62 | + | |
63 | +<div class="right_search_perform_block-wr"> | |
64 | + <div class="right_search_perform_foto-wr"> | |
65 | + <div> | |
66 | + <?php | |
67 | + echo Html::img($model->userInfo->image?:"/images/search_performer_img-1.jpg", ['class' => 'search_customer_image']); | |
68 | + ?> | |
69 | + </div> | |
70 | + </div> | |
71 | + <a class="get-list" href="#">Добавить в закладки</a> | |
72 | +</div> | |
0 | 73 | \ No newline at end of file | ... | ... |
frontend/views/search/company.php
... | ... | @@ -100,6 +100,12 @@ use yii\widgets\ListView; |
100 | 100 | <input type="submit" value="Найти"/> |
101 | 101 | </div> |
102 | 102 | </form> |
103 | + <script> | |
104 | + $('div.rating').rating({ | |
105 | + fx: 'full', | |
106 | + url: 'rating.php' | |
107 | + }); | |
108 | + </script> | |
103 | 109 | </div> |
104 | 110 | <div class="right-search-work"> |
105 | 111 | <div class="search-worker-title style">Найти исполнителя</div> |
... | ... | @@ -144,6 +150,14 @@ use yii\widgets\ListView; |
144 | 150 | ?> |
145 | 151 | </div> |
146 | 152 | |
153 | + <script> | |
154 | + $('div.rating-new').rating({ | |
155 | + fx: 'full', | |
156 | + readOnly: 'true', | |
157 | + url: 'rating.php' | |
158 | + }); | |
159 | + </script> | |
160 | + | |
147 | 161 | </div> |
148 | 162 | </div> |
149 | 163 | </div> | ... | ... |
frontend/views/search/customer.php
1 | 1 | <?php |
2 | -/** | |
3 | - * Created by PhpStorm. | |
4 | - * User: vitaliy | |
5 | - * Date: 09.03.16 | |
6 | - * Time: 10:21 | |
7 | - */ | |
2 | + /** | |
3 | + * @var CustomerSearch $model | |
4 | + * @var ActiveDataProvider $dataProvider | |
5 | + * @var string[] $cities | |
6 | + */ | |
7 | + use common\models\CustomerSearch; | |
8 | + use yii\data\ActiveDataProvider; | |
9 | + use yii\helpers\Html; | |
10 | + use yii\widgets\ActiveForm; | |
11 | + use yii\widgets\LinkSorter; | |
12 | + use yii\widgets\ListView; | |
13 | + | |
8 | 14 | ?> |
9 | 15 | <div class="section-box-22 section-box-customer"> |
10 | 16 | <div class="box-wr"> |
11 | 17 | <div class="box-all"> |
18 | + <?php | |
19 | + // == Left filter == | |
20 | + ?> | |
12 | 21 | <div class="left-search-work"> |
13 | - <form action="" class="search-work-form"> | |
14 | - <div class="blocks-check-list-wrapp"> | |
15 | - <div class="blocks-check-title"><label for="theme-1">Город</label></div> | |
16 | - <select id="theme-1"> | |
17 | - <option selected="" value="">Любой</option> | |
18 | - <option value="">Киев</option> | |
19 | - <option value="">Житомир</option> | |
20 | - <option value="">Львов</option> | |
21 | - <option value="">Киев</option> | |
22 | - <option value="">Житомир</option> | |
23 | - <option value="">Львов</option> | |
22 | + <?php | |
23 | + $form = ActiveForm::begin(['method' => 'get', 'options' => [ 'class' => 'search-work-form' ], 'action' => [''] ]); | |
24 | 24 | |
25 | - <option value="">Киев</option> | |
26 | - <option value="">Житомир</option> | |
27 | - <option value="">Львов</option> | |
28 | - <option value="">Киев</option> | |
29 | - <option value="">Житомир</option> | |
30 | - <option value="">Львов</option> | |
31 | - <option value="">Киев</option> | |
32 | - <option value="">Житомир</option> | |
33 | - <option value="">Львов</option> | |
34 | - <option value="">Киев</option> | |
35 | - <option value="">Житомир</option> | |
36 | - <option value="">Львов</option> | |
37 | - <option value="">Киев</option> | |
38 | - <option value="">Житомир</option> | |
39 | - <option value="">Львов</option> | |
40 | - <option value="">Киев</option> | |
41 | - <option value="">Житомир</option> | |
42 | - <option value="">Львов</option> | |
43 | - <option value="">Киев</option> | |
44 | - <option value="">Житомир</option> | |
45 | - <option value="">Львов</option> | |
46 | - <option value="">Киев</option> | |
47 | - <option value="">Житомир</option> | |
48 | - <option value="">Львов</option> | |
49 | - <option value="">Киев</option> | |
50 | - <option value="">Житомир</option> | |
51 | - <option value="">Львов</option> | |
52 | - <option value="">Киев</option> | |
53 | - <option value="">Житомир</option> | |
54 | - <option value="">Львов</option> | |
55 | - <option value="">Киев</option> | |
56 | - <option value="">Житомир</option> | |
57 | - <option value="">Львов</option> | |
58 | - <option value="">Киев</option> | |
59 | - <option value="">Житомир</option> | |
60 | - <option value="">Львов</option> | |
61 | - <option value="">Киев</option> | |
62 | - <option value="">Житомир</option> | |
63 | - <option value="">Львов</option> | |
64 | - <option value="">Киев</option> | |
65 | - <option value="">Житомир</option> | |
66 | - <option value="">Львов</option> | |
67 | - <option value="">Киев</option> | |
68 | - <option value="">Житомир</option> | |
69 | - <option value="">Львов</option> | |
70 | - <option value="">Киев</option> | |
71 | - <option value="">Житомир</option> | |
72 | - <option value="">Львов</option> | |
73 | - <option value="">Киев</option> | |
74 | - <option value="">Житомир</option> | |
75 | - <option value="">Львов</option> | |
76 | - <option value="">Киев</option> | |
77 | - <option value="">Житомир</option> | |
78 | - <option value="">Львов</option> | |
79 | - <option value="">Киев</option> | |
25 | + echo $form->field($model, 'city', [ | |
26 | + 'options' => [ | |
27 | + 'class' => 'blocks-check-list-wrapp', | |
28 | + ], | |
29 | + 'template' => "<div class='blocks-check-title'>{label}</div>\n{input}<div class='select-after'></div>\n{hint}\n{error}", | |
30 | + ]) | |
31 | + ->dropDownList($cities, [ 'prompt' => 'Любой' ]); | |
80 | 32 | |
81 | - </select><div class="select-after"></div> | |
82 | - </div> | |
83 | - | |
84 | - <div class="blocks-check-list-wrapp"> | |
85 | - <div class="blocks-check-title"><label for="theme-3">Тип заказчика</label></div> | |
86 | - <select id="theme-3"> | |
87 | - <option selected="" value="">Любая</option> | |
88 | - <option value="">Киев</option> | |
89 | - <option value="">Житомир</option> | |
90 | - <option value="">Львов</option> | |
91 | - <option value="">Киев</option> | |
92 | - <option value="">Житомир</option> | |
93 | - <option value="">Львов</option> | |
94 | - </select><div class="select-after"></div> | |
95 | - </div> | |
33 | + echo $form->field($model, 'type', [ | |
34 | + 'options' => [ | |
35 | + 'class' => 'blocks-check-list-wrapp', | |
36 | + ], | |
37 | + 'template' => "<div class='blocks-check-title'>{label}</div>\n{input}<div class='select-after'></div>\n{hint}\n{error}", | |
38 | + ]) | |
39 | + ->dropDownList([ | |
40 | + 1 => 'Физическое лицо', | |
41 | + 2 => 'Компания', | |
42 | + ], [ 'prompt' => 'Любой' ]); | |
43 | + ?> | |
96 | 44 | |
45 | + <?php | |
46 | + /* Рейтинг | |
47 | + ?> | |
97 | 48 | <div class="blocks-check-list-wrapp"> |
98 | 49 | <div class="blocks-check-title">Рейтинг</div> |
99 | 50 | <div class="rating"> |
... | ... | @@ -101,56 +52,92 @@ |
101 | 52 | <input type="hidden" class="val" value="0"> |
102 | 53 | </div> |
103 | 54 | </div> |
55 | + <?php | |
56 | + */ | |
57 | + ?> | |
104 | 58 | |
105 | - <div class="blocks-check-list-wrapp"> | |
106 | - <div class="blocks-check-title">Статус</div> | |
107 | - <div class="blocks-check-list"> | |
108 | - <input type="radio" name="group3" class="check-search" id="theme-8"><label for="theme-8"><span></span>Онлайн</label> | |
109 | - </div> | |
110 | - <div class="blocks-check-list"> | |
111 | - <input type="radio" name="group3" class="check-search" id="theme-9" checked=""><label for="theme-9"><span></span>Все</label> | |
112 | - </div> | |
113 | - </div> | |
59 | + <?php | |
60 | + echo $form->field($model, 'online', [ | |
61 | + 'options' => [ | |
62 | + 'class' => 'blocks-check-list-wrapp', | |
63 | + ], | |
64 | + 'template' => "<div class='blocks-check-title'>{label}</div>\n{input}\n{hint}\n{error}", | |
65 | + ]) | |
66 | + ->radioList([ | |
67 | + '' => 'Все', | |
68 | + 1 => 'Онлайн', | |
69 | + ], [ | |
70 | + 'item' => function($index, $label, $name, $checked, $value) use ($model) { | |
71 | + $checked = ($model->online == $value); | |
72 | + 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>"; | |
73 | + }, | |
74 | + 'unselect' => NULL, | |
75 | + ]); | |
114 | 76 | |
115 | - <div class="blocks-check-list-submit"> | |
116 | - <input type="submit" value="Найти"> | |
117 | - </div> | |
118 | - </form> | |
77 | + echo '<div class="blocks-check-list-submit">'.Html::submitInput('Найти').'</div>'; | |
78 | + | |
79 | + $form->end(); | |
80 | + ?> | |
119 | 81 | <script> |
120 | - $('div.rating').rating({ | |
121 | - fx: 'full', | |
122 | - url: 'rating.php' | |
123 | - }); | |
82 | + $('div.rating').rating( | |
83 | + { | |
84 | + fx : 'full', url : 'rating.php' | |
85 | + } | |
86 | + ); | |
124 | 87 | </script> |
125 | 88 | </div> |
126 | 89 | |
90 | + <?php | |
91 | + // == End of left filter == | |
92 | + ?> | |
93 | + | |
94 | + <?php | |
95 | + // == Page content == | |
96 | + ?> | |
127 | 97 | <div class="right-search-work"> |
128 | 98 | <div class="search-worker-title style">Найти заказчика</div> |
129 | - <div class="search-worker-title-two style">Заказчики готовые приступить к работе <span>145</span></div> | |
99 | + <div class="search-worker-title-two style">Заказчики готовые приступить к работе | |
100 | + <span><?= $dataProvider->totalCount ?></span></div> | |
130 | 101 | <div class="search-worker-search-wr style"> |
131 | - <form action="" class="search-worker-form"> | |
132 | - <input id="srch-wrk-text" type="text" placeholder="Любая информация о заказчике" required=""> | |
133 | - <input id="srch-wrk-sub" type="submit" value="Найти"> | |
134 | - </form> | |
102 | + <?php | |
103 | + $form2 = ActiveForm::begin(['method' => 'get', 'action' => [''], 'options' => ['class' => 'search-worker-form']]); | |
104 | + echo $form2->field($model, 'info', ['options' => ['tag' => false]])->label(false)->textInput(['placeholder' => $model->getAttributeLabel('info')]); | |
105 | + echo Html::submitInput('Найти'); | |
106 | + $form2->end(); | |
107 | + ?> | |
135 | 108 | <a href="#" class="add-to-catalog-search-worker">Добавить себя в каталог</a> |
136 | 109 | <div class="search-worker-sort-wr style"> |
137 | 110 | <div class="search-worker-sort">Сортировать: </div> |
138 | 111 | <ul> |
139 | 112 | <li class="activejob"> |
140 | - <a href="#">рейтинг</a> | |
113 | + <a href="#"></a> | |
141 | 114 | <div class="sidebar-droped-wr style"> |
142 | - <ul> | |
143 | - <li><a href="#">рейтинг</a></li> | |
144 | - <li><a href="#">1заказчик</a></li> | |
145 | - <li><a href="#">2заказчик</a></li> | |
146 | - <li><a href="#">3заказчик</a></li> | |
147 | - <li><a href="#">4заказчик</a></li> | |
148 | - </ul> | |
115 | + <?php | |
116 | + echo LinkSorter::widget([ | |
117 | + 'sort' => $dataProvider->sort, | |
118 | + ]); | |
119 | + ?> | |
149 | 120 | </div> |
150 | 121 | </li> |
151 | 122 | </ul> |
152 | 123 | </div> |
153 | 124 | </div> |
125 | + <?php | |
126 | + echo ListView::widget([ | |
127 | + 'dataProvider' => $dataProvider, | |
128 | + 'layout' => "{items}\n{pager}", | |
129 | + 'options' => [ | |
130 | + 'class' => 'search-worker-blocks-wr style', | |
131 | + ], | |
132 | + 'itemOptions' => [ | |
133 | + 'class' => 'search-worker-blocks', | |
134 | + ], | |
135 | + 'itemView' => '_customer_list_view', | |
136 | + ]); | |
137 | + ?> | |
138 | + <?php | |
139 | + /* == Layout == | |
140 | + ?> | |
154 | 141 | <div class="search-worker-blocks-wr style"> |
155 | 142 | |
156 | 143 | <div class="search-worker-blocks"> |
... | ... | @@ -161,13 +148,16 @@ |
161 | 148 | <!--оценка--> |
162 | 149 | <input type="hidden" class="val" value="4"/> |
163 | 150 | </div> |
164 | - <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
151 | + <div class="search_perform-stars-txt">30 отзывов, Киев</div> | |
165 | 152 | </div> |
166 | 153 | <div class="search_perform_leng"> |
167 | 154 | <div>Сотрудники: более 40</div> |
168 | 155 | </div> |
169 | - <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
170 | - <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
156 | + <div class="search_perform_visit"> | |
157 | + <span>Послелний визит:</span> 2 дня назад | |
158 | + </div> | |
159 | + <div class="search_perform_projets_nam"> | |
160 | + <a href="#">Заказано проектов: 21</a></div> | |
171 | 161 | </div> |
172 | 162 | |
173 | 163 | <div class="right_search_perform_block-wr"> |
... | ... | @@ -186,13 +176,16 @@ |
186 | 176 | <!--оценка--> |
187 | 177 | <input type="hidden" class="val" value="2"/> |
188 | 178 | </div> |
189 | - <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
179 | + <div class="search_perform-stars-txt">30 отзывов, Киев</div> | |
190 | 180 | </div> |
191 | 181 | <div class="search_perform_leng"> |
192 | 182 | <!--<div>Сотрудники: более 40</div>--> |
193 | 183 | </div> |
194 | - <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
195 | - <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
184 | + <div class="search_perform_visit"> | |
185 | + <span>Послелний визит:</span> 2 дня назад | |
186 | + </div> | |
187 | + <div class="search_perform_projets_nam"> | |
188 | + <a href="#">Заказано проектов: 21</a></div> | |
196 | 189 | </div> |
197 | 190 | |
198 | 191 | <div class="right_search_perform_block-wr"> |
... | ... | @@ -211,13 +204,16 @@ |
211 | 204 | <!--оценка--> |
212 | 205 | <input type="hidden" class="val" value="1"/> |
213 | 206 | </div> |
214 | - <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
207 | + <div class="search_perform-stars-txt">30 отзывов, Киев</div> | |
215 | 208 | </div> |
216 | 209 | <div class="search_perform_leng"> |
217 | 210 | <div>Сотрудники: более 40</div> |
218 | 211 | </div> |
219 | - <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
220 | - <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
212 | + <div class="search_perform_visit"> | |
213 | + <span>Послелний визит:</span> 2 дня назад | |
214 | + </div> | |
215 | + <div class="search_perform_projets_nam"> | |
216 | + <a href="#">Заказано проектов: 21</a></div> | |
221 | 217 | </div> |
222 | 218 | |
223 | 219 | <div class="right_search_perform_block-wr"> |
... | ... | @@ -236,13 +232,16 @@ |
236 | 232 | <!--оценка--> |
237 | 233 | <input type="hidden" class="val" value="5"/> |
238 | 234 | </div> |
239 | - <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
235 | + <div class="search_perform-stars-txt">30 отзывов, Киев</div> | |
240 | 236 | </div> |
241 | 237 | <div class="search_perform_leng"> |
242 | 238 | <!--<div>Сотрудники: более 40</div>--> |
243 | 239 | </div> |
244 | - <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
245 | - <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
240 | + <div class="search_perform_visit"> | |
241 | + <span>Послелний визит:</span> 2 дня назад | |
242 | + </div> | |
243 | + <div class="search_perform_projets_nam"> | |
244 | + <a href="#">Заказано проектов: 21</a></div> | |
246 | 245 | </div> |
247 | 246 | |
248 | 247 | <div class="right_search_perform_block-wr"> |
... | ... | @@ -263,14 +262,21 @@ |
263 | 262 | </ul> |
264 | 263 | </div> |
265 | 264 | |
265 | + <?php | |
266 | + == End of layout == */ | |
267 | + ?> | |
268 | + | |
266 | 269 | <script> |
267 | - $('div.rating_search_performer').rating({ | |
268 | - fx: 'full', | |
269 | - readOnly: 'true', | |
270 | - url: 'rating.php' | |
271 | - }); | |
270 | + $('div.rating_search_performer').rating( | |
271 | + { | |
272 | + fx : 'full', readOnly : 'true', url : 'rating.php' | |
273 | + } | |
274 | + ); | |
272 | 275 | </script> |
273 | 276 | </div> |
277 | + <?php | |
278 | + // == End of page content == | |
279 | + ?> | |
274 | 280 | </div> |
275 | 281 | </div> |
276 | 282 | </div> |
277 | 283 | \ No newline at end of file | ... | ... |
frontend/views/search/performer.php
... | ... | @@ -159,6 +159,12 @@ $this->title = 'My Yii Application'; |
159 | 159 | <input type="submit" value="Найти"/> |
160 | 160 | </div> |
161 | 161 | </form> |
162 | + <script> | |
163 | + $('div.rating').rating({ | |
164 | + fx: 'full', | |
165 | + url: 'rating.php' | |
166 | + }); | |
167 | + </script> | |
162 | 168 | </div> |
163 | 169 | <div class="right-search-work"> |
164 | 170 | <div class="search-worker-title style">Найти исполнителя</div> |
... | ... | @@ -203,6 +209,14 @@ $this->title = 'My Yii Application'; |
203 | 209 | |
204 | 210 | |
205 | 211 | </div> |
212 | + | |
213 | + <script> | |
214 | + $('div.rating-new').rating({ | |
215 | + fx: 'full', | |
216 | + readOnly: 'true', | |
217 | + url: 'rating.php' | |
218 | + }); | |
219 | + </script> | |
206 | 220 | </div> |
207 | 221 | </div> |
208 | 222 | </div> | ... | ... |
frontend/views/site/forms-modal-offer.php
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <div class="form-resume-sub style">Предложить проект</div> |
45 | 45 | <form action="" class="offer-project"> |
46 | 46 | |
47 | - <label>Выбрать проект</label><div style="clear:both;"></div> | |
47 | + <label>Выбрать проект</label> | |
48 | 48 | <div class="list_item title"> |
49 | 49 | <div class="main_item"> |
50 | 50 | <div class="pr_title"></div> |
... | ... | @@ -77,11 +77,6 @@ |
77 | 77 | </div> |
78 | 78 | </div> |
79 | 79 | |
80 | - <label for="off_name">Название проекта</label><input id="off_name" name="" type="text"> | |
81 | - | |
82 | - <label for="off_text">Описание</label><textarea id="off_text" name=""></textarea> | |
83 | - | |
84 | - <label for="off_price">Цена</label><input id="off_price" name="" type="text"> | |
85 | 80 | |
86 | 81 | <input id="off_submit" type="submit" value="Предложить"> |
87 | 82 | </form> |
... | ... | @@ -89,5 +84,56 @@ |
89 | 84 | </div> |
90 | 85 | </div> |
91 | 86 | |
87 | +<!--<div id="modal_form_offer">--> | |
88 | +<!-- <div class="closed-form"></div>--> | |
89 | +<!-- <div class="form-resume-wr offer">--> | |
90 | +<!-- <div class="form-resume-sub style">Предложить проект</div>--> | |
91 | +<!-- <form action="" class="offer-project">--> | |
92 | +<!----> | |
93 | +<!-- <label>Выбрать проект</label><div style="clear:both;"></div>--> | |
94 | +<!-- <div class="list_item title">--> | |
95 | +<!-- <div class="main_item">--> | |
96 | +<!-- <div class="pr_title"></div>--> | |
97 | +<!-- <span></span>--> | |
98 | +<!-- </div>--> | |
99 | +<!-- <div class="arrow up"></div>--> | |
100 | +<!-- <div class="off_list">--> | |
101 | +<!-- <ul class="content list-form-offer">--> | |
102 | +<!-- <li>--> | |
103 | +<!-- <div class="title1">Проект бассейна 1</div>--> | |
104 | +<!-- <div class="title2">Подряд: Вилла 1</div>--> | |
105 | +<!-- </li>--> | |
106 | +<!-- <li>--> | |
107 | +<!-- <div class="title1">Проект бассейна 2</div>--> | |
108 | +<!-- <div class="title2">Подряд: Вилла 2</div>--> | |
109 | +<!-- </li>--> | |
110 | +<!-- <li>--> | |
111 | +<!-- <div class="title1">Проект бассейна 3</div>--> | |
112 | +<!-- <div class="title2">Подряд: Вилла 3</div>--> | |
113 | +<!-- </li>--> | |
114 | +<!-- <li>--> | |
115 | +<!-- <div class="title1">Проект бассейна 4</div>--> | |
116 | +<!-- <div class="title2">Подряд: Вилла 4</div>--> | |
117 | +<!-- </li>--> | |
118 | +<!-- <li>--> | |
119 | +<!-- <div class="title1">Проект бассейна 5</div>--> | |
120 | +<!-- <div class="title2">Подряд: Вилла 5</div>--> | |
121 | +<!-- </li>--> | |
122 | +<!-- </ul>--> | |
123 | +<!-- </div>--> | |
124 | +<!-- </div>--> | |
125 | +<!----> | |
126 | +<!-- <label for="off_name">Название проекта</label><input id="off_name" name="" type="text">--> | |
127 | +<!----> | |
128 | +<!-- <label for="off_text">Описание</label><textarea id="off_text" name=""></textarea>--> | |
129 | +<!----> | |
130 | +<!-- <label for="off_price">Цена</label><input id="off_price" name="" type="text">--> | |
131 | +<!----> | |
132 | +<!-- <input id="off_submit" type="submit" value="Предложить">--> | |
133 | +<!-- </form>--> | |
134 | +<!-- <div class="res_form_line"></div>--> | |
135 | +<!-- </div>--> | |
136 | +<!--</div>--> | |
137 | + | |
92 | 138 | |
93 | 139 | ... | ... |
frontend/views/site/login.php
... | ... | @@ -11,42 +11,62 @@ |
11 | 11 | $this->title = 'Авторизация'; |
12 | 12 | $this->params[ 'breadcrumbs' ][] = $this->title; |
13 | 13 | ?> |
14 | - <h1><?php echo Html::encode($this->title); ?></h1> | |
14 | +<div class="box-wr"> | |
15 | + <div class="box-all"> | |
16 | + <div class="form_site_logn-wr"> | |
17 | + <div class="form_site_logn_"> | |
18 | + <h1><?php echo Html::encode($this->title); ?></h1> | |
19 | + | |
20 | + <?php | |
21 | + if(Yii::$app->getSession() | |
22 | + ->hasFlash('error') | |
23 | + ) { | |
24 | + echo '<div class="alert alert-danger">' . Yii::$app->getSession() | |
25 | + ->getFlash('error') . '</div>'; | |
26 | + } | |
27 | + ?> | |
28 | + | |
29 | + | |
30 | + <?php //echo \nodge\eauth\Widget::widget([ 'action' => 'site/login' ]); ?> | |
31 | + | |
15 | 32 | |
16 | -<?php | |
17 | - if(Yii::$app->getSession() | |
18 | - ->hasFlash('error') | |
19 | - ) { | |
20 | - echo '<div class="alert alert-danger">' . Yii::$app->getSession() | |
21 | - ->getFlash('error') . '</div>'; | |
22 | - } | |
23 | -?> | |
24 | 33 | |
34 | + <?php $form = ActiveForm::begin([ | |
35 | + 'options' => [ | |
36 | + 'class' => 'form-horizontal', | |
37 | + 'id' => 'login-form', | |
38 | + ], | |
39 | + ]); ?> | |
40 | + <div class="input-blocks-wrapper"> | |
41 | + <?php echo $form->field($model, 'username') | |
42 | + ->textInput(['class'=>'custom-input-2']); ?> | |
43 | + </div> | |
25 | 44 | |
26 | -<?php //echo \nodge\eauth\Widget::widget([ 'action' => 'site/login' ]); ?> | |
45 | + <div class="input-blocks-wrapper"> | |
46 | + <?php echo $form->field($model, 'password') | |
47 | + ->passwordInput(['class'=>'custom-input-2']); ?> | |
48 | + </div> | |
27 | 49 | |
50 | + <div class="login-check-remember style"> | |
51 | + <?php echo $form->field($model, 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ]) | |
52 | + ->label('<span></span>Запомнить меня') | |
53 | + ->checkbox([ | |
54 | + 'class' => 'custom-check', | |
55 | + 'checked' => 'checked', | |
56 | + ], false); ?> | |
57 | + </div> | |
28 | 58 | |
29 | 59 | |
60 | + <div class="form-actions style"> | |
61 | + <?php echo Html::submitButton('Вход', [ 'class' => 'btn btn-primary login-button' ]); ?> | |
62 | + </div> | |
63 | + <div class="style" style="text-align: center; font-size: 13px; margin-top: 16px"> | |
64 | + <?= Html::a('Восстановить пароль', [ 'site/request-password-reset' ]) ?> | |
65 | + </div> | |
30 | 66 | |
31 | -<?php $form = ActiveForm::begin([ | |
32 | - 'options' => [ | |
33 | - 'class' => 'form-horizontal', | |
34 | - 'id' => 'login-form', | |
35 | - ], | |
36 | -]); ?> | |
37 | -<?php echo $form->field($model, 'username') | |
38 | - ->textInput(); ?> | |
39 | -<?php echo $form->field($model, 'password') | |
40 | - ->passwordInput(); ?> | |
41 | -<?php echo $form->field($model, 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ]) | |
42 | - ->label('<span></span>Запомнить меня') | |
43 | - ->checkbox([ | |
44 | - 'class' => 'custom-check', | |
45 | - 'checked' => 'checked', | |
46 | - ], false); ?> | |
67 | + <?php ActiveForm::end(); ?> | |
68 | + </div> | |
69 | + </div> | |
47 | 70 | |
48 | - <div class="form-actions"> | |
49 | - <?php echo Html::submitButton('Login', [ 'class' => 'btn btn-primary' ]); ?> | |
50 | 71 | </div> |
51 | -<?= Html::a('Восстановить пароль', [ 'site/request-password-reset' ]) ?> | |
52 | -<?php ActiveForm::end(); ?> | |
53 | 72 | \ No newline at end of file |
73 | +</div> | ... | ... |
frontend/web/css/style.css
... | ... | @@ -945,13 +945,13 @@ li.project-home-active span{ |
945 | 945 | margin-left: -120px; |
946 | 946 | margin-top: 22px; |
947 | 947 | } |
948 | -.form-resume-wr form label { | |
948 | +.form-resume-wr form label, .form_site_logn-wr label { | |
949 | 949 | font-size: 13px; |
950 | 950 | font-weight: 700; |
951 | 951 | width: 100%; |
952 | 952 | float: left; |
953 | 953 | } |
954 | -.form-resume-wr form input { | |
954 | +.form-resume-wr form input, .form_site_logn-wr form input { | |
955 | 955 | width: 240px; |
956 | 956 | height: 29px; |
957 | 957 | border: 1px solid #dcdcdc; |
... | ... | @@ -2724,12 +2724,14 @@ input[type=file]::-webkit-file-upload-button { |
2724 | 2724 | .search-worker-blocks:first-child{margin-top: 20px} |
2725 | 2725 | .search-worker-blocks-foto-wr { |
2726 | 2726 | width: 318px; |
2727 | - | |
2727 | + min-height: 320px; | |
2728 | 2728 | float: left; |
2729 | 2729 | } |
2730 | 2730 | .search-worker-blocks-text-wr { |
2731 | 2731 | width: 382px; |
2732 | 2732 | float: right; |
2733 | + min-height: 320px; | |
2734 | + position: relative; | |
2733 | 2735 | } |
2734 | 2736 | .search-worker-blocks-ico-wr { |
2735 | 2737 | width: 48px; |
... | ... | @@ -2752,7 +2754,7 @@ input[type=file]::-webkit-file-upload-button { |
2752 | 2754 | text-align: center; |
2753 | 2755 | } |
2754 | 2756 | .search-worker-blocks-title { |
2755 | - font-size: 18px; margin-top: -4px; | |
2757 | + font-size: 18px; margin-top: -1px; | |
2756 | 2758 | } |
2757 | 2759 | .rating-new { |
2758 | 2760 | float: left; |
... | ... | @@ -2877,8 +2879,14 @@ input[type=file]::-webkit-file-upload-button { |
2877 | 2879 | .search-worker-blocks-buttons { |
2878 | 2880 | margin-top: 49px; |
2879 | 2881 | } |
2880 | - | |
2881 | - | |
2882 | +.search-worker-blocks-buttons { | |
2883 | + margin-top: 0; | |
2884 | + position: absolute; | |
2885 | + bottom: 0; | |
2886 | + left: 0; | |
2887 | +} | |
2888 | +.search-worker-blocks .search-worker-blocks-jobs-portfolio {margin-bottom: 41px} | |
2889 | +.search-company-block-left .search-worker-blocks-jobs-portfolio {margin-bottom: 31px} | |
2882 | 2890 | |
2883 | 2891 | .gallery-box-search { |
2884 | 2892 | width: 100%; |
... | ... | @@ -3258,10 +3266,13 @@ ul.proektant-comments {margin-top: 15px} |
3258 | 3266 | .search-company-block-left { |
3259 | 3267 | width: 400px; |
3260 | 3268 | float: left; |
3269 | + min-height: 320px; | |
3270 | + position: relative; | |
3261 | 3271 | } |
3262 | 3272 | .search-company-block-right { |
3263 | 3273 | width: 320px; |
3264 | 3274 | float: right; |
3275 | + min-height: 320px; | |
3265 | 3276 | } |
3266 | 3277 | .search-company-block-left .search-worker-blocks-title-wr {float: left; width: 100% !important;} |
3267 | 3278 | .search-company-block-left .land-stars-pro, .land-stars-new {margin-right: 11px} |
... | ... | @@ -3422,7 +3433,8 @@ ul.proektant-comments {margin-top: 15px} |
3422 | 3433 | .favorite-user-profile-add span{line-height: 18px} |
3423 | 3434 | |
3424 | 3435 | form.offer-project { |
3425 | - height: 531px; | |
3436 | + /*height: 531px;*/ | |
3437 | + height: 211px; | |
3426 | 3438 | } |
3427 | 3439 | #off_submit { |
3428 | 3440 | bottom: 25px; |
... | ... | @@ -4114,7 +4126,8 @@ ul.min_markers_two |
4114 | 4126 | /*** message-read***/ |
4115 | 4127 | .comments_block{width:938px;height:498px;background-color:#fcfcfc;border:1px solid #b7b7b7;border-right:none;margin-bottom:57px;color:#333;font-family:Roboto;font-size:13px;position:relative;overflow:hidden;outline:none}.comment_type{width:940px}.comment_type .pole{width:660px;margin:0 auto;position:relative}.comment_type .mes_title{font-size:18px;color:#333;margin:18px 0}.message_text{width:638px;height:78px;resize:none;border:1px solid #c2c2c2;margin:0 auto;margin-bottom:26px;margin-top:18px;padding:10px;font-family:Roboto}.send_mess_but{outline:none;border:none;cursor:pointer;font-size:12px!important;padding-top:2px;width:170px;height:43px;text-align:center;text-transform:uppercase;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '#148ad6',endColorstr = '#0072bc');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr = '#148ad6',endColorstr = '#0072bc')";background-image:-moz-linear-gradient(top,#148ad6,#0072bc);background-image:-ms-linear-gradient(top,#148ad6,#0072bc);background-image:-o-linear-gradient(top,#148ad6,#0072bc);background-image:-webkit-gradient(linear,center top,center bottom,from(#148ad6),to(#0072bc));background-image:-webkit-linear-gradient(top,#148ad6,#0072bc);background-image:linear-gradient(top,#148ad6,#0072bc);color:#fff;border-bottom:2px solid #0054a6;border-radius:4px;transition:.1s;top:170px;line-height:3.5}.send_mess_but:hover{opacity:.9}.send_mess_but:active{line-height:3.7}.pick_file{position:absolute;top:170px;right:0;width:130px}.pick_file .link:after{content:'';background:url(/images/skrpk.png) left center no-repeat;position:absolute;width:19px;height:21px;left:-28px;top:0}.pick_file .link{text-transform:uppercase;color:#0276c0;font-size:13px;cursor:pointer;text-decoration:none;border-bottom:1px solid #70b2db;position:relative}.pick_file .capt{color:#c2c2c2;font-size:11px;line-height:16px;margin-top:3px}.comment_text{position:relative;padding:12px 13px;width:602px;border:1px solid #c2c2c2;min-height:74px;left:10px;line-height:1.3;background-color:#fff}.comment.left .comment_text{float:left}.comment.right .comment_text{float:right}.comment.left .comment_text:before{content:'';background:url(/images/mes_bord_left.png);position:absolute;width:11px;height:11px;top:-1px;left:-11px}.comment.right .comment_text:before{content:'';background:url(/images/mes_bord_right.png);position:absolute;width:11px;height:11px;top:-1px;right:-11px}.comment.left .author_pic{float:left;margin:0 10px}.comment.right .author_pic{float:right;margin:0 25px 0 30px}.comment_time{color:#c6c6c6;font-family:Roboto;font-size:13px;font-weight:600;line-height:32px;position:absolute}.comment.left .comment_time{top: 17px; right: -120px; width: 100px;}.comment.right .comment_time{ top: 18px; left: -88px; width: 100px;}.comment{position:relative;margin:30px 21px 30px 1px}.comment .offer_link a{color:#0173bd;display:block; height:25px; position:relative}.comment .offer_link a:before{content:'';position:absolute;background:url(/images/skrpk_sm.png) left center no-repeat;width:19px;height:21px;left:-26px;top:-3px}.comment.right .offer_link{float:right;margin-right:94px;margin-top:12px;margin-bottom:-17px}.comment.left .offer_link{left:104px;bottom:-27px}.comment_block .content{overflow:auto;width:938px;height:498px}.fileform{background-color:#FFF;border:1px solid #CCC;border-radius:2px;cursor:pointer;height:26px;overflow:hidden;padding:2px;position:relative;text-align:left;vertical-align:middle;width:230px}.comment_type form{width:660px;margin:0 auto}.comment_type form label{color:#333;font-family:Roboto;font-size:18px}.input_file_text{color:#c2c2c2;font-size:11px;font-family:Roboto;width:125px;position:absolute;right:0;line-height:16px;top:18px;overflow:hidden;text-overflow:ellipsis;white-space:pre-line}.inputfile{float:right;position:relative;width:153px;padding-bottom:10px;background-repeat:no-repeat}.input_file{opacity:0;cursor:pointer;width:160px}.inputfile .file_input_title{position:absolute;color:#0276c0;border-bottom:1px solid #0276c0;text-transform:uppercase;font-family:Roboto;font-size:13px;right:0}.jspArrow{background-color:#0173bd;width:20px;height:20px}.jspVerticalBar{width:20px}.jspVerticalBar .jspArrow{height:20px}.jspTrack{background:#ebebeb;position:relative}.jspDrag{background:#c2c2c2;position:relative;top:0;left:0;cursor:pointer;border-left:2px solid #ebebeb;border-right:2px solid #ebebeb}.jspVerticalBar{background:#ebebeb}.jspArrowUp{background:#0173bd url(/images/scroll_up.png) center center no-repeat}.jspArrowUp:hover{opacity:.8}.jspArrowUp:active{background-position-y:1px!important}.jspDisabled.jspArrowUp{background:#80808d url(/images/scroll_up_grey.png) center center no-repeat}.jspArrowDown{background:#0173bd url(/images/scroll_down.png) center center no-repeat}.jspArrowDown:hover{opacity:.8}.jspArrowDown:active{background-position-y:1px!important}.jspArrowDown{background:#0173bd url(/images/scroll_down.png) center center no-repeat}.jspDisabled.jspArrowDown{background:#80808d url(/images/scroll_down_grey.png) center center no-repeat}.jspContainer{outline:none;border:none} |
4116 | 4128 | /***form-order***/ |
4117 | -#modal_form_offer {height: 505px;} | |
4129 | +#modal_form_offer { /*height: 505px;*/ height: 309px; } | |
4130 | +#modal_form_offer .form-resume-wr {overflow: visible} | |
4118 | 4131 | #modal_form_offer,#modal_form_question, #modal_form_question{margin-top: 70px;} |
4119 | 4132 | .form-resume-wr form input[type="submit"]{margin-left: 55px;} |
4120 | 4133 | .form-resume-wr form{top:72px;} |
... | ... | @@ -4140,6 +4153,7 @@ ul.min_markers_two |
4140 | 4153 | border: 1px solid #dcdcdc; |
4141 | 4154 | position: relative; |
4142 | 4155 | cursor:pointer; |
4156 | + z-index: 2; | |
4143 | 4157 | } |
4144 | 4158 | .list_item.title{margin-bottom: 15px;} |
4145 | 4159 | .list_item .arrow{ |
... | ... | @@ -4169,14 +4183,13 @@ ul.min_markers_two |
4169 | 4183 | border: 4px solid transparent; |
4170 | 4184 | border-top-color: white; |
4171 | 4185 | } |
4172 | -form.offer-project {height: 406px;} | |
4186 | + | |
4173 | 4187 | .list_item .main_item{padding: 10px 37px 12px 12px;transition:0.3s;} |
4174 | 4188 | .off_list ul li:hover{background-color: #fffccc; } |
4175 | 4189 | .act-offer-li{opacity: 0.6; cursor: default } |
4176 | 4190 | .act-offer-li:hover{background-color: #fff !important; } |
4177 | 4191 | .off_list{ |
4178 | 4192 | position: absolute; |
4179 | - width: 100%; | |
4180 | 4193 | width: 238px; |
4181 | 4194 | background-color: white; |
4182 | 4195 | border: 1px solid #dcdcdc; |
... | ... | @@ -5286,23 +5299,6 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + |
5286 | 5299 | left: -12px; |
5287 | 5300 | width: 15px; |
5288 | 5301 | } |
5289 | - | |
5290 | -.help-block { | |
5291 | - /*width: 320px;*/ | |
5292 | - /*margin-left: -10px;*/ | |
5293 | - /*text-align: center;*/ | |
5294 | - /*position: relative;*/ | |
5295 | - /*border: 1px solid #c1c1c1;*/ | |
5296 | - /*margin-top: 25px;*/ | |
5297 | - /*box-shadow: 3px 3px 7px 0 rgba(200, 200, 200, .5), inset 0 -3px 0 0 #c1c1c1;*/ | |
5298 | - /*padding: 15px 0;*/ | |
5299 | - /*display: none;*/ | |
5300 | -} | |
5301 | -.has-error .help-block { | |
5302 | - /*display: block;*/ | |
5303 | - /*color: inherit;*/ | |
5304 | - /*background: #fff;*/ | |
5305 | -} | |
5306 | 5302 | .new-portf-add-comm .help-block{ |
5307 | 5303 | width: 230px; |
5308 | 5304 | margin-left: 0; |
... | ... | @@ -5344,7 +5340,7 @@ top: 272px; |
5344 | 5340 | margin-top: 6px; |
5345 | 5341 | margin-bottom: 60px; |
5346 | 5342 | } |
5347 | -.form-resume-wr .required:before, .site-request-password-reset .required:before{ | |
5343 | +.form-resume-wr .required:before, .site-request-password-reset .required:before, .form_site_logn-wr .required:before{ | |
5348 | 5344 | display: block; |
5349 | 5345 | content: "*"; |
5350 | 5346 | color: #D40000; |
... | ... | @@ -5356,7 +5352,7 @@ top: 272px; |
5356 | 5352 | .site-request-password-reset .required:before{ |
5357 | 5353 | left: 125px; |
5358 | 5354 | } |
5359 | -.form-resume-wr .help-block { | |
5355 | +.form-resume-wr .help-block, .form_site_logn-wr .help-block { | |
5360 | 5356 | width: 320px; |
5361 | 5357 | margin: 0; |
5362 | 5358 | text-align: center; |
... | ... | @@ -5368,12 +5364,12 @@ top: 272px; |
5368 | 5364 | padding: 15px 0; |
5369 | 5365 | display: none; |
5370 | 5366 | } |
5371 | -.form-resume-wr .has-error .help-block { | |
5367 | +.form-resume-wr .has-error .help-block, .form_site_logn-wr .has-error .help-block{ | |
5372 | 5368 | display: block; |
5373 | 5369 | color: inherit; |
5374 | 5370 | background: #fff; |
5375 | 5371 | } |
5376 | -.form-resume-wr .help-block:before { | |
5372 | +.form-resume-wr .help-block:before, .form_site_logn-wr .help-block:before { | |
5377 | 5373 | width: 20px; |
5378 | 5374 | height: 20px; |
5379 | 5375 | background: #fff; |
... | ... | @@ -5384,7 +5380,7 @@ top: 272px; |
5384 | 5380 | left: -2px; |
5385 | 5381 | margin-top: -10px; |
5386 | 5382 | } |
5387 | -.form-resume-wr .help-block:after { | |
5383 | +.form-resume-wr .help-block:after, .form_site_logn-wr .help-block:after { | |
5388 | 5384 | height: 20px; |
5389 | 5385 | background: #fff; |
5390 | 5386 | transform: rotate(45deg); |
... | ... | @@ -6641,8 +6637,8 @@ input[disabled], select[disabled] { |
6641 | 6637 | .rating_search_performer .vote-success, .rating_search_performer .vote-result { |
6642 | 6638 | display: none; |
6643 | 6639 | } |
6644 | -.rating_search_performer .vote-active { | |
6645 | - background: url("/images/stars.png") 0px 14px !important; | |
6640 | +.vote-active { | |
6641 | + top: -1px !important; | |
6646 | 6642 | } |
6647 | 6643 | .rating_search_performer .div.vote-stars, .rating_search_performer div.vote-active { |
6648 | 6644 | cursor: default; |
... | ... | @@ -6659,4 +6655,29 @@ input[disabled], select[disabled] { |
6659 | 6655 | text-align: center; |
6660 | 6656 | } |
6661 | 6657 | .right_search_perform_foto-wr {vertical-align: middle} |
6662 | -.section-box-customer .search-worker-blocks {margin-top: 20px} | |
6663 | 6658 | \ No newline at end of file |
6659 | +.section-box-customer .search-worker-blocks {margin-top: 20px} | |
6660 | +.form_site_logn-wr { | |
6661 | + width: 240px; | |
6662 | + margin: 0 auto; | |
6663 | +} | |
6664 | +.form_site_logn_ { | |
6665 | + width: 100%; | |
6666 | + padding: 30px 0; | |
6667 | + float: left; | |
6668 | + position: relative; | |
6669 | +} | |
6670 | +.form_site_logn-wr h1 { | |
6671 | + font-size: 24px; | |
6672 | + width: 100%; | |
6673 | + text-align: center; | |
6674 | +} | |
6675 | + | |
6676 | +.form_site_logn-wr .login-check-remember { | |
6677 | + margin-bottom: 19px; | |
6678 | +} | |
6679 | +.form_site_logn-wr input.custom-check + label span {margin-top: 1px; margin-right: 6px} | |
6680 | +.callback .input-blocks-wrapper {margin-top: 0} | |
6681 | +.list_item.title {margin-top: 20px} | |
6682 | +.search_customer_image { | |
6683 | + height: 100%; | |
6684 | +} | |
6664 | 6685 | \ No newline at end of file | ... | ... |
frontend/web/js/forms.js
... | ... | @@ -54,6 +54,7 @@ $(document).ready(function(){ |
54 | 54 | var newMarg = $(window).scrollTop(); |
55 | 55 | $('#overlay').fadeIn(400, |
56 | 56 | function(){ |
57 | + $('body').css({overflowY:'hidden'}) | |
57 | 58 | $('.forms-modal-hide>div') |
58 | 59 | .css({display:'block', marginTop:-230+newMarg}) |
59 | 60 | .animate({opacity: 1, top: '50%'}, 200); |
... | ... | @@ -110,6 +111,7 @@ $(document).ready(function(){ |
110 | 111 | clocseModalForms() |
111 | 112 | function clocseModalForms(){ |
112 | 113 | $('body').on('click','.closed-form, #overlay', function(){ |
114 | + $('body').css({overflowY:'visible'}) | |
113 | 115 | $('.forms-modal-hide>div') |
114 | 116 | .animate({opacity: 0, top: '30%'}, 200, |
115 | 117 | function(){ | ... | ... |