Commit 64a022e69d17e39aab76b875f1e26d299ee9dda8
Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/web/css/style.css
Showing
61 changed files
with
2029 additions
and
1106 deletions
Show diff stats
.gitignore
common/behaviors/ShowImage.php
@@ -84,4 +84,12 @@ | @@ -84,4 +84,12 @@ | ||
84 | 84 | ||
85 | } | 85 | } |
86 | 86 | ||
87 | + public function ShowAvatar($dir, $width, $height = NULL) { | ||
88 | + if(empty($dir)) { | ||
89 | + return '/images/avatar-bg.png'; | ||
90 | + } else { | ||
91 | + return $this->minImg($dir, $width, $height); | ||
92 | + } | ||
93 | + } | ||
94 | + | ||
87 | } | 95 | } |
88 | \ No newline at end of file | 96 | \ No newline at end of file |
1 | +<?php | ||
2 | + | ||
3 | +namespace common\models; | ||
4 | + | ||
5 | +use Yii; | ||
6 | +use yii\behaviors\TimestampBehavior; | ||
7 | + | ||
8 | +/** | ||
9 | + * This is the model class for table "feedback_company". | ||
10 | + * | ||
11 | + * @property integer $feedback_company_id | ||
12 | + * @property integer $date_add | ||
13 | + * @property string $name | ||
14 | + * @property string $phone | ||
15 | + * @property string $ip | ||
16 | + * @property integer $user_id | ||
17 | + * @property integer $status | ||
18 | + * | ||
19 | + * @property User $user | ||
20 | + */ | ||
21 | +class FeedbackCompany extends \yii\db\ActiveRecord | ||
22 | +{ | ||
23 | + | ||
24 | + const STATUS_NEW = 1; | ||
25 | + const STATUS_READ = 2; | ||
26 | + /** | ||
27 | + * @inheritdoc | ||
28 | + */ | ||
29 | + public static function tableName() | ||
30 | + { | ||
31 | + return 'feedback_company'; | ||
32 | + } | ||
33 | + | ||
34 | + /** | ||
35 | + * @inheritdoc | ||
36 | + */ | ||
37 | + public function rules() | ||
38 | + { | ||
39 | + return [ | ||
40 | + [['name', 'phone', 'user_id'], 'required'], | ||
41 | + [['user_id'], 'integer'], | ||
42 | + [['name', 'phone'], 'string', 'max' => 255], | ||
43 | + [['phone'], 'match', 'pattern' => '/^\+?(?:\d{0,3})?[\(\s]?\d{0,5}[\)\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2}$/'], | ||
44 | + [['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id'], 'filter' => ['type' => 2]], | ||
45 | + ]; | ||
46 | + } | ||
47 | + | ||
48 | + /** | ||
49 | + * @inheritdoc | ||
50 | + */ | ||
51 | + public function attributeLabels() | ||
52 | + { | ||
53 | + return [ | ||
54 | + 'feedback_company_id' => 'Feedback Company ID', | ||
55 | + 'date_add' => Yii::t('app', 'Feedback date add'), | ||
56 | + 'name' => Yii::t('app', 'Feedback name'), | ||
57 | + 'phone' => Yii::t('app', 'Feedback phone'), | ||
58 | + 'ip' => 'Ip', | ||
59 | + 'user_id' => 'User ID', | ||
60 | + 'status' => Yii::t('app', 'status'), | ||
61 | + ]; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * @inheritdoc | ||
66 | + */ | ||
67 | + public function behaviors() | ||
68 | + { | ||
69 | + return [ | ||
70 | + [ | ||
71 | + 'class' => TimestampBehavior::className(), | ||
72 | + 'createdAtAttribute' => 'date_add', | ||
73 | + 'updatedAtAttribute' => false, | ||
74 | + ], | ||
75 | + ]; | ||
76 | + } | ||
77 | + | ||
78 | + /** | ||
79 | + * @return \yii\db\ActiveQuery | ||
80 | + */ | ||
81 | + public function getUser() | ||
82 | + { | ||
83 | + return $this->hasOne(User::className(), ['id' => 'user_id']); | ||
84 | + } | ||
85 | +} |
1 | +<?php | ||
2 | + | ||
3 | + namespace common\models; | ||
4 | + | ||
5 | + use Yii; | ||
6 | + use yii\data\ActiveDataProvider; | ||
7 | + | ||
8 | + /** | ||
9 | + * FeedbackCompanySearch represents the model behind the search form about | ||
10 | + * `common\models\FeedbackCompany`. | ||
11 | + */ | ||
12 | + class FeedbackCompanySearch extends FeedbackCompany | ||
13 | + { | ||
14 | + | ||
15 | + public $date_add_from; | ||
16 | + | ||
17 | + public $date_add_to; | ||
18 | + | ||
19 | + /** | ||
20 | + * @inheritdoc | ||
21 | + */ | ||
22 | + public function rules() | ||
23 | + { | ||
24 | + return [ | ||
25 | + [ | ||
26 | + [ | ||
27 | + 'name', | ||
28 | + 'date_add', | ||
29 | + 'phone', | ||
30 | + 'date_add_from', | ||
31 | + 'date_add_to', | ||
32 | + ], | ||
33 | + 'safe', | ||
34 | + ], | ||
35 | + [ | ||
36 | + [ 'status' ], | ||
37 | + 'integer', | ||
38 | + ], | ||
39 | + [ | ||
40 | + 'date_add_to', | ||
41 | + 'compare', | ||
42 | + 'compareAttribute' => 'date_add_from', | ||
43 | + 'operator' => '>=', | ||
44 | + ], | ||
45 | + ]; | ||
46 | + } | ||
47 | + | ||
48 | + public function search($params) | ||
49 | + { | ||
50 | + $query = FeedbackCompany::find(); | ||
51 | + | ||
52 | + $query->where([ 'user_id' => \Yii::$app->user->id ]); | ||
53 | + | ||
54 | + $dataProvider = new ActiveDataProvider([ | ||
55 | + 'query' => $query, | ||
56 | + ]); | ||
57 | + | ||
58 | + $this->load($params); | ||
59 | + | ||
60 | + if(!$this->validate()) { | ||
61 | + return $dataProvider; | ||
62 | + } | ||
63 | + | ||
64 | + $query->andFilterWhere([ | ||
65 | + 'like', | ||
66 | + 'LOWER(name)', | ||
67 | + mb_strtolower($this->name), | ||
68 | + ]) | ||
69 | + ->andFilterWhere([ | ||
70 | + 'like', | ||
71 | + 'LOWER(phone)', | ||
72 | + mb_strtolower($this->phone), | ||
73 | + ]) | ||
74 | + ->andFilterWhere([ 'status' => $this->status ]); | ||
75 | + | ||
76 | + $date_add_from = $this->date_add_from; | ||
77 | + $date_add_to = $this->date_add_to; | ||
78 | + if(!empty( $date_add_from )) { | ||
79 | + $date_add_from = strtotime($date_add_from); | ||
80 | + } | ||
81 | + if(!empty( $date_add_to )) { | ||
82 | + $date_add_to = strtotime($date_add_to) + 86400; | ||
83 | + } | ||
84 | + if(!empty( $date_add_from ) && !empty( $date_add_to )) { | ||
85 | + $query->andWhere([ | ||
86 | + 'between', | ||
87 | + 'date_add', | ||
88 | + $date_add_from, | ||
89 | + $date_add_to, | ||
90 | + ]); | ||
91 | + } elseif(!empty( $date_add_from )) { | ||
92 | + $query->andWhere([ | ||
93 | + '>=', | ||
94 | + 'date_add', | ||
95 | + $date_add_from, | ||
96 | + ]); | ||
97 | + } elseif(!empty( $date_add_to )) { | ||
98 | + $query->andWhere([ | ||
99 | + '<=', | ||
100 | + 'date_add', | ||
101 | + $date_add_to, | ||
102 | + ]); | ||
103 | + } | ||
104 | + | ||
105 | + return $dataProvider; | ||
106 | + | ||
107 | + } | ||
108 | + } |
common/models/Gallery.php
common/models/PortfolioUser.php
@@ -136,6 +136,7 @@ | @@ -136,6 +136,7 @@ | ||
136 | $gallery = new Gallery([ | 136 | $gallery = new Gallery([ |
137 | 'user_id' => $this->user_id, | 137 | 'user_id' => $this->user_id, |
138 | 'name' => $this->portfolio->name, | 138 | 'name' => $this->portfolio->name, |
139 | + 'cover' => '/images/imageNotFound.jpg', | ||
139 | ]); | 140 | ]); |
140 | if($gallery->save()) { | 141 | if($gallery->save()) { |
141 | $portfolioGallery = new PortfolioGallery([ | 142 | $portfolioGallery = new PortfolioGallery([ |
common/models/TenderSearch.php
@@ -26,6 +26,8 @@ | @@ -26,6 +26,8 @@ | ||
26 | 26 | ||
27 | public $payment; | 27 | public $payment; |
28 | 28 | ||
29 | + public $info; | ||
30 | + | ||
29 | /** | 31 | /** |
30 | * @inheritdoc | 32 | * @inheritdoc |
31 | */ | 33 | */ |
@@ -44,6 +46,7 @@ | @@ -44,6 +46,7 @@ | ||
44 | [ | 46 | [ |
45 | 'city', | 47 | 'city', |
46 | 'payment', | 48 | 'payment', |
49 | + 'info', | ||
47 | ], | 50 | ], |
48 | 'safe', | 51 | 'safe', |
49 | ], | 52 | ], |
@@ -87,13 +90,13 @@ | @@ -87,13 +90,13 @@ | ||
87 | public function attributeLabels() | 90 | public function attributeLabels() |
88 | { | 91 | { |
89 | return [ | 92 | return [ |
90 | - 'specialization' => Yii::t('app', 'specialization'), | 93 | + 'specialization' => Yii::t('app', 'specialization'), |
91 | 'budget_currency' => Yii::t('app', 'budget_currency'), | 94 | 'budget_currency' => Yii::t('app', 'budget_currency'), |
92 | - 'contractual' => Yii::t('app', 'contractual'), | ||
93 | - 'city' => Yii::t('app', 'city'), | ||
94 | - 'payment' => Yii::t('app', 'payment'), | ||
95 | - 'budget_from' => Yii::t('app', 'budget_from'), | ||
96 | - 'budget_to' => Yii::t('app', 'budget_to'), | 95 | + 'contractual' => Yii::t('app', 'contractual'), |
96 | + 'city' => Yii::t('app', 'city'), | ||
97 | + 'payment' => Yii::t('app', 'payment'), | ||
98 | + 'budget_from' => Yii::t('app', 'budget_from'), | ||
99 | + 'budget_to' => Yii::t('app', 'budget_to'), | ||
97 | ]; | 100 | ]; |
98 | } | 101 | } |
99 | 102 | ||
@@ -196,6 +199,11 @@ | @@ -196,6 +199,11 @@ | ||
196 | 'project_payment.payment_id' => $this->payment, | 199 | 'project_payment.payment_id' => $this->payment, |
197 | 'city' => $this->city, | 200 | 'city' => $this->city, |
198 | ]) | 201 | ]) |
202 | + ->andFilterWhere([ | ||
203 | + 'like', | ||
204 | + 'LOWER(project.name)', | ||
205 | + mb_strtolower($this->info), | ||
206 | + ]) | ||
199 | ->andWhere([ | 207 | ->andWhere([ |
200 | 'project_payment.payment_id' => $this->payment, | 208 | 'project_payment.payment_id' => $this->payment, |
201 | ]); | 209 | ]); |
common/models/User.php
@@ -101,6 +101,10 @@ | @@ -101,6 +101,10 @@ | ||
101 | { | 101 | { |
102 | return [ | 102 | return [ |
103 | [ | 103 | [ |
104 | + [ 'firstname' ], | ||
105 | + 'required', | ||
106 | + ], | ||
107 | + [ | ||
104 | 'status', | 108 | 'status', |
105 | 'default', | 109 | 'default', |
106 | 'value' => self::STATUS_ACTIVE, | 110 | 'value' => self::STATUS_ACTIVE, |
@@ -467,7 +471,7 @@ | @@ -467,7 +471,7 @@ | ||
467 | array_splice($result, 2); | 471 | array_splice($result, 2); |
468 | } | 472 | } |
469 | 473 | ||
470 | - return implode(',', $result); | 474 | + return implode('', $result); |
471 | } | 475 | } |
472 | 476 | ||
473 | /** | 477 | /** |
@@ -835,11 +839,42 @@ | @@ -835,11 +839,42 @@ | ||
835 | ->scalar(); | 839 | ->scalar(); |
836 | } | 840 | } |
837 | 841 | ||
842 | + public function getNewMessagesCount() | ||
843 | + { | ||
844 | + $chats = Chat::find() | ||
845 | + ->select([ 'chat_id' ]) | ||
846 | + ->where([ | ||
847 | + 'or', | ||
848 | + [ 'from_user' => $this->id ], | ||
849 | + [ 'to_user' => $this->id ], | ||
850 | + ]) | ||
851 | + ->column(); | ||
852 | + return Message::find()->select(['chat_id'])->distinct()->where(['chat_id' => $chats, 'status' => Message::NEW_MESSAGE])->andWhere(['not', ['user_id' => $this->id]])->count(); | ||
853 | + } | ||
854 | + | ||
838 | public function getCommentProjects() | 855 | public function getCommentProjects() |
839 | { | 856 | { |
840 | return $this->hasMany(CommentProject::className(), [ 'user_id' => 'id' ]); | 857 | return $this->hasMany(CommentProject::className(), [ 'user_id' => 'id' ]); |
841 | } | 858 | } |
842 | 859 | ||
860 | + public function getCommentProjectsActive() | ||
861 | + { | ||
862 | + return $this->getCommentProjects() | ||
863 | + ->where([ | ||
864 | + 'between', | ||
865 | + 'state', | ||
866 | + CommentProject::STATE_NEW, | ||
867 | + CommentProject::STATE_PERFORMER, | ||
868 | + ]) | ||
869 | + ->andWhere([ | ||
870 | + 'status' => [ | ||
871 | + CommentProject::STATUS_ACTIVE, | ||
872 | + CommentProject::STATUS_ANONYMOUS, | ||
873 | + CommentProject::STATUS_PERSONAL, | ||
874 | + ], | ||
875 | + ]); | ||
876 | + } | ||
877 | + | ||
843 | public function getChat($user_id) | 878 | public function getChat($user_id) |
844 | { | 879 | { |
845 | return Chat::find() | 880 | return Chat::find() |
common/models/UserInfo.php
common/modules/comment/widgets/CommentWidget.php
@@ -277,6 +277,7 @@ | @@ -277,6 +277,7 @@ | ||
277 | $this->comment_class->checkRating(); | 277 | $this->comment_class->checkRating(); |
278 | if($this->comment_class->rating->load($data) && $this->comment_class->rating->save()) { | 278 | if($this->comment_class->rating->load($data) && $this->comment_class->rating->save()) { |
279 | $this->isSuccess = true; | 279 | $this->isSuccess = true; |
280 | + \Yii::$app->response->redirect(''); | ||
280 | } | 281 | } |
281 | } else { | 282 | } else { |
282 | $this->isSuccess = true; | 283 | $this->isSuccess = true; |
common/modules/comment/widgets/views/_project_comment_view.php
@@ -17,11 +17,11 @@ | @@ -17,11 +17,11 @@ | ||
17 | <div class="performer-vacancy-sidebar-left"> | 17 | <div class="performer-vacancy-sidebar-left"> |
18 | <div class="performer-vacancy-sidebar-img style"> | 18 | <div class="performer-vacancy-sidebar-img style"> |
19 | <?php | 19 | <?php |
20 | - if(!empty($user->userInfo->image)) { | ||
21 | - echo Html::img($user->userInfo->image); | ||
22 | - } else { | ||
23 | - echo Html::img('/images/avatar-bg.png'); | ||
24 | - } | 20 | + if(!empty( $user->userInfo->image )) { |
21 | + echo Html::img($user->userInfo->image); | ||
22 | + } else { | ||
23 | + echo Html::img('/images/avatar-bg.png'); | ||
24 | + } | ||
25 | ?> | 25 | ?> |
26 | </div> | 26 | </div> |
27 | <div class="performer-vacancy-sidebar-all style"> | 27 | <div class="performer-vacancy-sidebar-all style"> |
@@ -69,7 +69,9 @@ | @@ -69,7 +69,9 @@ | ||
69 | </div> | 69 | </div> |
70 | </li> | 70 | </li> |
71 | </ul> | 71 | </ul> |
72 | - <?= Html::a('Посмотреть профиль', $user->link, [ 'class' => 'tender-see-profile style', 'target' => '_blank' ]) ?> | 72 | + <?= Html::a('Посмотреть профиль', $user->link, [ 'class' => 'tender-see-profile style', |
73 | + 'target' => '_blank', | ||
74 | + ]) ?> | ||
73 | </div> | 75 | </div> |
74 | </div> | 76 | </div> |
75 | </div> | 77 | </div> |
@@ -87,9 +89,15 @@ | @@ -87,9 +89,15 @@ | ||
87 | <div class="search-worker-blocks-title-title"><?= $user->name ?></div> | 89 | <div class="search-worker-blocks-title-title"><?= $user->name ?></div> |
88 | <?php | 90 | <?php |
89 | echo StarRating::widget([ | 91 | echo StarRating::widget([ |
90 | - 'name' => 'rating_review_comment', | ||
91 | - 'value' => $user->userInfo->rating, | ||
92 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 92 | + 'name' => 'rating_review_comment', |
93 | + 'value' => $user->userInfo->rating, | ||
94 | + 'pluginOptions' => [ | ||
95 | + 'displayOnly' => true, | ||
96 | + 'size' => 'xxs', | ||
97 | + 'min' => 0, | ||
98 | + 'max' => 10, | ||
99 | + 'stars' => 10, | ||
100 | + ], | ||
93 | ]); | 101 | ]); |
94 | ?> | 102 | ?> |
95 | <?= Html::a(count($user->comments) . ' отзывов', $user->getLink('review'), [ 'class' => 'link-to-comm' ]) ?> | 103 | <?= Html::a(count($user->comments) . ' отзывов', $user->getLink('review'), [ 'class' => 'link-to-comm' ]) ?> |
@@ -104,8 +112,8 @@ | @@ -104,8 +112,8 @@ | ||
104 | <li> | 112 | <li> |
105 | <span></span> | 113 | <span></span> |
106 | <?= Html::a($file->name, $file->dir, [ | 114 | <?= Html::a($file->name, $file->dir, [ |
107 | - 'class' => 'download-link-file', | ||
108 | - 'download' => 'download' | 115 | + 'class' => 'download-link-file', |
116 | + 'download' => 'download', | ||
109 | ]) ?> | 117 | ]) ?> |
110 | <?= Html::a('Скачать', $file->dir, [ | 118 | <?= Html::a('Скачать', $file->dir, [ |
111 | 'class' => 'download-link', | 119 | 'class' => 'download-link', |
@@ -122,68 +130,68 @@ | @@ -122,68 +130,68 @@ | ||
122 | <?= Html::a('Контакты', $user->link, [ 'class' => 'get-list-new' ]) ?> | 130 | <?= Html::a('Контакты', $user->link, [ 'class' => 'get-list-new' ]) ?> |
123 | 131 | ||
124 | <?php | 132 | <?php |
125 | - if($model->status == $model::STATUS_ANONYMOUS) { | ||
126 | - echo Html::tag('div', 'Анонимное предложение', [ 'class' => 'project_status' ]); | ||
127 | - } | ||
128 | - if(\Yii::$app->user->getId() == $model->owner->user_id) { | ||
129 | - ?> | ||
130 | - <div class="project_owner_state"> | ||
131 | - <p> | ||
132 | - <?php | ||
133 | - switch($model->state) { | ||
134 | - case 1: | ||
135 | - echo 'Предложение не рассмотрено'; | ||
136 | - break; | ||
137 | - case 2: | ||
138 | - echo 'Исполнитель поставлен на рассмотрение'; | ||
139 | - break; | ||
140 | - case 3: | ||
141 | - echo 'Исполнитель назначен исполнителем'; | ||
142 | - break; | ||
143 | - case 4: | ||
144 | - echo 'Вы отказали данному исполнителю'; | ||
145 | - break; | ||
146 | - case 5: | ||
147 | - echo 'Исполнитель отказался от данного предложения'; | ||
148 | - break; | ||
149 | - } | ||
150 | - ?> | ||
151 | - </p> | ||
152 | - </div> | ||
153 | - <?php | ||
154 | - if($model->state != $model::STATE_TRASH) { | 133 | + if($model->status == $model::STATUS_ANONYMOUS) { |
134 | + echo Html::tag('div', 'Анонимное предложение', [ 'class' => 'project_status' ]); | ||
135 | + } | ||
136 | + if(\Yii::$app->user->getId() == $model->owner->user_id) { | ||
155 | ?> | 137 | ?> |
156 | - <div class="project_owner_control"> | ||
157 | - <span>Отметить как: </span> | ||
158 | - <p class="new_mark_"></p> | ||
159 | - <div> | 138 | + <div class="project_owner_state"> |
139 | + <p> | ||
160 | <?php | 140 | <?php |
161 | - echo Html::a('новый', [ '#' ], [ | ||
162 | - 'data-project-id' => $model->owner->project_id, | ||
163 | - 'data-comment-id' => $model->comment_id, | ||
164 | - 'class' => 'artbox_project_make_new'.(($model->state == $model::STATE_NEW)?' active':''), | ||
165 | - ]); | ||
166 | - echo Html::a('кандидат', [ '#' ], [ | ||
167 | - 'data-project-id' => $model->owner->project_id, | ||
168 | - 'data-comment-id' => $model->comment_id, | ||
169 | - 'class' => 'artbox_project_make_candidate'.(($model->state == $model::STATE_CANDIDATE)?' active':''), | ||
170 | - ]); | ||
171 | - echo Html::a('исполнитель', [ '#' ], [ | ||
172 | - 'data-project-id' => $model->owner->project_id, | ||
173 | - 'data-comment-id' => $model->comment_id, | ||
174 | - 'class' => 'artbox_project_make_performer'.(($model->state == $model::STATE_PERFORMER)?' active':''), | ||
175 | - ]); | ||
176 | - echo Html::a('отказать', [ '#' ], [ | ||
177 | - 'data-project-id' => $model->owner->project_id, | ||
178 | - 'data-comment-id' => $model->comment_id, | ||
179 | - 'class' => 'artbox_project_make_deny'.(($model->state == $model::STATE_DENY)?' active':''), | ||
180 | - ]); | 141 | + switch($model->state) { |
142 | + case 1: | ||
143 | + echo 'Предложение не рассмотрено'; | ||
144 | + break; | ||
145 | + case 2: | ||
146 | + echo 'Исполнитель поставлен на рассмотрение'; | ||
147 | + break; | ||
148 | + case 3: | ||
149 | + echo 'Исполнитель назначен исполнителем'; | ||
150 | + break; | ||
151 | + case 4: | ||
152 | + echo 'Вы отказали данному исполнителю'; | ||
153 | + break; | ||
154 | + case 5: | ||
155 | + echo 'Исполнитель отказался от данного предложения'; | ||
156 | + break; | ||
157 | + } | ||
181 | ?> | 158 | ?> |
182 | - </div> | 159 | + </p> |
183 | </div> | 160 | </div> |
184 | <?php | 161 | <?php |
162 | + if($model->state != $model::STATE_TRASH) { | ||
163 | + ?> | ||
164 | + <div class="project_owner_control"> | ||
165 | + <span>Отметить как: </span> | ||
166 | + <p class="new_mark_"></p> | ||
167 | + <div> | ||
168 | + <?php | ||
169 | + echo Html::a('новый', [ '#' ], [ | ||
170 | + 'data-project-id' => $model->owner->project_id, | ||
171 | + 'data-comment-id' => $model->comment_id, | ||
172 | + 'class' => 'artbox_project_make_new' . ( ( $model->state == $model::STATE_NEW ) ? ' active' : '' ), | ||
173 | + ]); | ||
174 | + echo Html::a('кандидат', [ '#' ], [ | ||
175 | + 'data-project-id' => $model->owner->project_id, | ||
176 | + 'data-comment-id' => $model->comment_id, | ||
177 | + 'class' => 'artbox_project_make_candidate' . ( ( $model->state == $model::STATE_CANDIDATE ) ? ' active' : '' ), | ||
178 | + ]); | ||
179 | + echo Html::a('исполнитель', [ '#' ], [ | ||
180 | + 'data-project-id' => $model->owner->project_id, | ||
181 | + 'data-comment-id' => $model->comment_id, | ||
182 | + 'class' => 'artbox_project_make_performer' . ( ( $model->state == $model::STATE_PERFORMER ) ? ' active' : '' ), | ||
183 | + ]); | ||
184 | + echo Html::a('отказать', [ '#' ], [ | ||
185 | + 'data-project-id' => $model->owner->project_id, | ||
186 | + 'data-comment-id' => $model->comment_id, | ||
187 | + 'class' => 'artbox_project_make_deny' . ( ( $model->state == $model::STATE_DENY ) ? ' active' : '' ), | ||
188 | + ]); | ||
189 | + ?> | ||
190 | + </div> | ||
191 | + </div> | ||
192 | + <?php | ||
193 | + } | ||
185 | } | 194 | } |
186 | - } | ||
187 | ?> | 195 | ?> |
188 | </div> | 196 | </div> |
189 | 197 |
common/modules/comment/widgets/views/_review_comment_view.php
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | * @var User $user | 15 | * @var User $user |
16 | */ | 16 | */ |
17 | $user = $model->user; | 17 | $user = $model->user; |
18 | - $model->buildButtons(['delete']); | 18 | + $model->buildButtons([ 'delete' ]); |
19 | ?> | 19 | ?> |
20 | <div class="comments-name <?= CommentWidget::$baseClass[ 'comment_author' ] ?>"> | 20 | <div class="comments-name <?= CommentWidget::$baseClass[ 'comment_author' ] ?>"> |
21 | <?= $model->getAuthor(' (Гость)') ?> | 21 | <?= $model->getAuthor(' (Гость)') ?> |
@@ -31,9 +31,14 @@ | @@ -31,9 +31,14 @@ | ||
31 | <?php | 31 | <?php |
32 | if(!empty( $model->rating )) { | 32 | if(!empty( $model->rating )) { |
33 | echo StarRating::widget([ | 33 | echo StarRating::widget([ |
34 | - 'name' => 'rating_review_comment', | ||
35 | - 'value' => $model->rating->value, | ||
36 | - 'pluginOptions' => ['displayOnly' => true] | 34 | + 'name' => 'rating_review_comment', |
35 | + 'value' => $model->rating->value, | ||
36 | + 'pluginOptions' => [ | ||
37 | + 'displayOnly' => true, | ||
38 | + 'min' => 0, | ||
39 | + 'max' => 10, | ||
40 | + 'stars' => 10, | ||
41 | + ], | ||
37 | ]); | 42 | ]); |
38 | } | 43 | } |
39 | ?> | 44 | ?> |
@@ -43,7 +48,7 @@ | @@ -43,7 +48,7 @@ | ||
43 | <div> | 48 | <div> |
44 | <?php | 49 | <?php |
45 | if(!empty( $model->buttons[ 'delete' ] )) { | 50 | if(!empty( $model->buttons[ 'delete' ] )) { |
46 | - echo Html::a(($model->user_id != NULL && $model->user_id == \Yii::$app->user->id)?'Удалить':'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); | 51 | + echo Html::a(( $model->user_id != NULL && $model->user_id == \Yii::$app->user->id ) ? 'Удалить' : 'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); |
47 | } | 52 | } |
48 | if(!empty( $model->buttons[ 'update' ] )) { | 53 | if(!empty( $model->buttons[ 'update' ] )) { |
49 | echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); | 54 | echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); |
common/modules/comment/widgets/views/form-comment-review.php
@@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
11 | use yii\web\View; | 11 | use yii\web\View; |
12 | use yii\widgets\ActiveForm; | 12 | use yii\widgets\ActiveForm; |
13 | use yii\helpers\Html; | 13 | use yii\helpers\Html; |
14 | + | ||
14 | ?> | 15 | ?> |
15 | <?php | 16 | <?php |
16 | if(!empty( $dataProvider )) { | 17 | if(!empty( $dataProvider )) { |
@@ -32,7 +33,17 @@ | @@ -32,7 +33,17 @@ | ||
32 | } | 33 | } |
33 | echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') | 34 | echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') |
34 | ->label(false) | 35 | ->label(false) |
35 | - ->widget(StarRating::className(), ['pluginOptions' => ['size'=>'xxs', 'step' => 1, 'value' => 2, 'showCaption' => false]]); | 36 | + ->widget(StarRating::className(), [ |
37 | + 'pluginOptions' => [ | ||
38 | + 'size' => 'xxs', | ||
39 | + 'step' => 1, | ||
40 | + 'value' => 2, | ||
41 | + 'showCaption' => false, | ||
42 | + 'stars' => 10, | ||
43 | + 'min' => 0, | ||
44 | + 'max' => 10, | ||
45 | + ], | ||
46 | + ]); | ||
36 | if($model->scenario == $model::SCENARIO_GUEST) { | 47 | if($model->scenario == $model::SCENARIO_GUEST) { |
37 | echo $form->field($model, 'user_name', [ | 48 | echo $form->field($model, 'user_name', [ |
38 | 'options' => [ | 49 | 'options' => [ |
@@ -56,7 +67,7 @@ | @@ -56,7 +67,7 @@ | ||
56 | if(!empty( $model->comment_pid )) { | 67 | if(!empty( $model->comment_pid )) { |
57 | echo Html::tag('div', Html::activeHiddenInput($model, 'comment_pid') . Html::tag('p', $model->parent->author, [ 'class' => 'artbox_comment_reply_author' ]), [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] ]); | 68 | echo Html::tag('div', Html::activeHiddenInput($model, 'comment_pid') . Html::tag('p', $model->parent->author, [ 'class' => 'artbox_comment_reply_author' ]), [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] ]); |
58 | } else { | 69 | } else { |
59 | - echo Html::tag('div', '', [ 'class' => CommentWidget::$baseClass[ 'reply_block' ].' test_class' ]); | 70 | + echo Html::tag('div', '', [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] . ' test_class' ]); |
60 | } | 71 | } |
61 | echo $form->field($model, 'text', [ | 72 | echo $form->field($model, 'text', [ |
62 | 'options' => [ | 73 | 'options' => [ |
common/modules/comment/widgets/views/form-comment.php
@@ -19,11 +19,16 @@ | @@ -19,11 +19,16 @@ | ||
19 | if($rating) { | 19 | if($rating) { |
20 | echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') | 20 | echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') |
21 | ->label(false) | 21 | ->label(false) |
22 | - ->widget(StarRating::className(), [ 'pluginOptions' => [ 'size' => 'xxs', | ||
23 | - 'step' => 1, | ||
24 | - 'value' => 2, | ||
25 | - 'showCaption' => false, | ||
26 | - ], | 22 | + ->widget(StarRating::className(), [ |
23 | + 'pluginOptions' => [ | ||
24 | + 'size' => 'xxs', | ||
25 | + 'step' => 1, | ||
26 | + 'value' => 2, | ||
27 | + 'showCaption' => false, | ||
28 | + 'min' => 0, | ||
29 | + 'max' => 10, | ||
30 | + 'stars' => 10, | ||
31 | + ], | ||
27 | ]); | 32 | ]); |
28 | } | 33 | } |
29 | 34 |
common/modules/comment/widgets/views/project_comment_view.php
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | ->with('userInfo') | 19 | ->with('userInfo') |
20 | ->one(); | 20 | ->one(); |
21 | } | 21 | } |
22 | - $model->buildButtons(['delete']); | 22 | + $model->buildButtons([ 'delete' ]); |
23 | ?> | 23 | ?> |
24 | <div class="new-portf-comm-read artbox_comment_container" data-key="<?= $model->comment_id ?>" data-form="<?= $model->formName() ?>"> | 24 | <div class="new-portf-comm-read artbox_comment_container" data-key="<?= $model->comment_id ?>" data-form="<?= $model->formName() ?>"> |
25 | <div class="style"> | 25 | <div class="style"> |
@@ -49,9 +49,15 @@ | @@ -49,9 +49,15 @@ | ||
49 | <?php | 49 | <?php |
50 | if($rating = $model->hasRating()) { | 50 | if($rating = $model->hasRating()) { |
51 | echo StarRating::widget([ | 51 | echo StarRating::widget([ |
52 | - 'name' => 'rating_project_comment', | ||
53 | - 'value' => $rating->value, | ||
54 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 52 | + 'name' => 'rating_project_comment', |
53 | + 'value' => $rating->value, | ||
54 | + 'pluginOptions' => [ | ||
55 | + 'displayOnly' => true, | ||
56 | + 'size' => 'xxs', | ||
57 | + 'min' => 0, | ||
58 | + 'max' => 10, | ||
59 | + 'stars' => 10, | ||
60 | + ], | ||
55 | ]); | 61 | ]); |
56 | } | 62 | } |
57 | ?> | 63 | ?> |
@@ -69,7 +75,7 @@ | @@ -69,7 +75,7 @@ | ||
69 | <div> | 75 | <div> |
70 | <?php | 76 | <?php |
71 | if(!empty( $model->buttons[ 'delete' ] )) { | 77 | if(!empty( $model->buttons[ 'delete' ] )) { |
72 | - echo Html::a(($model->user_id != NULL && $model->user_id == \Yii::$app->user->id)?'Удалить':'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); | 78 | + echo Html::a(( $model->user_id != NULL && $model->user_id == \Yii::$app->user->id ) ? 'Удалить' : 'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); |
73 | } | 79 | } |
74 | if(!empty( $model->buttons[ 'update' ] )) { | 80 | if(!empty( $model->buttons[ 'update' ] )) { |
75 | echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); | 81 | echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); |
common/modules/file/widgets/ImageUploader.php
common/modules/file/widgets/views/image_sizer.php
@@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
4 | $field_name = mb_strtolower($model->formName()) . "-" . $field; | 4 | $field_name = mb_strtolower($model->formName()) . "-" . $field; |
5 | 5 | ||
6 | $id = $model->tableSchema->primaryKey[ 0 ]; | 6 | $id = $model->tableSchema->primaryKey[ 0 ]; |
7 | - | ||
8 | ?> | 7 | ?> |
9 | <div class="file-uploader-block"> | 8 | <div class="file-uploader-block"> |
10 | <?php if(!$multi): ?> | 9 | <?php if(!$multi): ?> |
@@ -40,7 +39,6 @@ | @@ -40,7 +39,6 @@ | ||
40 | $( | 39 | $( |
41 | function() | 40 | function() |
42 | { | 41 | { |
43 | - | ||
44 | $("#<?= $field?>").fileupload( | 42 | $("#<?= $field?>").fileupload( |
45 | { | 43 | { |
46 | dataType : 'json', formData : {size : '<?= json_encode($size)?>'}, | 44 | dataType : 'json', formData : {size : '<?= json_encode($size)?>'}, |
@@ -66,7 +64,7 @@ | @@ -66,7 +64,7 @@ | ||
66 | block.append(img); | 64 | block.append(img); |
67 | block.parents('.file-uploader-block').parent() | 65 | block.parents('.file-uploader-block').parent() |
68 | .addClass('success_download'); | 66 | .addClass('success_download'); |
69 | - $("#<?=$field_name?>").val(data.result.link); | 67 | + $("#<?=$field_name?>").val(data.result.link).trigger('change'); |
70 | $("#<?=$field?>_new_img").val(data.result.link); | 68 | $("#<?=$field?>_new_img").val(data.result.link); |
71 | } | 69 | } |
72 | } | 70 | } |
@@ -90,7 +88,7 @@ | @@ -90,7 +88,7 @@ | ||
90 | { | 88 | { |
91 | } | 89 | } |
92 | ); | 90 | ); |
93 | - $("#<?=$field_name?>").val(new_url); | 91 | + $("#<?=$field_name?>").val(new_url).trigger('change'); |
94 | } | 92 | } |
95 | ); | 93 | ); |
96 | 94 | ||
@@ -101,7 +99,9 @@ | @@ -101,7 +99,9 @@ | ||
101 | .removeClass('success_download'); | 99 | .removeClass('success_download'); |
102 | $("#<?= $field?>_img_block").parent().parent().find('.admin-ava-wr') | 100 | $("#<?= $field?>_img_block").parent().parent().find('.admin-ava-wr') |
103 | .remove(); | 101 | .remove(); |
104 | - | 102 | + if($(this).hasClass('remover_image')) { |
103 | + $('#<?=$field?>_new_img').val(''); | ||
104 | + } | ||
105 | $("#<?=$field?>_buttons_block").remove(); | 105 | $("#<?=$field?>_buttons_block").remove(); |
106 | var old_url = $('#<?=$field?>_old_img').val(); | 106 | var old_url = $('#<?=$field?>_old_img').val(); |
107 | var new_url = $('#<?=$field?>_new_img').val(); | 107 | var new_url = $('#<?=$field?>_new_img').val(); |
@@ -112,10 +112,16 @@ | @@ -112,10 +112,16 @@ | ||
112 | ); | 112 | ); |
113 | <?php | 113 | <?php |
114 | if($remover) { | 114 | if($remover) { |
115 | - echo "$(\"#$field_name\").val(''); | ||
116 | - $('#{$field}_img_block').find('img').remove();"; | 115 | + echo "if(old_url.length<1 || new_url.length<1) { |
116 | + $(\"#$field_name\").val(''); | ||
117 | + $('#{$field}_img_block').find('img').remove(); | ||
118 | + } else { | ||
119 | + $(\"#$field_name\").val(old_url).trigger('change'); | ||
120 | + $('#{$field}_remove_img').append('<img src=\'/images/delete-ico.png\'>'); | ||
121 | + $('#{$field}_img_block').find('.admin-avatar-pattern').append('<img src=\"'+old_url+'\">'); | ||
122 | + }"; | ||
117 | } else { | 123 | } else { |
118 | - echo "$(\"#$field_name\").val(old_url); | 124 | + echo "$(\"#$field_name\").val(old_url).trigger('change'); |
119 | if(old_url.length<=1){ | 125 | if(old_url.length<=1){ |
120 | $('#{$field}_img_block').find('img').remove() | 126 | $('#{$field}_img_block').find('img').remove() |
121 | } | 127 | } |
common/modules/fileloader/models/Fileloader.php
@@ -46,6 +46,7 @@ class Fileloader extends \yii\db\ActiveRecord | @@ -46,6 +46,7 @@ class Fileloader extends \yii\db\ActiveRecord | ||
46 | public function rules() | 46 | public function rules() |
47 | { | 47 | { |
48 | return [ | 48 | return [ |
49 | + [['files'], 'file', 'maxSize' => 5242880], | ||
49 | [['status'], 'integer'], | 50 | [['status'], 'integer'], |
50 | [['name'], 'string', 'max' => 50], | 51 | [['name'], 'string', 'max' => 50], |
51 | [['dir'], 'string', 'max' => 255], | 52 | [['dir'], 'string', 'max' => 255], |
common/modules/fileloader/resources/handler.js
@@ -23,6 +23,7 @@ $(function() { | @@ -23,6 +23,7 @@ $(function() { | ||
23 | data.result.result.input + '<p class="fileloader-item-name">'+ | 23 | data.result.result.input + '<p class="fileloader-item-name">'+ |
24 | '<a href="'+data.result.result.file_href+'" target="_blank">'+data.result.result.file_name+'</a></p>'+'<span class="fileloader-item-remove glyphicon glyphicon-remove"></span>'+ | 24 | '<a href="'+data.result.result.file_href+'" target="_blank">'+data.result.result.file_name+'</a></p>'+'<span class="fileloader-item-remove glyphicon glyphicon-remove"></span>'+ |
25 | '</div>'; | 25 | '</div>'; |
26 | + $('#modal_form_contacts .contacts-form-help span').css({display:'none'}); | ||
26 | if(!multiple) { | 27 | if(!multiple) { |
27 | var inputs = $(wrapper).find('.fileloader-item-remove'); | 28 | var inputs = $(wrapper).find('.fileloader-item-remove'); |
28 | $.each(inputs, function(i, v) { | 29 | $.each(inputs, function(i, v) { |
@@ -36,7 +37,6 @@ $(function() { | @@ -36,7 +37,6 @@ $(function() { | ||
36 | } | 37 | } |
37 | }); | 38 | }); |
38 | } | 39 | } |
39 | - | ||
40 | $(document).on('click', '.fileloader-item-remove', function(e) { | 40 | $(document).on('click', '.fileloader-item-remove', function(e) { |
41 | var wrapper = $(this).parents('.fileloader-item-wrapper').first(); | 41 | var wrapper = $(this).parents('.fileloader-item-wrapper').first(); |
42 | var id = $(wrapper).data('id'); | 42 | var id = $(wrapper).data('id'); |
@@ -47,6 +47,7 @@ $(function() { | @@ -47,6 +47,7 @@ $(function() { | ||
47 | }, | 47 | }, |
48 | function(data) {} | 48 | function(data) {} |
49 | ); | 49 | ); |
50 | + $('#modal_form_contacts .contacts-form-help span').css({display:'block'}); | ||
50 | $(wrapper).remove(); | 51 | $(wrapper).remove(); |
51 | }); | 52 | }); |
52 | }); | 53 | }); |
common/widgets/views/phone_field.php
1 | <?php | 1 | <?php |
2 | use yii\helpers\Html; | 2 | use yii\helpers\Html; |
3 | - use yii\widgets\MaskedInput; | ||
4 | 3 | ||
5 | ?> | 4 | ?> |
6 | <fieldset> | 5 | <fieldset> |
7 | 6 | ||
8 | <div class="field_list"> | 7 | <div class="field_list"> |
9 | 8 | ||
9 | + <?php $t = 0; | ||
10 | 10 | ||
11 | - <?php $t = 0; | 11 | + $label = 0; // add this var |
12 | 12 | ||
13 | - $label = 0; // add this var | ||
14 | - | ||
15 | - for($i=1; $i <= count($model); $i++): | ||
16 | - $row = $i; | ||
17 | - | ||
18 | - ?> | ||
19 | - | ||
20 | - <?= Html::beginTag('div',['class'=>'form-group','id'=>isset($model[$i]['parent_key']) ? $model[$i]['parent_key'] : 0 ])?> | ||
21 | - <div class="input-blocks"> | ||
22 | - <label for="cont-phone-<?= ++$label ?>">Телефон</label> | ||
23 | - <input id="cont-phone-<?= $label ?>" type="tel" pattern="^\+?(?:\d{0,3})?[\(\s]?\d{0,5}[\)\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2}$" placeholder="+xx(xxx)xxx-xx-xx" class="form-control custom-input-2" value="<?= isset($model[$t]['value']) ? $model[$t]['value'] : '' ?>" name="Fields[phone][<?=$row?>][0][phone]" /> | ||
24 | - </div> | ||
25 | - <span data-id="<?= isset($model[$i]['parent_key']) ? $model[$i]['parent_key'] : 0 ?>" title="<?= Yii::t('app','add') ?>" class="glyphicon glyphicon-trash delete-field-item"></span> | ||
26 | - <?= Html::endTag('div')?> | ||
27 | - <?php $i = ++ $t; ?> | ||
28 | - <?php endfor; ?> | 13 | + for($i = 1; $i <= count($model); $i++): |
14 | + $row = $i; | ||
15 | + ?> | ||
16 | + <?= Html::beginTag('div', [ | ||
17 | + 'class' => 'form-group form-group-phone-' . ( isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ), | ||
18 | + 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, | ||
19 | + ]) ?> | ||
20 | + <div class="input-blocks"> | ||
21 | + <label for="cont-phone-<?= ++$label ?>">Телефон</label> | ||
22 | + <input id="cont-phone-<?= $label ?>" type="tel" placeholder="+xx(xxx)xxx-xx-xx" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[phone][<?= $row ?>][0][phone]"/> | ||
23 | + </div> | ||
24 | + <div class="help-block"></div> | ||
25 | + <span data-id="<?= isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ?>" title="<?= Yii::t('app', 'add') ?>" class="glyphicon glyphicon-trash delete-field-item"></span> | ||
26 | + <?php | ||
27 | + $js = " | ||
28 | + var id = 'cont-phone-" . $label . "'; | ||
29 | + $('#w0').yiiActiveForm('add', { | ||
30 | + container: '.form-group-phone-" . ( isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ) . "', | ||
31 | + error: '.help-block', | ||
32 | + id: id, | ||
33 | + input: '#'+id, | ||
34 | + name: 'Fields[phone][" . $row . "][0][phone]', | ||
35 | + validate: function(attribute, value, messages, deferred) {yii.validation.regularExpression(value, messages, {'pattern':/^\+?(?:\d{0,3})?[\(\s]?\d{0,5}[\)\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2}$/,'not':false,'message':'Телефон введен неверно . ','skipOnEmpty':1});} | ||
36 | + }); | ||
37 | + "; | ||
38 | + $this->registerJs($js, $this::POS_LOAD); | ||
39 | + ?> | ||
40 | + <?= Html::endTag('div') ?> | ||
41 | + <?php $i = ++$t; ?> | ||
42 | + <?php endfor; ?> | ||
29 | 43 | ||
30 | </div> | 44 | </div> |
31 | <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить еще</p> | 45 | <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить еще</p> |
32 | 46 | ||
33 | </fieldset> | 47 | </fieldset> |
34 | -<script> | ||
35 | - var start_i_<?=$this->context->id?> = <?=$i?>; | ||
36 | - var start_label_<?=$this->context->id?> = <?=$label?>; // add this var | ||
37 | - $( document ).ready(function(){ | ||
38 | - $('.add_field_<?=$this->context->id?>').click(function(){ | ||
39 | - var block = $ (this) | ||
40 | - .siblings('.field_list'); | ||
41 | - var block_id = $(this).parent('fieldset'); | ||
42 | - var sub_block = '<div class="form-group" >'+ | ||
43 | - '<div class="input-blocks">'+ | ||
44 | - '<label for="cont-phone-' + ++start_label_<?=$this->context->id?> +'">Телефон</label>'+ | ||
45 | - '<input id="cont-phone-' + start_label_<?=$this->context->id?> +'" type="tel" pattern="^\\+?(?:\\d{0,3})?[\\(\\s]?\\d{0,5}[\\)\\s]?\\d{3}[-\\s]?\\d{2}[-\\s]?\\d{2}$" placeholder="+xx(xxx)xxx-xx-xx" class="form-control custom-input-2" value="" name="Fields[phone]['+ start_i_<?=$this->context->id?>++ +'][0][phone]" />'+ | ||
46 | - '</div>'+ | ||
47 | - '<span class="glyphicon glyphicon-trash delete-field-item custom-remove-ico"></span>'+ | ||
48 | - '<div>'; | ||
49 | -// console.log(block); | ||
50 | - block.append(sub_block); | ||
51 | - | ||
52 | - }); | ||
53 | - }); | ||
54 | -</script> | 48 | +<?php |
49 | + $js = " | ||
50 | + var start_i_" . $this->context->id . " = " . $i . "; | ||
51 | + var start_label_" . $this->context->id . " = " . $label . "; | ||
52 | + $(document).on('click', '.add_field_" . $this->context->id . "', function() { | ||
53 | + var block = $(this) | ||
54 | + .siblings('.field_list'); | ||
55 | + var block_id = $(this).parent('fieldset'); | ||
56 | + ++start_label_" . $this->context->id . "; | ||
57 | + var sub_block = '<div class=\"form-group form-group-phone-'+start_label_" . $this->context->id . "+'\" >' + '<div class=\"input-blocks\">' + '<label for=\"cont-phone-' + start_label_" . $this->context->id . " + '\">Телефон</label>' + '<input id=\"cont-phone-' + start_label_" . $this->context->id . " + '\" type=\"tel\" placeholder=\"+xx(xxx)xxx-xx-xx\" class=\"form-control custom-input-2\" value=\"\" name=\"Fields[phone][' + start_i_" . $this->context->id . "++ + '][0][phone]\" />' + '</div><div class=\"help-block\"></div><span class=\"glyphicon glyphicon-trash delete-field-item custom-remove-ico\"></span>' + '<div>'; | ||
58 | + block.append(sub_block); | ||
59 | + $('#w0').yiiActiveForm('add', { | ||
60 | + container: '.form-group-phone-'+start_label_" . $this->context->id . ", | ||
61 | + error: '.help-block', | ||
62 | + id: 'cont-phone-'+start_label_" . $this->context->id . ", | ||
63 | + input: '#cont-phone-'+start_label_" . $this->context->id . ", | ||
64 | + name: 'Fields[phone][' + start_label_" . $this->context->id . "++ + '][0][phone]', | ||
65 | + validate: function(attribute, value, messages, deferred) {yii.validation.regularExpression(value, messages, {'pattern':/^\+?(?:\d{0,3})?[\(\s]?\d{0,5}[\)\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2}$/,'not':false,'message':'Телефон введен неверно . ','skipOnEmpty':1});} | ||
66 | + }); | ||
67 | + }); | ||
68 | + "; | ||
69 | + $this->registerJs($js, $this::POS_LOAD); | ||
70 | +?> | ||
55 | 71 | ||
56 | 72 |
common/widgets/views/site_field.php
1 | <?php | 1 | <?php |
2 | -use yii\behaviors\SluggableBehavior; | ||
3 | -use yii\helpers\Html; | 2 | + use yii\helpers\Html; |
4 | 3 | ||
5 | ?> | 4 | ?> |
6 | <fieldset> | 5 | <fieldset> |
7 | 6 | ||
8 | - | ||
9 | <div class="field_list"> | 7 | <div class="field_list"> |
10 | 8 | ||
9 | + <?php $t = 0; | ||
11 | 10 | ||
12 | - <?php $t = 0; | ||
13 | - | ||
14 | - $label = 0; | ||
15 | - | ||
16 | - for($i=1; $i <= count($model); $i++): | ||
17 | - $row = $i; | 11 | + $label = 0; |
18 | 12 | ||
19 | - ?> | ||
20 | - | ||
21 | - <?= Html::beginTag('div',['class'=>'form-group','id'=>isset($model[$i]['parent_key']) ? $model[$i]['parent_key'] : 0 ])?> | ||
22 | - <div class="input-blocks"> | ||
23 | - <label for="cont-site-<?= ++$label ?>">Сайт</label> | ||
24 | - <input id="cont-site-<?= $label ?>" type="url" placeholder="http://" class="form-control custom-input-2" value="<?= isset($model[$t]['value']) ? $model[$t]['value'] : '' ?>" name="Fields[site][<?=$row?>][0][site]" /> | ||
25 | - </div> | ||
26 | - <span data-id="<?= isset($model[$i]['parent_key']) ? $model[$i]['parent_key'] : 0 ?>" title="<?= Yii::t('app','add') ?>" class="glyphicon glyphicon-trash delete-field-item"></span> | ||
27 | - <?= Html::endTag('div')?> | ||
28 | - <?php $i = ++ $t; ?> | ||
29 | - <?php endfor; ?> | 13 | + for($i = 1; $i <= count($model); $i++): |
14 | + $row = $i; | ||
15 | + ?> | ||
16 | + <?= Html::beginTag('div', [ | ||
17 | + 'class' => 'form-group form-group-site-'. ( isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ), | ||
18 | + 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, | ||
19 | + ]) ?> | ||
20 | + <div class="input-blocks"> | ||
21 | + <label for="cont-site-<?= ++$label ?>">Сайт</label> | ||
22 | + <input id="cont-site-<?= $label ?>" type="text" placeholder="http://" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[site][<?= $row ?>][0][site]"/> | ||
23 | + </div> | ||
24 | + <div class="help-block"></div> | ||
25 | + <span data-id="<?= isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ?>" title="<?= Yii::t('app', 'add') ?>" class="glyphicon glyphicon-trash delete-field-item"></span> | ||
26 | + <?php | ||
27 | + $js = " | ||
28 | + var id = 'cont-site-" . $label . "'; | ||
29 | + $('#w0').yiiActiveForm('add', { | ||
30 | + container: '.form-group-site-" . ( isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ) . "', | ||
31 | + error: '.help-block', | ||
32 | + id: id, | ||
33 | + input: '#'+id, | ||
34 | + name: 'Fields[site][" . $row . "][0][site]', | ||
35 | + validate: function(attribute, value, messages, deferred) {yii.validation.url(value, messages, {\"pattern\":/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(?::\d{1,5})?(?:$|[?\/#])/i,\"message\":\"Введенный адрес не является правильным URL.\",\"enableIDN\":false,\"skipOnEmpty\":1});} | ||
36 | + }); | ||
37 | + "; | ||
38 | + $this->registerJs($js, $this::POS_LOAD); | ||
39 | + ?> | ||
40 | + <?= Html::endTag('div') ?> | ||
41 | + <?php $i = ++$t; ?> | ||
42 | + <?php endfor; ?> | ||
30 | </div> | 43 | </div> |
31 | - <p class="btn btn-success add_field_<?= $this->context->id ?>"><?= Yii::t('app','add_more') ?></p> | 44 | + <p class="btn btn-success add_field_<?= $this->context->id ?>"><?= Yii::t('app', 'add_more') ?></p> |
32 | 45 | ||
33 | </fieldset> | 46 | </fieldset> |
34 | -<script> | ||
35 | - var start_i_<?=$this->context->id?> = <?=$i?>; | ||
36 | - var start_label_<?=$this->context->id?> = <?=$label?>; // add this var | ||
37 | - $( document ).ready(function(){ | ||
38 | - $('.add_field_<?=$this->context->id?>').click(function(){ | ||
39 | - var block = $ (this) | ||
40 | - .siblings('.field_list'); | ||
41 | - var block_id = $(this).parent('fieldset'); | ||
42 | - var sub_block = '<div class="form-group" >'+ | ||
43 | - | ||
44 | - '<div class="input-blocks">'+ | ||
45 | - '<label for="cont-site-' + ++start_label_<?=$this->context->id?> +'">Сайт</label>'+ | ||
46 | - '<input id="cont-site-' + start_label_<?=$this->context->id?> +'" type="url" placeholder="http://" class="form-control custom-input-2" value="" name="Fields[site]['+ start_i_<?=$this->context->id?>++ +'][0][site]" />'+ | ||
47 | - '</div>'+ | ||
48 | - '<span title="<?= Yii::t('app','add') ?>" class="glyphicon glyphicon-trash delete-field-item"></span>'+ | ||
49 | - '<div>'; | ||
50 | - block.append(sub_block); | ||
51 | - | ||
52 | - }); | ||
53 | - }); | ||
54 | -</script> | 47 | +<?php |
48 | + $js = " | ||
49 | + var start_i_" . $this->context->id . " = " . $i . "; | ||
50 | + var start_label_" . $this->context->id . " = " . $label . "; | ||
51 | + $(document).on('click', '.add_field_" . $this->context->id . "', function() { | ||
52 | + var block = $(this) | ||
53 | + .siblings('.field_list'); | ||
54 | + var block_id = $(this).parent('fieldset'); | ||
55 | + ++start_label_" . $this->context->id . "; | ||
56 | + var sub_block = '<div class=\"form-group form-group-site-'+start_label_" . $this->context->id . "+'\" >' + '<div class=\"input-blocks\">' + '<label for=\"cont-site-' + start_label_" . $this->context->id . " + '\">Сайт</label>' + '<input id=\"cont-site-' + start_label_" . $this->context->id . " + '\" type=\"text\" placeholder=\"http://\" class=\"form-control custom-input-2\" value=\"\" name=\"Fields[site][' + start_i_" . $this->context->id . "++ + '][0][site]\" />' + '</div><div class=\"help-block\"></div><span class=\"glyphicon glyphicon-trash delete-field-item custom-remove-ico\"></span>' + '<div>'; | ||
57 | + block.append(sub_block); | ||
58 | + $('#w0').yiiActiveForm('add', { | ||
59 | + container: '.form-group-site-'+start_label_" . $this->context->id . ", | ||
60 | + error: '.help-block', | ||
61 | + id: 'cont-site-'+start_label_" . $this->context->id . ", | ||
62 | + input: '#cont-site-'+start_label_" . $this->context->id . ", | ||
63 | + name: 'Fields[site][' + start_label_" . $this->context->id . "++ + '][0][site]', | ||
64 | + validate: function(attribute, value, messages, deferred) {yii.validation.url(value, messages, {\"pattern\":/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(?::\d{1,5})?(?:$|[?\/#])/i,\"message\":\"Введенный адрес не является правильным URL.\",\"enableIDN\":false,\"skipOnEmpty\":1});} | ||
65 | + }); | ||
66 | + }); | ||
67 | + "; | ||
68 | + $this->registerJs($js, $this::POS_LOAD); | ||
69 | +?> | ||
55 | 70 | ||
56 | 71 |
console/migrations/m160519_124222_create_feedback_company.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +/** | ||
6 | + * Handles the creation for table `feedback_company`. | ||
7 | + */ | ||
8 | +class m160519_124222_create_feedback_company extends Migration | ||
9 | +{ | ||
10 | + /** | ||
11 | + * @inheritdoc | ||
12 | + */ | ||
13 | + public function up() | ||
14 | + { | ||
15 | + $this->createTable('feedback_company', [ | ||
16 | + 'feedback_company_id' => $this->primaryKey(), | ||
17 | + 'date_add' => $this->integer()->notNull(), | ||
18 | + 'name' => $this->string()->notNull(), | ||
19 | + 'phone' => $this->string()->notNull(), | ||
20 | + 'ip' => $this->string()->notNull(), | ||
21 | + 'user_id' => $this->integer()->notNull(), | ||
22 | + 'status' => $this->integer()->notNull()->defaultValue(1), | ||
23 | + ]); | ||
24 | + | ||
25 | + $this->addForeignKey('feedback_company_user', '{{%feedback_company}}', 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE'); | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * @inheritdoc | ||
30 | + */ | ||
31 | + public function down() | ||
32 | + { | ||
33 | + $this->dropForeignKey('feedback_company_user', '{{%feedback_company}}'); | ||
34 | + $this->dropTable('feedback_company'); | ||
35 | + } | ||
36 | +} |
frontend/controllers/AccountsController.php
@@ -8,6 +8,8 @@ | @@ -8,6 +8,8 @@ | ||
8 | use common\models\Currency; | 8 | use common\models\Currency; |
9 | use common\models\Department; | 9 | use common\models\Department; |
10 | use common\models\Employment; | 10 | use common\models\Employment; |
11 | + use common\models\FeedbackCompany; | ||
12 | + use common\models\FeedbackCompanySearch; | ||
11 | use common\models\Fields; | 13 | use common\models\Fields; |
12 | use common\models\File; | 14 | use common\models\File; |
13 | use common\models\Gallery; | 15 | use common\models\Gallery; |
@@ -40,6 +42,7 @@ | @@ -40,6 +42,7 @@ | ||
40 | use yii\filters\VerbFilter; | 42 | use yii\filters\VerbFilter; |
41 | use yii\web\Controller; | 43 | use yii\web\Controller; |
42 | use yii\web\NotFoundHttpException; | 44 | use yii\web\NotFoundHttpException; |
45 | + use yii\web\Response; | ||
43 | use yii\web\UploadedFile; | 46 | use yii\web\UploadedFile; |
44 | 47 | ||
45 | /** | 48 | /** |
@@ -59,7 +62,6 @@ | @@ -59,7 +62,6 @@ | ||
59 | 'class' => AccessControl::className(), | 62 | 'class' => AccessControl::className(), |
60 | 'rules' => [ | 63 | 'rules' => [ |
61 | [ | 64 | [ |
62 | - //'actions' => ['cabinet','change-password', 'bookmarks', 'projects'], | ||
63 | 'allow' => true, | 65 | 'allow' => true, |
64 | 'roles' => [ '@' ], | 66 | 'roles' => [ '@' ], |
65 | ], | 67 | ], |
@@ -74,6 +76,8 @@ | @@ -74,6 +76,8 @@ | ||
74 | 'projects-delete' => [ 'POST' ], | 76 | 'projects-delete' => [ 'POST' ], |
75 | 'blog-delete' => [ 'POST' ], | 77 | 'blog-delete' => [ 'POST' ], |
76 | 'gallery-cover' => [ 'POST' ], | 78 | 'gallery-cover' => [ 'POST' ], |
79 | + 'feedback-delete' => [ 'POST' ], | ||
80 | + 'feedback-read' => [ 'POST' ], | ||
77 | ], | 81 | ], |
78 | ], | 82 | ], |
79 | ]; | 83 | ]; |
@@ -87,7 +91,14 @@ | @@ -87,7 +91,14 @@ | ||
87 | 'status' => 2, | 91 | 'status' => 2, |
88 | ]) | 92 | ]) |
89 | ->count(); | 93 | ->count(); |
94 | + $feedback_company_count = FeedbackCompany::find() | ||
95 | + ->where([ | ||
96 | + 'user_id' => \Yii::$app->user->id, | ||
97 | + 'status' => FeedbackCompany::STATUS_NEW, | ||
98 | + ]) | ||
99 | + ->count(); | ||
90 | $this->view->params[ 'portfolio_user_count' ] = $portfolio_user_count; | 100 | $this->view->params[ 'portfolio_user_count' ] = $portfolio_user_count; |
101 | + $this->view->params[ 'feedback_company_count' ] = $feedback_company_count; | ||
91 | return parent::beforeAction($action); // TODO: Change the autogenerated stub | 102 | return parent::beforeAction($action); // TODO: Change the autogenerated stub |
92 | } | 103 | } |
93 | 104 | ||
@@ -288,6 +299,86 @@ | @@ -288,6 +299,86 @@ | ||
288 | } | 299 | } |
289 | 300 | ||
290 | /** | 301 | /** |
302 | + * Page of Company feedback | ||
303 | + * @return string | ||
304 | + */ | ||
305 | + public function actionFeedbackCompany() | ||
306 | + { | ||
307 | + $searchModel = new FeedbackCompanySearch(); | ||
308 | + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | ||
309 | + $dataProvider->pagination = [ | ||
310 | + 'pageSize' => 20, | ||
311 | + ]; | ||
312 | + $dataProvider->sort = new Sort([ | ||
313 | + 'defaultOrder' => [ | ||
314 | + 'status' => SORT_ASC, | ||
315 | + 'date_add' => SORT_DESC, | ||
316 | + ], | ||
317 | + ]); | ||
318 | + | ||
319 | + return $this->render('feedback-company', [ | ||
320 | + 'searchModel' => $searchModel, | ||
321 | + 'dataProvider' => $dataProvider, | ||
322 | + ]); | ||
323 | + } | ||
324 | + | ||
325 | + /** | ||
326 | + * Delete company feedback | ||
327 | + * | ||
328 | + * @param int $id | ||
329 | + * | ||
330 | + * @return Response | ||
331 | + * @throws NotFoundHttpException | ||
332 | + * @throws \Exception | ||
333 | + */ | ||
334 | + public function actionFeedbackDelete($id) | ||
335 | + { | ||
336 | + $model = FeedbackCompany::find() | ||
337 | + ->where([ | ||
338 | + 'feedback_company_id' => $id, | ||
339 | + 'user_id' => \Yii::$app->user->id, | ||
340 | + ]) | ||
341 | + ->one(); | ||
342 | + | ||
343 | + if(empty( $model )) { | ||
344 | + throw new NotFoundHttpException('Заявка не найдена'); | ||
345 | + } else { | ||
346 | + $model->delete(); | ||
347 | + return $this->redirect([ 'accounts/feedback-company' ]); | ||
348 | + } | ||
349 | + } | ||
350 | + | ||
351 | + /** | ||
352 | + * Mark feedback as read | ||
353 | + * | ||
354 | + * @param int $id | ||
355 | + * | ||
356 | + * @return Response | ||
357 | + * @throws NotFoundHttpException | ||
358 | + */ | ||
359 | + public function actionFeedbackRead($id) | ||
360 | + { | ||
361 | + $model = FeedbackCompany::find() | ||
362 | + ->where([ | ||
363 | + 'feedback_company_id' => $id, | ||
364 | + 'user_id' => \Yii::$app->user->id, | ||
365 | + ]) | ||
366 | + ->andWhere([ | ||
367 | + 'not', | ||
368 | + [ 'status' => FeedbackCompany::STATUS_READ ], | ||
369 | + ]) | ||
370 | + ->one(); | ||
371 | + | ||
372 | + if(empty( $model )) { | ||
373 | + throw new NotFoundHttpException('Заявка не найдена'); | ||
374 | + } else { | ||
375 | + $model->status = FeedbackCompany::STATUS_READ; | ||
376 | + $model->save(false); | ||
377 | + return $this->redirect([ 'accounts/feedback-company' ]); | ||
378 | + } | ||
379 | + } | ||
380 | + | ||
381 | + /** | ||
291 | * Page of User's image galleries | 382 | * Page of User's image galleries |
292 | * @return string | 383 | * @return string |
293 | */ | 384 | */ |
@@ -1041,7 +1132,7 @@ | @@ -1041,7 +1132,7 @@ | ||
1041 | $user->new_password = $post[ 'new_password' ]; | 1132 | $user->new_password = $post[ 'new_password' ]; |
1042 | } | 1133 | } |
1043 | if(empty( $post[ 'old_password' ] )) { | 1134 | if(empty( $post[ 'old_password' ] )) { |
1044 | - $user->addError('old_password', 'Введите новый пароль'); | 1135 | + $user->addError('old_password', 'Введите старый пароль'); |
1045 | } else { | 1136 | } else { |
1046 | $user->old_password = $post[ 'old_password' ]; | 1137 | $user->old_password = $post[ 'old_password' ]; |
1047 | } | 1138 | } |
frontend/controllers/AjaxController.php
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | namespace frontend\controllers; | 2 | namespace frontend\controllers; |
3 | 3 | ||
4 | use common\models\Feedback; | 4 | use common\models\Feedback; |
5 | + use common\models\FeedbackCompany; | ||
5 | use common\models\Portfolio; | 6 | use common\models\Portfolio; |
6 | use common\models\PortfolioUser; | 7 | use common\models\PortfolioUser; |
7 | use common\models\User; | 8 | use common\models\User; |
@@ -27,6 +28,9 @@ | @@ -27,6 +28,9 @@ | ||
27 | public function actionProjectUser() | 28 | public function actionProjectUser() |
28 | { | 29 | { |
29 | $ids = json_decode(\Yii::$app->request->get('ids')); | 30 | $ids = json_decode(\Yii::$app->request->get('ids')); |
31 | + if(!empty(\Yii::$app->user->id)) { | ||
32 | + array_push($ids, \Yii::$app->user->id); | ||
33 | + } | ||
30 | $model = new UserSearch(); | 34 | $model = new UserSearch(); |
31 | $dataProvider = $model->search(\Yii::$app->request->queryParams); | 35 | $dataProvider = $model->search(\Yii::$app->request->queryParams); |
32 | $dataProvider->query->andFilterWhere([ | 36 | $dataProvider->query->andFilterWhere([ |
@@ -185,4 +189,18 @@ | @@ -185,4 +189,18 @@ | ||
185 | return ['error' => 'Error detected', 'result' => ['form' => $form]]; | 189 | return ['error' => 'Error detected', 'result' => ['form' => $form]]; |
186 | } | 190 | } |
187 | 191 | ||
192 | + public function actionFeedbackCompany() | ||
193 | + { | ||
194 | + $request = \Yii::$app->request; | ||
195 | + $response = \Yii::$app->response; | ||
196 | + $response->format = $response::FORMAT_JSON; | ||
197 | + $model = new FeedbackCompany(['ip' => $request->userIP]); | ||
198 | + if($model->load($request->post())) { | ||
199 | + if($model->save()) { | ||
200 | + return ['result' => ['message' => 'Вопрос успешно отправлен, представители компании свяжутся с Вами в ближайшее время']]; | ||
201 | + } | ||
202 | + } | ||
203 | + return ['error' => 'Ошибка формы']; | ||
204 | + } | ||
205 | + | ||
188 | } | 206 | } |
frontend/controllers/CompanyController.php
@@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
16 | use yii\data\ArrayDataProvider; | 16 | use yii\data\ArrayDataProvider; |
17 | use yii\data\Pagination; | 17 | use yii\data\Pagination; |
18 | use yii\data\Sort; | 18 | use yii\data\Sort; |
19 | + use yii\db\ActiveQuery; | ||
19 | use yii\helpers\ArrayHelper; | 20 | use yii\helpers\ArrayHelper; |
20 | use yii\web\BadRequestHttpException; | 21 | use yii\web\BadRequestHttpException; |
21 | use yii\web\Controller; | 22 | use yii\web\Controller; |
@@ -38,6 +39,19 @@ | @@ -38,6 +39,19 @@ | ||
38 | $company_id = $action->controller->actionParams[ 'company_id' ]; | 39 | $company_id = $action->controller->actionParams[ 'company_id' ]; |
39 | $user = User::findOne($company_id); | 40 | $user = User::findOne($company_id); |
40 | if(!empty( $user->userInfo )) { | 41 | if(!empty( $user->userInfo )) { |
42 | + if($user->userInfo->is_freelancer xor $user->userInfo->is_customer) { | ||
43 | + $type = $action->controller->actionParams['type']; | ||
44 | + $get = \Yii::$app->request->get(); | ||
45 | + if(!empty($type)) { | ||
46 | + if($user->userInfo->is_freelancer && $type == 'customer') { | ||
47 | + $get['type'] = 'implementer'; | ||
48 | + $this->redirect(array_merge([$action->id], $get)); | ||
49 | + } elseif($user->userInfo->is_customer && $type == 'implementer') { | ||
50 | + $get['type'] = 'customer'; | ||
51 | + $this->redirect(array_merge([$action->id], $get)); | ||
52 | + } | ||
53 | + } | ||
54 | + } | ||
41 | $user->userInfo->updateCounters([ 'view_count' => 1 ]); | 55 | $user->userInfo->updateCounters([ 'view_count' => 1 ]); |
42 | } | 56 | } |
43 | } | 57 | } |
@@ -178,7 +192,7 @@ | @@ -178,7 +192,7 @@ | ||
178 | 'pagination' => [ | 192 | 'pagination' => [ |
179 | 'pageSize' => 9, | 193 | 'pageSize' => 9, |
180 | ], | 194 | ], |
181 | - 'sort' => new Sort([ | 195 | + 'sort' => new Sort([ |
182 | 'defaultOrder' => [ | 196 | 'defaultOrder' => [ |
183 | 'portfolio_id' => SORT_DESC, | 197 | 'portfolio_id' => SORT_DESC, |
184 | ], | 198 | ], |
@@ -248,15 +262,36 @@ | @@ -248,15 +262,36 @@ | ||
248 | $user = User::findOne($company_id); | 262 | $user = User::findOne($company_id); |
249 | $portfolio = $user->getPortfolios() | 263 | $portfolio = $user->getPortfolios() |
250 | ->where([ 'portfolio_id' => $portfolio_id ]) | 264 | ->where([ 'portfolio_id' => $portfolio_id ]) |
251 | - ->with('portfolioUsers') | 265 | + ->with([ |
266 | + 'portfolioUsers' => function($query) { | ||
267 | + /** | ||
268 | + * @var ActiveQuery $query | ||
269 | + */ | ||
270 | + $query->andWhere([ 'status' => 1 ]); | ||
271 | + }, | ||
272 | + ]) | ||
252 | ->with('portfolioUsers.gallery') | 273 | ->with('portfolioUsers.gallery') |
253 | ->one(); | 274 | ->one(); |
275 | + if(empty($portfolio)) { | ||
276 | + throw new NotFoundHttpException('Портфолио не найдено'); | ||
277 | + } | ||
254 | if(!empty( $portfolio_user )) { | 278 | if(!empty( $portfolio_user )) { |
255 | $portfolio_user = PortfolioUser::find() | 279 | $portfolio_user = PortfolioUser::find() |
256 | - ->where([ 'portfolio_user_id' => $portfolio_user ]) | 280 | + ->where([ |
281 | + 'portfolio_user_id' => $portfolio_user, | ||
282 | + 'status' => 1, | ||
283 | + ]) | ||
257 | ->with('gallery') | 284 | ->with('gallery') |
258 | ->with('user') | 285 | ->with('user') |
259 | ->one(); | 286 | ->one(); |
287 | + if(empty( $portfolio_user )) { | ||
288 | + $this->redirect([ | ||
289 | + 'portfolio-view', | ||
290 | + 'performer_id' => $company_id, | ||
291 | + 'portfolio_id' => $portfolio_id, | ||
292 | + 'type' => $type, | ||
293 | + ]); | ||
294 | + } | ||
260 | } else { | 295 | } else { |
261 | $portfolio->updateCounters([ 'view_count' => 1 ]); | 296 | $portfolio->updateCounters([ 'view_count' => 1 ]); |
262 | } | 297 | } |
@@ -328,7 +363,6 @@ | @@ -328,7 +363,6 @@ | ||
328 | if(!$company instanceof User) { | 363 | if(!$company instanceof User) { |
329 | throw new BadRequestHttpException('Пользователь не найден'); | 364 | throw new BadRequestHttpException('Пользователь не найден'); |
330 | } | 365 | } |
331 | - | ||
332 | $article = Blog::find() | 366 | $article = Blog::find() |
333 | ->where([ | 367 | ->where([ |
334 | 'link' => $link, | 368 | 'link' => $link, |
@@ -336,6 +370,9 @@ | @@ -336,6 +370,9 @@ | ||
336 | ]) | 370 | ]) |
337 | ->with('comments') | 371 | ->with('comments') |
338 | ->one(); | 372 | ->one(); |
373 | + if(empty($article)) { | ||
374 | + throw new NotFoundHttpException('Запись не найдена'); | ||
375 | + } | ||
339 | $article->updateCounters([ 'view_count' => 1 ]); | 376 | $article->updateCounters([ 'view_count' => 1 ]); |
340 | 377 | ||
341 | return $this->render('blog-view', [ | 378 | return $this->render('blog-view', [ |
@@ -349,6 +386,10 @@ | @@ -349,6 +386,10 @@ | ||
349 | { | 386 | { |
350 | $company = User::findOne($company_id); | 387 | $company = User::findOne($company_id); |
351 | 388 | ||
389 | + if(empty($company)) { | ||
390 | + throw new NotFoundHttpException('Company not found'); | ||
391 | + } | ||
392 | + | ||
352 | return $this->render('review', [ | 393 | return $this->render('review', [ |
353 | 'company' => $company, | 394 | 'company' => $company, |
354 | ]); | 395 | ]); |
frontend/controllers/PerformerController.php
@@ -12,10 +12,12 @@ | @@ -12,10 +12,12 @@ | ||
12 | use yii\data\ArrayDataProvider; | 12 | use yii\data\ArrayDataProvider; |
13 | use yii\data\Pagination; | 13 | use yii\data\Pagination; |
14 | use yii\data\Sort; | 14 | use yii\data\Sort; |
15 | + use yii\db\ActiveQuery; | ||
15 | use yii\helpers\ArrayHelper; | 16 | use yii\helpers\ArrayHelper; |
16 | use yii\web\BadRequestHttpException; | 17 | use yii\web\BadRequestHttpException; |
17 | use yii\web\Controller; | 18 | use yii\web\Controller; |
18 | use common\models\User; | 19 | use common\models\User; |
20 | + use yii\web\NotFoundHttpException; | ||
19 | 21 | ||
20 | /** | 22 | /** |
21 | * Site controller | 23 | * Site controller |
@@ -35,6 +37,19 @@ | @@ -35,6 +37,19 @@ | ||
35 | $performer_id = $action->controller->actionParams[ 'performer_id' ]; | 37 | $performer_id = $action->controller->actionParams[ 'performer_id' ]; |
36 | $user = User::findOne($performer_id); | 38 | $user = User::findOne($performer_id); |
37 | if(!empty( $user->userInfo )) { | 39 | if(!empty( $user->userInfo )) { |
40 | + if($user->userInfo->is_freelancer xor $user->userInfo->is_customer) { | ||
41 | + $type = $action->controller->actionParams['type']; | ||
42 | + $get = \Yii::$app->request->get(); | ||
43 | + if(!empty($type)) { | ||
44 | + if($user->userInfo->is_freelancer && $type == 'customer') { | ||
45 | + $get['type'] = 'implementer'; | ||
46 | + $this->redirect(array_merge([$action->id], $get)); | ||
47 | + } elseif($user->userInfo->is_customer && $type == 'implementer') { | ||
48 | + $get['type'] = 'customer'; | ||
49 | + $this->redirect(array_merge([$action->id], $get)); | ||
50 | + } | ||
51 | + } | ||
52 | + } | ||
38 | $user->userInfo->updateCounters([ 'view_count' => 1 ]); | 53 | $user->userInfo->updateCounters([ 'view_count' => 1 ]); |
39 | } | 54 | } |
40 | } | 55 | } |
@@ -67,7 +82,7 @@ | @@ -67,7 +82,7 @@ | ||
67 | ->one(); | 82 | ->one(); |
68 | 83 | ||
69 | if(!$user instanceof User) { | 84 | if(!$user instanceof User) { |
70 | - throw new BadRequestHttpException('Пользователь не найден'); | 85 | + throw new NotFoundHttpException('Пользователь не найден'); |
71 | } | 86 | } |
72 | 87 | ||
73 | $educations = Fields::getData($user->id, $user->className(), 'education'); | 88 | $educations = Fields::getData($user->id, $user->className(), 'education'); |
@@ -182,15 +197,36 @@ | @@ -182,15 +197,36 @@ | ||
182 | $user = User::findOne($performer_id); | 197 | $user = User::findOne($performer_id); |
183 | $portfolio = $user->getPortfolios() | 198 | $portfolio = $user->getPortfolios() |
184 | ->where([ 'portfolio_id' => $portfolio_id ]) | 199 | ->where([ 'portfolio_id' => $portfolio_id ]) |
185 | - ->with('portfolioUsers') | 200 | + ->with([ |
201 | + 'portfolioUsers' => function($query) { | ||
202 | + /** | ||
203 | + * @var ActiveQuery $query | ||
204 | + */ | ||
205 | + $query->andWhere([ 'status' => 1 ]); | ||
206 | + }, | ||
207 | + ]) | ||
186 | ->with('portfolioUsers.gallery') | 208 | ->with('portfolioUsers.gallery') |
187 | ->one(); | 209 | ->one(); |
210 | + if(empty($portfolio)) { | ||
211 | + throw new NotFoundHttpException('Портфолио не найдено'); | ||
212 | + } | ||
188 | if(!empty( $portfolio_user )) { | 213 | if(!empty( $portfolio_user )) { |
189 | $portfolio_user = PortfolioUser::find() | 214 | $portfolio_user = PortfolioUser::find() |
190 | - ->where([ 'portfolio_user_id' => $portfolio_user ]) | 215 | + ->where([ |
216 | + 'portfolio_user_id' => $portfolio_user, | ||
217 | + 'status' => 1, | ||
218 | + ]) | ||
191 | ->with('gallery') | 219 | ->with('gallery') |
192 | ->with('user') | 220 | ->with('user') |
193 | ->one(); | 221 | ->one(); |
222 | + if(empty( $portfolio_user )) { | ||
223 | + $this->redirect([ | ||
224 | + 'portfolio-view', | ||
225 | + 'performer_id' => $performer_id, | ||
226 | + 'portfolio_id' => $portfolio_id, | ||
227 | + 'type' => $type, | ||
228 | + ]); | ||
229 | + } | ||
194 | } else { | 230 | } else { |
195 | $portfolio->updateCounters([ 'view_count' => 1 ]); | 231 | $portfolio->updateCounters([ 'view_count' => 1 ]); |
196 | } | 232 | } |
@@ -264,6 +300,9 @@ | @@ -264,6 +300,9 @@ | ||
264 | ]) | 300 | ]) |
265 | ->with('comments') | 301 | ->with('comments') |
266 | ->one(); | 302 | ->one(); |
303 | + if(empty($article)) { | ||
304 | + throw new NotFoundHttpException('Запись не найдена'); | ||
305 | + } | ||
267 | $article->updateCounters([ 'view_count' => 1 ]); | 306 | $article->updateCounters([ 'view_count' => 1 ]); |
268 | 307 | ||
269 | return $this->render('blog-view', [ | 308 | return $this->render('blog-view', [ |
@@ -309,7 +348,7 @@ | @@ -309,7 +348,7 @@ | ||
309 | } | 348 | } |
310 | 349 | ||
311 | $gallery = new ActiveDataProvider([ | 350 | $gallery = new ActiveDataProvider([ |
312 | - 'query' => $user->getGalleries(), | 351 | + 'query' => $user->getGalleries()->andWhere(['not', ['photo' => '']])->andWhere(['not', ['photo' => NULL]]), |
313 | 'pagination' => [ | 352 | 'pagination' => [ |
314 | 'pageSize' => 5, | 353 | 'pageSize' => 5, |
315 | ], | 354 | ], |
frontend/controllers/SearchController.php
@@ -11,6 +11,7 @@ use frontend\models\SearchVacancyForm; | @@ -11,6 +11,7 @@ use frontend\models\SearchVacancyForm; | ||
11 | use Yii; | 11 | use Yii; |
12 | use frontend\models\Options; | 12 | use frontend\models\Options; |
13 | use frontend\models\OptionValues; | 13 | use frontend\models\OptionValues; |
14 | +use yii\base\InvalidParamException; | ||
14 | use yii\data\ActiveDataProvider; | 15 | use yii\data\ActiveDataProvider; |
15 | use yii\data\Pagination; | 16 | use yii\data\Pagination; |
16 | use yii\web\Controller; | 17 | use yii\web\Controller; |
@@ -42,6 +43,32 @@ use frontend\models\Option; | @@ -42,6 +43,32 @@ use frontend\models\Option; | ||
42 | ]; | 43 | ]; |
43 | } | 44 | } |
44 | 45 | ||
46 | + public function actionCommon($action) | ||
47 | + { | ||
48 | + $query = \Yii::$app->request->get('query'); | ||
49 | + $actions = [ | ||
50 | + 1 => 'project', | ||
51 | + 2 => 'performer', | ||
52 | + 3 => 'customer' | ||
53 | + ]; | ||
54 | + if(!array_key_exists($action, $actions)) { | ||
55 | + return $this->redirect(['/', 'query' => $query]); | ||
56 | + } else { | ||
57 | + switch($action) { | ||
58 | + case 1: | ||
59 | + return $this->redirect(['search/'.$actions[$action], 'TenderSearch[info]' => $query]); | ||
60 | + break; | ||
61 | + case 2: | ||
62 | + return $this->redirect(['search/'.$actions[$action], 'SearchPerformerForm[search]' => $query]); | ||
63 | + break; | ||
64 | + case 3: | ||
65 | + return $this->redirect(['search/'.$actions[$action], 'CustomerSearch[info]' => $query]); | ||
66 | + break; | ||
67 | + } | ||
68 | + } | ||
69 | + return false; | ||
70 | + } | ||
71 | + | ||
45 | public function actionProject() | 72 | public function actionProject() |
46 | { | 73 | { |
47 | $model = new TenderSearch(); | 74 | $model = new TenderSearch(); |
frontend/messages/ru/app.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 'description' => 'Описание', | 10 | 'description' => 'Описание', |
11 | 'cover' => 'Фото главное', | 11 | 'cover' => 'Фото главное', |
12 | 'chat_id' => 'Chat ID', | 12 | 'chat_id' => 'Chat ID', |
13 | - 'status' => 'Status', | 13 | + 'status' => 'Статус', |
14 | 'comment' => 'Comment', | 14 | 'comment' => 'Comment', |
15 | 'from_user' => 'From User', | 15 | 'from_user' => 'From User', |
16 | 'to_user' => 'To User', | 16 | 'to_user' => 'To User', |
@@ -179,5 +179,4 @@ | @@ -179,5 +179,4 @@ | ||
179 | 'Feedback answer' => 'Вопрос', | 179 | 'Feedback answer' => 'Вопрос', |
180 | 'Feedback file' => 'Файл', | 180 | 'Feedback file' => 'Файл', |
181 | 'Feedback date add' => 'Дата обращения', | 181 | 'Feedback date add' => 'Дата обращения', |
182 | - 'Projects' => 'Проекты', | ||
183 | ]; | 182 | ]; |
184 | \ No newline at end of file | 183 | \ No newline at end of file |
frontend/views/accounts/_gallery_form.php
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * @var Gallery $gallery | 3 | * @var Gallery $gallery |
4 | - * @var User $user | 4 | + * @var User $user |
5 | */ | 5 | */ |
6 | use common\components\Request; | 6 | use common\components\Request; |
7 | use common\models\Gallery; | 7 | use common\models\Gallery; |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | <div class="input-blocks-wrapper"> | 24 | <div class="input-blocks-wrapper"> |
25 | <div class="input-blocks"> | 25 | <div class="input-blocks"> |
26 | <?= $form->field($gallery, 'name') | 26 | <?= $form->field($gallery, 'name') |
27 | - ->textInput (['class'=> 'custom-input-2']) ?> | 27 | + ->textInput([ 'class' => 'custom-input-2' ]) ?> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | 30 | ||
@@ -32,27 +32,47 @@ | @@ -32,27 +32,47 @@ | ||
32 | <?= ImageUploader::widget([ | 32 | <?= ImageUploader::widget([ |
33 | 'model' => $gallery, | 33 | 'model' => $gallery, |
34 | 'field' => 'cover', | 34 | 'field' => 'cover', |
35 | - 'size' => [ | 35 | + 'size' => [ |
36 | [ | 36 | [ |
37 | - 'width' => 210, | ||
38 | - 'height' => 150, | ||
39 | - ] | 37 | + 'width' => 210, |
38 | + 'height' => 150, | ||
39 | + ], | ||
40 | ], | 40 | ], |
41 | - | 41 | + 'remover' => true, |
42 | 'multi' => false, | 42 | 'multi' => false, |
43 | 'gallery' => $gallery->cover, | 43 | 'gallery' => $gallery->cover, |
44 | 'name' => 'Загрузить главное фото', | 44 | 'name' => 'Загрузить главное фото', |
45 | ]); ?> | 45 | ]); ?> |
46 | + <div class="help-block"></div> | ||
47 | + <?php | ||
48 | + $client = ''; | ||
49 | + foreach($gallery->getActiveValidators('cover') as $validator) { | ||
50 | + $client .= $validator->clientValidateAttribute($gallery, 'cover', $this); | ||
51 | + } | ||
52 | + $js = " | ||
53 | + $('#".$form->id."').yiiActiveForm( | ||
54 | + 'add', { | ||
55 | + container : '.admin-avatar', | ||
56 | + error : '.help-block', | ||
57 | + id : 'gallery-cover', | ||
58 | + input : '#gallery-cover', | ||
59 | + name : 'Gallery[cover]', | ||
60 | + validate: function(attribute, value, messages, deferred) { ".$client." } | ||
61 | + } | ||
62 | + ); | ||
63 | + "; | ||
64 | + $this->registerJs($js, $this::POS_LOAD); | ||
65 | + ?> | ||
46 | </div> | 66 | </div> |
47 | <div class="admin-gallery-photos-load-wr style"> | 67 | <div class="admin-gallery-photos-load-wr style"> |
48 | <?= ImageUploader::widget([ | 68 | <?= ImageUploader::widget([ |
49 | 'model' => $gallery, | 69 | 'model' => $gallery, |
50 | 'field' => 'photo', | 70 | 'field' => 'photo', |
51 | - 'size' => [ | 71 | + 'size' => [ |
52 | [ | 72 | [ |
53 | - 'width' => 152, | ||
54 | - 'height' => 108, | ||
55 | - ] | 73 | + 'width' => 152, |
74 | + 'height' => 108, | ||
75 | + ], | ||
56 | ], | 76 | ], |
57 | 'multi' => true, | 77 | 'multi' => true, |
58 | 'gallery' => $gallery->photo, | 78 | 'gallery' => $gallery->photo, |
@@ -61,29 +81,28 @@ | @@ -61,29 +81,28 @@ | ||
61 | </div> | 81 | </div> |
62 | 82 | ||
63 | 83 | ||
64 | - | ||
65 | <div class="input-blocks-wrapper"> | 84 | <div class="input-blocks-wrapper"> |
66 | <div class="admin-save-btn skills-save-btn admin-add-remove-wr style"> | 85 | <div class="admin-save-btn skills-save-btn admin-add-remove-wr style"> |
67 | - <?= Html::submitButton($gallery->isNewRecord? Yii::t('app', 'add'):'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> | 86 | + <?= Html::submitButton($gallery->isNewRecord ? Yii::t('app', 'add') : 'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> |
68 | <div class="admin-remove-note"> | 87 | <div class="admin-remove-note"> |
69 | <?php | 88 | <?php |
70 | - if(!$gallery->isNewRecord) { | ||
71 | - echo Html::a(Yii::t('app', 'delete'), [ | ||
72 | - 'accounts/gallery-delete', | ||
73 | - 'id' => $gallery->gallery_id, | ||
74 | - ], [ | ||
75 | - 'title' => Yii::t('app', 'delete'), | ||
76 | - 'aria-label' => Yii::t('app', 'delete'), | ||
77 | - 'data-confirm' => Yii::t('app', 'delete_confirm'), | ||
78 | - 'data-method' => 'post', | ||
79 | - 'data-pjax' => 0, | ||
80 | - ]); | ||
81 | - } | 89 | + if(!$gallery->isNewRecord) { |
90 | + echo Html::a(Yii::t('app', 'delete'), [ | ||
91 | + 'accounts/gallery-delete', | ||
92 | + 'id' => $gallery->gallery_id, | ||
93 | + ], [ | ||
94 | + 'title' => Yii::t('app', 'delete'), | ||
95 | + 'aria-label' => Yii::t('app', 'delete'), | ||
96 | + 'data-confirm' => Yii::t('app', 'delete_confirm'), | ||
97 | + 'data-method' => 'post', | ||
98 | + 'data-pjax' => 0, | ||
99 | + ]); | ||
100 | + } | ||
82 | ?> | 101 | ?> |
83 | </div> | 102 | </div> |
84 | 103 | ||
85 | <div class="admin-back-note"> | 104 | <div class="admin-back-note"> |
86 | - <?= Html::a('вернуться', Request::getIsLocal(\Yii::$app->request->referrer)?\Yii::$app->request->referrer:['accounts/gallery' ]) ?> | 105 | + <?= Html::a('вернуться', Request::getIsLocal(\Yii::$app->request->referrer) ? \Yii::$app->request->referrer : [ 'accounts/gallery' ]) ?> |
87 | </div> | 106 | </div> |
88 | </div> | 107 | </div> |
89 | </div> | 108 | </div> |
frontend/views/accounts/_portfolio_form.php
@@ -288,12 +288,11 @@ $form->end(); | @@ -288,12 +288,11 @@ $form->end(); | ||
288 | $.post( | 288 | $.post( |
289 | "/accounts/gallery-cover", {gallery_id : gallery_id}, function(data) | 289 | "/accounts/gallery-cover", {gallery_id : gallery_id}, function(data) |
290 | { | 290 | { |
291 | - if(!($('#cover_old_img').val().length)) | 291 | + if(data.length && !($('#cover_old_img').val().length) && !($('#portfolio-cover').val().length)) |
292 | { | 292 | { |
293 | - $('#cover_picture_link').val(data); | 293 | + $('#portfolio-cover').val(data); |
294 | var newimg = document.createElement("img"); | 294 | var newimg = document.createElement("img"); |
295 | newimg.setAttribute("src", data); | 295 | newimg.setAttribute("src", data); |
296 | - | ||
297 | $('#cover_img_block .admin-avatar-pattern').append(newimg); | 296 | $('#cover_img_block .admin-avatar-pattern').append(newimg); |
298 | } | 297 | } |
299 | } | 298 | } |
1 | +<?php | ||
2 | + use common\models\FeedbackCompanySearch; | ||
3 | + use yii\data\ActiveDataProvider; | ||
4 | + use yii\grid\ActionColumn; | ||
5 | + use yii\grid\GridView; | ||
6 | + use yii\grid\SerialColumn; | ||
7 | + use yii\helpers\Html; | ||
8 | + use yii\jui\DatePicker; | ||
9 | + use yii\web\View; | ||
10 | + | ||
11 | + /** | ||
12 | + * @var View $this | ||
13 | + * @var FeedbackCompanySearch $searchModel | ||
14 | + * @var ActiveDataProvider $dataProvider | ||
15 | + */ | ||
16 | + $this->title = 'Заявки'; | ||
17 | + $this->params[ 'breadcrumbs' ][] = $this->title; | ||
18 | +?> | ||
19 | +<div class="login-left-column-title fix"><?= $this->title ?></div> | ||
20 | +<div class="admin-table-portfolio"> | ||
21 | + <?= GridView::widget([ | ||
22 | + 'options' => [ 'class' => 'style admin-all-pages-wr fix_last_td_' ], | ||
23 | + 'dataProvider' => $dataProvider, | ||
24 | + 'filterModel' => $searchModel, | ||
25 | + 'columns' => [ | ||
26 | + [ 'class' => SerialColumn::className() ], | ||
27 | + [ | ||
28 | + 'attribute' => 'date_add', | ||
29 | + 'filter' => "<div class=\"input-group input-group-xs input-daterange\"> | ||
30 | +<span class='field-teamsearch-experience_from_from'>" . DatePicker::widget([ | ||
31 | + 'model' => $searchModel, | ||
32 | + 'attribute' => 'date_add_from', | ||
33 | + 'language' => 'ru', | ||
34 | + 'dateFormat' => 'yyyy-MM-dd', | ||
35 | + 'clientOptions' => [ | ||
36 | + 'changeYear' => true, | ||
37 | + 'changeMonth' => true, | ||
38 | + 'maxDate' => ($searchModel->date_add_to?:date('Y-m-d')), | ||
39 | + ], | ||
40 | + ]) . "</span> | ||
41 | +<span class=\"input-group-addon kv-field-separator\"> | ||
42 | +<i class=\"glyphicon glyphicon-resize-horizontal\"></i> | ||
43 | +</span> | ||
44 | +<span class='field-teamsearch-experience_from_to'>" . DatePicker::widget([ | ||
45 | + 'model' => $searchModel, | ||
46 | + 'attribute' => 'date_add_to', | ||
47 | + 'language' => 'ru', | ||
48 | + 'dateFormat' => 'yyyy-MM-dd', | ||
49 | + 'clientOptions' => [ | ||
50 | + 'changeYear' => true, | ||
51 | + 'changeMonth' => true, | ||
52 | + 'minDate' => $searchModel->date_add_from, | ||
53 | + 'maxDate' => date('Y-m-d'), | ||
54 | + ], | ||
55 | + ]) . "</span> | ||
56 | +</div>", | ||
57 | + 'value' => function($model, $key) { | ||
58 | + return date('Y-m-d H:i:s', $model->date_add); | ||
59 | + }, | ||
60 | + ], | ||
61 | + [ | ||
62 | + 'attribute' => 'name', | ||
63 | + 'label' => 'Имя и фамилия', | ||
64 | + ], | ||
65 | + 'phone', | ||
66 | + [ | ||
67 | + 'attribute' => 'status', | ||
68 | + 'filter' => [ | ||
69 | + 1 => 'Только непрочитанные', | ||
70 | + ], | ||
71 | + 'filterInputOptions' => [ | ||
72 | + 'prompt' => 'Все записи', | ||
73 | + 'class' => 'form-control', | ||
74 | + ], | ||
75 | + ], | ||
76 | + [ | ||
77 | + 'class' => ActionColumn::className(), | ||
78 | + 'buttons' => [ | ||
79 | + 'delete' => function($url, $model, $key) { | ||
80 | + return Html::a(Html::tag('span', '', [ | ||
81 | + 'class' => 'glyphicon glyphicon-trash', | ||
82 | + ]), [ | ||
83 | + 'accounts/feedback-delete', | ||
84 | + 'id' => $model->feedback_company_id, | ||
85 | + ], [ | ||
86 | + 'title' => 'Удалить', | ||
87 | + 'aria-label' => 'Удалить', | ||
88 | + 'data-confirm' => 'Вы уверены, что хотите удалить данную заявку?', | ||
89 | + 'data-method' => 'post', | ||
90 | + 'data-pjax' => 0, | ||
91 | + ]); | ||
92 | + }, | ||
93 | + 'read' => function($url, $model, $key) { | ||
94 | + if($model->status == $model::STATUS_NEW) { | ||
95 | + return Html::a(Html::tag('span', '', [ | ||
96 | + 'class' => 'glyphicon glyphicon-ok', | ||
97 | + ]), [ | ||
98 | + 'accounts/feedback-read', | ||
99 | + 'id' => $model->feedback_company_id, | ||
100 | + ], [ | ||
101 | + 'title' => 'Прочесть', | ||
102 | + 'aria-label' => 'Прочесть', | ||
103 | + 'data-confirm' => 'Вы уверены, что хотите отметить заявку прочтенной?', | ||
104 | + 'data-method' => 'post', | ||
105 | + 'data-pjax' => 0, | ||
106 | + ]); | ||
107 | + } else { | ||
108 | + return false; | ||
109 | + } | ||
110 | + }, | ||
111 | + ], | ||
112 | + 'template' => '{read}{delete}', | ||
113 | + ], | ||
114 | + ], | ||
115 | + ]); ?> | ||
116 | +</div> |
frontend/views/accounts/general.php
frontend/views/accounts/projects.php
@@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
66 | [ | 66 | [ |
67 | 'attribute' => 'budget', | 67 | 'attribute' => 'budget', |
68 | 'filter' => Html::activeInput('text', $searchModel, 'budget_approx', ['class'=>'form-control']), | 68 | 'filter' => Html::activeInput('text', $searchModel, 'budget_approx', ['class'=>'form-control']), |
69 | - 'value' => function($model, $key, $index, $column) { | 69 | + 'content' => function($model, $key, $index, $column) { |
70 | /** | 70 | /** |
71 | * @var Project $model | 71 | * @var Project $model |
72 | */ | 72 | */ |
frontend/views/ajax/feedback_form.php
@@ -2,18 +2,18 @@ | @@ -2,18 +2,18 @@ | ||
2 | /** | 2 | /** |
3 | * @var Feedback $model | 3 | * @var Feedback $model |
4 | */ | 4 | */ |
5 | + use common\models\Feedback; | ||
6 | + use common\modules\fileloader\widgets\FileloaderWidget; | ||
7 | + use yii\helpers\Html; | ||
8 | + use yii\widgets\ActiveForm; | ||
5 | ?> | 9 | ?> |
6 | <div id="modal_form_contacts"> | 10 | <div id="modal_form_contacts"> |
7 | <div class="closed-form"></div> | 11 | <div class="closed-form"></div> |
8 | <div class="form-resume-wr"> | 12 | <div class="form-resume-wr"> |
9 | <div class="form-resume-sub style">Отправить сообщение администрации МФП</div> | 13 | <div class="form-resume-sub style">Отправить сообщение администрации МФП</div> |
10 | <?php | 14 | <?php |
11 | - use common\models\Feedback; | ||
12 | - use common\modules\fileloader\widgets\FileloaderWidget; | ||
13 | - use yii\helpers\Html; | ||
14 | - use yii\widgets\ActiveForm; | ||
15 | - | ||
16 | $form = ActiveForm::begin([ | 15 | $form = ActiveForm::begin([ |
16 | + 'id' => 'feedback_'.\Yii::$app->security->generateRandomString(3), | ||
17 | 'options' => [ | 17 | 'options' => [ |
18 | 'enctype' => 'multipart/form-data', | 18 | 'enctype' => 'multipart/form-data', |
19 | 'class' => 'feedback_form', | 19 | 'class' => 'feedback_form', |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | ->label(false) | 34 | ->label(false) |
35 | ->widget(FileloaderWidget::className(), [ | 35 | ->widget(FileloaderWidget::className(), [ |
36 | 'labelOptions' => [ | 36 | 'labelOptions' => [ |
37 | - 'label' => '<div class="contacts-form-wrapper style"><div class="contacts-form style"><span>Прикрепить файл</span></div><div class="contacts-form-help style"><span>Максимальный размер файла 5 МБ</span></div></div>', | 37 | + 'label' => '<div class="contacts-form-wrapper style"><div class="contacts-form style"><span style="font-weight: normal">Прикрепить файл</span></div><div class="contacts-form-help style"><span>Максимальный размер файла 5 МБ</span></div></div>', |
38 | ], | 38 | ], |
39 | 'inputOptions' => [ | 39 | 'inputOptions' => [ |
40 | 'multiple' => false, | 40 | 'multiple' => false, |
frontend/views/ajax/project_user.php
@@ -46,10 +46,6 @@ | @@ -46,10 +46,6 @@ | ||
46 | <span class="project_user_remove" style="background: url('/images/delete-ico.png') no-repeat; width: 13px; height: 13px; display: block; background-size: cover; cursor:pointer"></span> | 46 | <span class="project_user_remove" style="background: url('/images/delete-ico.png') no-repeat; width: 13px; height: 13px; display: block; background-size: cover; cursor:pointer"></span> |
47 | </div> | 47 | </div> |
48 | </div> | 48 | </div> |
49 | - | ||
50 | - | ||
51 | - | ||
52 | - | ||
53 | </div> | 49 | </div> |
54 | <script> | 50 | <script> |
55 | var blocks = $('.add_project_user_list .project_user_wrapper') | 51 | var blocks = $('.add_project_user_list .project_user_wrapper') |
frontend/views/ajax/users.php
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | BootstrapPluginAsset::register($this); | 22 | BootstrapPluginAsset::register($this); |
23 | $pjax = Pjax::begin([ | 23 | $pjax = Pjax::begin([ |
24 | 'enablePushState' => false, | 24 | 'enablePushState' => false, |
25 | - 'id' => 'pjax-user', | 25 | + 'id' => 'pjax-user_'.\Yii::$app->security->generateRandomString(3), |
26 | ]); | 26 | ]); |
27 | $js = "$('.user_search_modal_input').tooltip({placement: 'top', title: function() { return $(this).data('error'); }, trigger: 'manual'}); | 27 | $js = "$('.user_search_modal_input').tooltip({placement: 'top', title: function() { return $(this).data('error'); }, trigger: 'manual'}); |
28 | $('.user_search_modal_input').tooltip('show');"; | 28 | $('.user_search_modal_input').tooltip('show');"; |
frontend/views/chat/message.php
@@ -26,9 +26,15 @@ | @@ -26,9 +26,15 @@ | ||
26 | <div class="cab-mes-read-cont-stars"> | 26 | <div class="cab-mes-read-cont-stars"> |
27 | <?php | 27 | <?php |
28 | echo StarRating::widget([ | 28 | echo StarRating::widget([ |
29 | - 'name' => 'rating_messange', | ||
30 | - 'value' => $chat->interlocutor->userInfo->rating, | ||
31 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 29 | + 'name' => 'rating_messange', |
30 | + 'value' => $chat->interlocutor->userInfo->rating, | ||
31 | + 'pluginOptions' => [ | ||
32 | + 'displayOnly' => true, | ||
33 | + 'size' => 'xxs', | ||
34 | + 'min' => 0, | ||
35 | + 'max' => 10, | ||
36 | + 'stars' => 10, | ||
37 | + ], | ||
32 | ]); | 38 | ]); |
33 | ?> | 39 | ?> |
34 | </div> | 40 | </div> |
@@ -47,7 +53,7 @@ | @@ -47,7 +53,7 @@ | ||
47 | <div class="performance-vacancy-add-favorite"> | 53 | <div class="performance-vacancy-add-favorite"> |
48 | <?php | 54 | <?php |
49 | echo Html::a('', [ '#' ], [ | 55 | echo Html::a('', [ '#' ], [ |
50 | - 'class' => $chat->interlocutor->isBookmarked?'artbox_bookmark_remove_performer':'artbox_bookmark_add_performer', | 56 | + 'class' => $chat->interlocutor->isBookmarked ? 'artbox_bookmark_remove_performer' : 'artbox_bookmark_add_performer', |
51 | 'data' => [ 'id' => $chat->interlocutor->id ], | 57 | 'data' => [ 'id' => $chat->interlocutor->id ], |
52 | ]); | 58 | ]); |
53 | ?> | 59 | ?> |
@@ -147,7 +153,7 @@ | @@ -147,7 +153,7 @@ | ||
147 | </div> | 153 | </div> |
148 | <div class="comment_type"> | 154 | <div class="comment_type"> |
149 | <?php $form = ActiveForm::begin([ | 155 | <?php $form = ActiveForm::begin([ |
150 | - 'method' => 'post', | 156 | + 'method' => 'post', |
151 | 'options' => [ 'enctype' => 'multipart/form-data' ], | 157 | 'options' => [ 'enctype' => 'multipart/form-data' ], |
152 | ]); ?> | 158 | ]); ?> |
153 | 159 |
frontend/views/company/_company_common_review.php
@@ -9,9 +9,15 @@ | @@ -9,9 +9,15 @@ | ||
9 | <?php | 9 | <?php |
10 | if(!empty( $model->rating )) { | 10 | if(!empty( $model->rating )) { |
11 | echo StarRating::widget([ | 11 | echo StarRating::widget([ |
12 | - 'name' => 'rating_company_review', | ||
13 | - 'value' => $model->rating->value, | ||
14 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 12 | + 'name' => 'rating_company_review', |
13 | + 'value' => $model->rating->value, | ||
14 | + 'pluginOptions' => [ | ||
15 | + 'displayOnly' => true, | ||
16 | + 'size' => 'xxs', | ||
17 | + 'min' => 0, | ||
18 | + 'max' => 10, | ||
19 | + 'stars' => 10, | ||
20 | + ], | ||
15 | ]); | 21 | ]); |
16 | } | 22 | } |
17 | ?> | 23 | ?> |
frontend/views/company/_company_team_review.php
@@ -14,9 +14,15 @@ | @@ -14,9 +14,15 @@ | ||
14 | <?php | 14 | <?php |
15 | if(!empty( $model->rating )) { | 15 | if(!empty( $model->rating )) { |
16 | echo StarRating::widget([ | 16 | echo StarRating::widget([ |
17 | - 'name' => 'rating_company_team', | ||
18 | - 'value' => $model->rating->value, | ||
19 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 17 | + 'name' => 'rating_company_team', |
18 | + 'value' => $model->rating->value, | ||
19 | + 'pluginOptions' => [ | ||
20 | + 'displayOnly' => true, | ||
21 | + 'size' => 'xxs', | ||
22 | + 'min' => 0, | ||
23 | + 'max' => 10, | ||
24 | + 'stars' => 10, | ||
25 | + ], | ||
20 | ]); | 26 | ]); |
21 | } | 27 | } |
22 | ?> | 28 | ?> |
1 | +<?php | ||
2 | + /** | ||
3 | + * @var User $company | ||
4 | + * @var User $user | ||
5 | + * @var View $this | ||
6 | + */ | ||
7 | + use common\models\FeedbackCompany; | ||
8 | + use common\models\User; | ||
9 | + use yii\helpers\Html; | ||
10 | + use yii\web\View; | ||
11 | + use yii\widgets\ActiveForm; | ||
12 | + | ||
13 | + $user = \Yii::$app->user->identity; | ||
14 | + $model = new FeedbackCompany([ 'user_id' => $company->id ]); | ||
15 | + if(!empty( $user )) { | ||
16 | + $model->name = $user->name; | ||
17 | + $phones = $user->getPhones(); | ||
18 | + if(!empty( $phones )) { | ||
19 | + $model->phone = $phones[ 1 ][ 'phone' ]; | ||
20 | + } | ||
21 | + } | ||
22 | +?> | ||
23 | + <div class="performance-vacancy-call-back"> | ||
24 | + <div class="performance-vacancy-call-back-title">Оставьте заявку<br/>и мы вам перезвоним | ||
25 | + </div> | ||
26 | + <?php | ||
27 | + $form = ActiveForm::begin([ | ||
28 | + 'action' => [ 'ajax/feedback-company' ], | ||
29 | + 'method' => 'POST', | ||
30 | + 'options' => [ 'class' => 'callback' ], | ||
31 | + ]); | ||
32 | + echo $form->field($model, 'user_id') | ||
33 | + ->label(false) | ||
34 | + ->hiddenInput(); | ||
35 | + echo $form->field($model, 'name', [ 'options' => [ 'class' => 'input-blocks-wrapper' ] ]) | ||
36 | + ->textInput([ 'placeholder' => 'Иванов Иван' ]); | ||
37 | + echo $form->field($model, 'phone', [ 'options' => [ 'class' => 'input-blocks-wrapper' ] ]) | ||
38 | + ->textInput([ 'placeholder' => '+38(093)111-11-11' ]); | ||
39 | + echo Html::submitInput('Перезвонить мне', [ 'id' => 'feedback_company_submit' ]); | ||
40 | + $form->end(); | ||
41 | + ?> | ||
42 | + <div class="performance-vacancy-call-back-conf">Гарантируем конфидециальность</div> | ||
43 | + </div> | ||
44 | +<?php | ||
45 | + $js = " | ||
46 | + $(document).on('click', '#feedback_company_submit', function(e) { | ||
47 | + e.preventDefault(); | ||
48 | + var form = $(this).parents('form'); | ||
49 | + var action = $(form).attr('action'); | ||
50 | + var id = $(form).attr('id'); | ||
51 | + $('#'+id).data('yiiActiveForm').submitting = true; | ||
52 | + $('#'+id).yiiActiveForm('validate'); | ||
53 | + if($(form).find('.input-blocks-wrapper.has-error').length <= 0) { | ||
54 | + $.post(action, $(form).serialize(), function(data) { | ||
55 | + if(data.error) { | ||
56 | + alert(data.error); | ||
57 | + } else { | ||
58 | + alert(data.result.message); | ||
59 | + document.getElementById(id).reset(); | ||
60 | + } | ||
61 | + }); | ||
62 | + } | ||
63 | + }); | ||
64 | + "; | ||
65 | + $this->registerJs($js); | ||
66 | +?> | ||
0 | \ No newline at end of file | 67 | \ No newline at end of file |
frontend/views/company/_portfolio_list_view.php
@@ -15,8 +15,8 @@ | @@ -15,8 +15,8 @@ | ||
15 | 'company/portfolio-view', | 15 | 'company/portfolio-view', |
16 | 'company_id' => $model->user_id, | 16 | 'company_id' => $model->user_id, |
17 | 'portfolio_id' => $model->portfolio_id, | 17 | 'portfolio_id' => $model->portfolio_id, |
18 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | ||
19 | - ])); ?> | 18 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
19 | + ]), [ 'data-pjax' => 0 ]); ?> | ||
20 | </div> | 20 | </div> |
21 | <div class="portfolio-project-blocks-title-wr"> | 21 | <div class="portfolio-project-blocks-title-wr"> |
22 | <div class="portfolio-project-blocks-title"> | 22 | <div class="portfolio-project-blocks-title"> |
@@ -24,8 +24,8 @@ | @@ -24,8 +24,8 @@ | ||
24 | 'company/portfolio-view', | 24 | 'company/portfolio-view', |
25 | 'company_id' => $model->user_id, | 25 | 'company_id' => $model->user_id, |
26 | 'portfolio_id' => $model->portfolio_id, | 26 | 'portfolio_id' => $model->portfolio_id, |
27 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | ||
28 | - ])) ?> | 27 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
28 | + ]), [ 'data-pjax' => 0 ]) ?> | ||
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | </div> | 31 | </div> |
@@ -35,21 +35,25 @@ | @@ -35,21 +35,25 @@ | ||
35 | <div class="portfolio-project-views-img"> | 35 | <div class="portfolio-project-views-img"> |
36 | <img src="/images/portfolio-project/ico-1.png"/></div> | 36 | <img src="/images/portfolio-project/ico-1.png"/></div> |
37 | </div> | 37 | </div> |
38 | - <div class="portfolio-project-views-txt"><?=$model->view_count?></div> | 38 | + <div class="portfolio-project-views-txt"><?= $model->view_count ?></div> |
39 | </div> | 39 | </div> |
40 | <div class="portfolio-project-rati ico-views-bl"> | 40 | <div class="portfolio-project-rati ico-views-bl"> |
41 | <div class="portfolio-project-views-img-wr"> | 41 | <div class="portfolio-project-views-img-wr"> |
42 | <div class="portfolio-project-views-img"> | 42 | <div class="portfolio-project-views-img"> |
43 | <img src="/images/portfolio-project/ico-2.png"/></div> | 43 | <img src="/images/portfolio-project/ico-2.png"/></div> |
44 | </div> | 44 | </div> |
45 | - <div class="portfolio-project-views-txt"><?php if(!empty($model->ratingValue)) { echo $model->ratingValue; } else { echo 'Нет'; } ?></div> | 45 | + <div class="portfolio-project-views-txt"><?php if(!empty( $model->ratingValue )) { |
46 | + echo $model->ratingValue; | ||
47 | + } else { | ||
48 | + echo 'Нет'; | ||
49 | + } ?></div> | ||
46 | </div> | 50 | </div> |
47 | <div class="ico-views-bl"> | 51 | <div class="ico-views-bl"> |
48 | <div class="portfolio-project-views-img-wr"> | 52 | <div class="portfolio-project-views-img-wr"> |
49 | <div class="portfolio-project-views-img"> | 53 | <div class="portfolio-project-views-img"> |
50 | <img src="/images/portfolio-project/ico-3.png"/></div> | 54 | <img src="/images/portfolio-project/ico-3.png"/></div> |
51 | </div> | 55 | </div> |
52 | - <div class="portfolio-project-views-txt"><?=count($model->comments)?></div> | 56 | + <div class="portfolio-project-views-txt"><?= count($model->comments) ?></div> |
53 | </div> | 57 | </div> |
54 | </div> | 58 | </div> |
55 | <div title="<?= implode(', ', ArrayHelper::getColumn($model->specializations, 'specialization_name')) ?>" class="portfolio-project-blocks-tags"><?= implode(', ', ArrayHelper::getColumn($model->specializations, 'specialization_name')) ?></div> | 59 | <div title="<?= implode(', ', ArrayHelper::getColumn($model->specializations, 'specialization_name')) ?>" class="portfolio-project-blocks-tags"><?= implode(', ', ArrayHelper::getColumn($model->specializations, 'specialization_name')) ?></div> |
frontend/views/company/gallery.php
@@ -52,7 +52,9 @@ | @@ -52,7 +52,9 @@ | ||
52 | { | 52 | { |
53 | $('#demo5').scrollbox( | 53 | $('#demo5').scrollbox( |
54 | { | 54 | { |
55 | - direction : 'h', distance : 220, autoPlay : false | 55 | + direction : 'h', |
56 | + distance : 220, | ||
57 | + autoPlay : false | ||
56 | } | 58 | } |
57 | ); | 59 | ); |
58 | $('#demo5-backward').click( | 60 | $('#demo5-backward').click( |
frontend/views/company/portfolio-view.php
@@ -78,6 +78,9 @@ | @@ -78,6 +78,9 @@ | ||
78 | 'pluginOptions' => [ | 78 | 'pluginOptions' => [ |
79 | 'displayOnly' => true, | 79 | 'displayOnly' => true, |
80 | 'size' => 'xxs', | 80 | 'size' => 'xxs', |
81 | + 'min' => 0, | ||
82 | + 'max' => 10, | ||
83 | + 'stars' => 10, | ||
81 | ], | 84 | ], |
82 | ]); | 85 | ]); |
83 | ?> | 86 | ?> |
@@ -118,7 +121,9 @@ | @@ -118,7 +121,9 @@ | ||
118 | <?php | 121 | <?php |
119 | foreach($portfolio->ShowGallery($portfolio->gallery->photo) as $one_photo) { | 122 | foreach($portfolio->ShowGallery($portfolio->gallery->photo) as $one_photo) { |
120 | ?> | 123 | ?> |
121 | - <li><img src="<?= $one_photo ?>" alt=""/></li> | 124 | + <li> |
125 | + <img src="<?= $portfolio->minImg($one_photo, 210, 150) ?>" alt=""/> | ||
126 | + </li> | ||
122 | <?php | 127 | <?php |
123 | } | 128 | } |
124 | ?> | 129 | ?> |
@@ -248,7 +253,10 @@ | @@ -248,7 +253,10 @@ | ||
248 | { | 253 | { |
249 | $('.new-portf-slider #demo5').scrollbox( | 254 | $('.new-portf-slider #demo5').scrollbox( |
250 | { | 255 | { |
251 | - direction : 'h', distance : 210, autoPlay : false, onMouseOverPause : false | 256 | + direction : 'h', |
257 | + distance : 210, | ||
258 | + autoPlay : false, | ||
259 | + onMouseOverPause : false | ||
252 | } | 260 | } |
253 | ); | 261 | ); |
254 | $('#demo5-backward').click( | 262 | $('#demo5-backward').click( |
frontend/views/layouts/admin.php
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, | 59 | 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, |
60 | ], | 60 | ], |
61 | [ | 61 | [ |
62 | - 'label' => 'Галерея Изображения', | 62 | + 'label' => 'Галерея Изображений', |
63 | 'url' => [ 'accounts/gallery' ], | 63 | 'url' => [ 'accounts/gallery' ], |
64 | 'active' => preg_match('/^gallery(?!-video).*$/', $this->context->action->id) ? true : false, | 64 | 'active' => preg_match('/^gallery(?!-video).*$/', $this->context->action->id) ? true : false, |
65 | ], | 65 | ], |
@@ -110,6 +110,10 @@ | @@ -110,6 +110,10 @@ | ||
110 | 'label' => 'Вакансии', | 110 | 'label' => 'Вакансии', |
111 | 'url' => [ 'accounts/vacancy' ], | 111 | 'url' => [ 'accounts/vacancy' ], |
112 | 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, | 112 | 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, |
113 | + ], [ | ||
114 | + 'label' => "Заявки <span class='ico_num'>{$this->params['feedback_company_count']}</span>", | ||
115 | + 'url' => [ 'accounts/feedback-company' ], | ||
116 | + 'encode' => false, | ||
113 | ]); | 117 | ]); |
114 | 118 | ||
115 | } | 119 | } |
frontend/views/layouts/company.php
@@ -19,27 +19,9 @@ | @@ -19,27 +19,9 @@ | ||
19 | <div class="box-all"> | 19 | <div class="box-all"> |
20 | <?php | 20 | <?php |
21 | if($this->params[ 'company' ]->id != \Yii::$app->user->getId()) { | 21 | if($this->params[ 'company' ]->id != \Yii::$app->user->getId()) { |
22 | - ?> | ||
23 | - <div class="performance-vacancy-call-back"> | ||
24 | - <div class="performance-vacancy-call-back-title">Оставьте заявку<br/>и мы вам перезвоним | ||
25 | - </div> | ||
26 | - <form class="callback" action=""> | ||
27 | - | ||
28 | - <div class="input-blocks-wrapper"> | ||
29 | - <label for="callbac_name">Имя</label> | ||
30 | - <input id="callbac_name" type="text"/> | ||
31 | - </div> | ||
32 | - | ||
33 | - <div class="input-blocks-wrapper"> | ||
34 | - <label for="callbac_phone">Телефон</label> | ||
35 | - <input id="callbac_phone" type="text"/> | ||
36 | - </div> | ||
37 | - | ||
38 | - <input id="callbac_submit" type="submit" value="Перезвонить мне"/> | ||
39 | - </form> | ||
40 | - <div class="performance-vacancy-call-back-conf">Гарантируем конфидециальность</div> | ||
41 | - </div> | ||
42 | - <?php | 22 | + // Форма "оставить заявку" |
23 | + echo $this->render('//company/_feedback_company', [ 'company' => $this->params[ 'company' ] ]); | ||
24 | + // Конец формы "оставить заявку" | ||
43 | if(!empty( \Yii::$app->user->identity )) { | 25 | if(!empty( \Yii::$app->user->identity )) { |
44 | ?> | 26 | ?> |
45 | <div class="performance-vacancy-add-favorite"> | 27 | <div class="performance-vacancy-add-favorite"> |
@@ -68,79 +50,88 @@ | @@ -68,79 +50,88 @@ | ||
68 | <div class="box-wr"> | 50 | <div class="box-wr"> |
69 | <div class="box-all"> | 51 | <div class="box-all"> |
70 | <?php | 52 | <?php |
71 | - echo Menu::widget([ | ||
72 | - 'options' => [ | ||
73 | - 'class' => 'menu-content', | ||
74 | - ], | ||
75 | - 'activeCssClass' => 'active-menu-content', | ||
76 | - 'items' => [ | ||
77 | - [ | ||
78 | - 'label' => 'Общее', | ||
79 | - 'url' => [ | ||
80 | - 'company/common', | ||
81 | - 'company_id' => $this->params[ 'company' ]->id, | ||
82 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
83 | - ], | 53 | + $items = [ |
54 | + [ | ||
55 | + 'label' => 'Общее', | ||
56 | + 'url' => [ | ||
57 | + 'company/common', | ||
58 | + 'company_id' => $this->params[ 'company' ]->id, | ||
59 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
84 | ], | 60 | ], |
85 | - [ | ||
86 | - 'label' => 'Выполненные работы', | ||
87 | - 'url' => [ | ||
88 | - 'company/portfolio', | ||
89 | - 'company_id' => $this->params[ 'company' ]->id, | ||
90 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
91 | - ], | ||
92 | - 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | 61 | + ], |
62 | + [ | ||
63 | + 'label' => 'Выполненные работы', | ||
64 | + 'url' => [ | ||
65 | + 'company/portfolio', | ||
66 | + 'company_id' => $this->params[ 'company' ]->id, | ||
67 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
93 | ], | 68 | ], |
94 | - [ | ||
95 | - 'label' => 'Заказанные работы', | ||
96 | - 'url' => [ | ||
97 | - 'company/projects', | ||
98 | - 'company_id' => $this->params[ 'company' ]->id, | ||
99 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
100 | - ], | ||
101 | - 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, | 69 | + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, |
70 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | ||
71 | + ], | ||
72 | + [ | ||
73 | + 'label' => 'Заказанные работы', | ||
74 | + 'url' => [ | ||
75 | + 'company/projects', | ||
76 | + 'company_id' => $this->params[ 'company' ]->id, | ||
77 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
102 | ], | 78 | ], |
103 | - [ | ||
104 | - 'label' => 'Команда', | ||
105 | - 'url' => [ | ||
106 | - 'company/team', | ||
107 | - 'company_id' => $this->params[ 'company' ]->id, | ||
108 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
109 | - ], | 79 | + 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, |
80 | + 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, | ||
81 | + ], | ||
82 | + [ | ||
83 | + 'label' => 'Вакансии', | ||
84 | + 'url' => [ | ||
85 | + 'company/vacancy-list', | ||
86 | + 'company_id' => $this->params[ 'company' ]->id, | ||
87 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
110 | ], | 88 | ], |
111 | - [ | ||
112 | - 'label' => 'Вакансии', | ||
113 | - 'url' => [ | ||
114 | - 'company/vacancy-list', | ||
115 | - 'company_id' => $this->params[ 'company' ]->id, | ||
116 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
117 | - ], | 89 | + 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, |
90 | + ], | ||
91 | + [ | ||
92 | + 'label' => 'Мнения', | ||
93 | + 'url' => [ | ||
94 | + 'company/review', | ||
95 | + 'company_id' => $this->params[ 'company' ]->id, | ||
96 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
118 | ], | 97 | ], |
119 | - [ | ||
120 | - 'label' => 'Блог', | ||
121 | - 'url' => [ | ||
122 | - 'company/blog-list', | ||
123 | - 'company_id' => $this->params[ 'company' ]->id, | ||
124 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 98 | + ], |
99 | + ]; | ||
100 | + if(empty($this->params['type']) || $this->params[ 'type' ] == 'implementer') { | ||
101 | + $items = array_merge($items, [ | ||
102 | + [ | ||
103 | + 'label' => 'Команда', | ||
104 | + 'url' => [ | ||
105 | + 'company/team', | ||
106 | + 'company_id' => $this->params[ 'company' ]->id, | ||
107 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
108 | + ], | ||
125 | ], | 109 | ], |
126 | - ], | ||
127 | - [ | ||
128 | - 'label' => 'Мнения', | ||
129 | - 'url' => [ | ||
130 | - 'company/review', | ||
131 | - 'company_id' => $this->params[ 'company' ]->id, | ||
132 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 110 | + [ |
111 | + 'label' => 'Блог', | ||
112 | + 'url' => [ | ||
113 | + 'company/blog-list', | ||
114 | + 'company_id' => $this->params[ 'company' ]->id, | ||
115 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
116 | + ], | ||
117 | + 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, | ||
133 | ], | 118 | ], |
134 | - ], | ||
135 | - [ | ||
136 | - 'label' => 'Галерея', | ||
137 | - 'url' => [ | ||
138 | - 'company/gallery', | ||
139 | - 'company_id' => $this->params[ 'company' ]->id, | ||
140 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 119 | + [ |
120 | + 'label' => 'Галерея', | ||
121 | + 'url' => [ | ||
122 | + 'company/gallery', | ||
123 | + 'company_id' => $this->params[ 'company' ]->id, | ||
124 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
125 | + ], | ||
141 | ], | 126 | ], |
142 | - ], | 127 | + ]); |
128 | + } | ||
129 | + echo Menu::widget([ | ||
130 | + 'options' => [ | ||
131 | + 'class' => 'menu-content', | ||
143 | ], | 132 | ], |
133 | + 'activeCssClass' => 'active-menu-content', | ||
134 | + 'items' => $items, | ||
144 | ]); | 135 | ]); |
145 | ?> | 136 | ?> |
146 | </div> | 137 | </div> |
@@ -157,48 +148,64 @@ | @@ -157,48 +148,64 @@ | ||
157 | <ul> | 148 | <ul> |
158 | <li class="activejob"> | 149 | <li class="activejob"> |
159 | <?php | 150 | <?php |
160 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
161 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
162 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
163 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 151 | + if($this->params[ 'company' ]->userInfo->is_freelancer xor $this->params[ 'company' ]->userInfo->is_customer) { |
152 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
153 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
154 | + } else { | ||
155 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
156 | + } | ||
164 | } else { | 157 | } else { |
165 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 158 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
159 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
160 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
161 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
162 | + } else { | ||
163 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
164 | + } | ||
165 | + ?> | ||
166 | + <div class="sidebar-droped-wr style"> | ||
167 | + <ul> | ||
168 | + <li> | ||
169 | + <?php | ||
170 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
171 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
172 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
173 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
174 | + } else { | ||
175 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
176 | + } | ||
177 | + ?> | ||
178 | + </li> | ||
179 | + <li style="display: none"> | ||
180 | + <?php | ||
181 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
182 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
183 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
184 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
185 | + } else { | ||
186 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
187 | + } | ||
188 | + ?> | ||
189 | + </ul> | ||
190 | + </div> | ||
191 | + <?php | ||
166 | } | 192 | } |
167 | ?> | 193 | ?> |
168 | - <div class="sidebar-droped-wr style"> | ||
169 | - <ul> | ||
170 | - <li> | ||
171 | - <?php | ||
172 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
173 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
174 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
175 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
176 | - } else { | ||
177 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
178 | - } | ||
179 | - ?> | ||
180 | - </li> | ||
181 | - <li style="display: none"> | ||
182 | - <?php | ||
183 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
184 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
185 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
186 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
187 | - } else { | ||
188 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
189 | - } | ||
190 | - ?> | ||
191 | - </ul> | ||
192 | - </div> | ||
193 | </li> | 194 | </li> |
194 | </ul> | 195 | </ul> |
195 | </div> | 196 | </div> |
196 | <div class="performance-vacancy-sidebar-stars style"> | 197 | <div class="performance-vacancy-sidebar-stars style"> |
197 | <?php | 198 | <?php |
198 | echo StarRating::widget([ | 199 | echo StarRating::widget([ |
199 | - 'name' => 'rating_company', | ||
200 | - 'value' => $this->params[ 'company' ]->userInfo->rating, | ||
201 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 200 | + 'name' => 'rating_company', |
201 | + 'value' => $this->params[ 'company' ]->userInfo->rating, | ||
202 | + 'pluginOptions' => [ | ||
203 | + 'displayOnly' => true, | ||
204 | + 'size' => 'xxs', | ||
205 | + 'min' => 0, | ||
206 | + 'max' => 10, | ||
207 | + 'stars' => 10, | ||
208 | + ], | ||
202 | ]); | 209 | ]); |
203 | ?> | 210 | ?> |
204 | </div> | 211 | </div> |
@@ -213,7 +220,7 @@ | @@ -213,7 +220,7 @@ | ||
213 | } | 220 | } |
214 | ?> | 221 | ?> |
215 | </div> | 222 | </div> |
216 | - <div class="performer-vacancy-sidebar-img style"><?= Html::img($this->params[ 'company' ]->userInfo->image); ?></div> | 223 | + <div class="performer-vacancy-sidebar-img style"><?= Html::img($this->params[ 'company' ]->userInfo->ShowAvatar($this->params[ 'company' ]->userInfo->image, 180,180)); ?></div> |
217 | <div class="performer-vacancy-sidebar-all style"> | 224 | <div class="performer-vacancy-sidebar-all style"> |
218 | <?= $this->render('/patrial/social_list', [ | 225 | <?= $this->render('/patrial/social_list', [ |
219 | 'params' => $this->params, | 226 | 'params' => $this->params, |
@@ -244,11 +251,11 @@ | @@ -244,11 +251,11 @@ | ||
244 | <div class="sidebarvievstxt"> | 251 | <div class="sidebarvievstxt"> |
245 | <span class="sidebar-views-txt">Сотрудники:<br/></span> | 252 | <span class="sidebar-views-txt">Сотрудники:<br/></span> |
246 | <?php | 253 | <?php |
247 | - if(!empty($this->params[ 'company' ]->companyInfo->staff)) { | ||
248 | - echo $this->params[ 'company' ]->companyInfo->staff; | ||
249 | - } else { | ||
250 | - echo 0; | ||
251 | - } | 254 | + if(!empty( $this->params[ 'company' ]->companyInfo->staff )) { |
255 | + echo $this->params[ 'company' ]->companyInfo->staff; | ||
256 | + } else { | ||
257 | + echo 0; | ||
258 | + } | ||
252 | ?> | 259 | ?> |
253 | </div> | 260 | </div> |
254 | </li> | 261 | </li> |
@@ -294,7 +301,9 @@ | @@ -294,7 +301,9 @@ | ||
294 | <script> | 301 | <script> |
295 | $('div.rating').rating( | 302 | $('div.rating').rating( |
296 | { | 303 | { |
297 | - fx : 'full', readOnly : 'true', url : 'rating.php' | 304 | + fx : 'full', |
305 | + readOnly : 'true', | ||
306 | + url : 'rating.php' | ||
298 | } | 307 | } |
299 | ); | 308 | ); |
300 | </script> | 309 | </script> |
frontend/views/layouts/gallery-company.php
@@ -16,27 +16,9 @@ | @@ -16,27 +16,9 @@ | ||
16 | <div class="box-all"> | 16 | <div class="box-all"> |
17 | <?php | 17 | <?php |
18 | if($this->params[ 'company' ]->id != \Yii::$app->user->getId()) { | 18 | if($this->params[ 'company' ]->id != \Yii::$app->user->getId()) { |
19 | - ?> | ||
20 | - <div class="performance-vacancy-call-back"> | ||
21 | - <div class="performance-vacancy-call-back-title">Оставьте заявку<br/>и мы вам перезвоним | ||
22 | - </div> | ||
23 | - <form class="callback" action=""> | ||
24 | - | ||
25 | - <div class="input-blocks-wrapper"> | ||
26 | - <label for="callbac_name">Имя</label> | ||
27 | - <input id="callbac_name" type="text"/> | ||
28 | - </div> | ||
29 | - | ||
30 | - <div class="input-blocks-wrapper"> | ||
31 | - <label for="callbac_phone">Телефон</label> | ||
32 | - <input id="callbac_phone" type="text"/> | ||
33 | - </div> | ||
34 | - | ||
35 | - <input id="callbac_submit" type="submit" value="Перезвонить мне"/> | ||
36 | - </form> | ||
37 | - <div class="performance-vacancy-call-back-conf">Гарантируем конфидециальность</div> | ||
38 | - </div> | ||
39 | - <?php | 19 | + // Форма "оставить заявку" |
20 | + echo $this->render('//company/_feedback_company', [ 'company' => $this->params[ 'company' ] ]); | ||
21 | + // Конец формы "оставить заявку" | ||
40 | if(!empty( \Yii::$app->user->identity )) { | 22 | if(!empty( \Yii::$app->user->identity )) { |
41 | ?> | 23 | ?> |
42 | <div class="performance-vacancy-add-favorite"> | 24 | <div class="performance-vacancy-add-favorite"> |
@@ -65,38 +47,55 @@ | @@ -65,38 +47,55 @@ | ||
65 | <div class="box-wr"> | 47 | <div class="box-wr"> |
66 | <div class="box-all"> | 48 | <div class="box-all"> |
67 | <?php | 49 | <?php |
68 | - echo Menu::widget([ | ||
69 | - 'options' => [ | ||
70 | - 'class' => 'menu-content', | 50 | + $items = [ |
51 | + [ | ||
52 | + 'label' => 'Общее', | ||
53 | + 'url' => [ | ||
54 | + 'company/common', | ||
55 | + 'company_id' => $this->params[ 'company' ]->id, | ||
56 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
57 | + ], | ||
71 | ], | 58 | ], |
72 | - 'activeCssClass' => 'active-menu-content', | ||
73 | - 'items' => [ | ||
74 | - [ | ||
75 | - 'label' => 'Общее', | ||
76 | - 'url' => [ | ||
77 | - 'company/common', | ||
78 | - 'company_id' => $this->params[ 'company' ]->id, | ||
79 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
80 | - ], | 59 | + [ |
60 | + 'label' => 'Выполненные работы', | ||
61 | + 'url' => [ | ||
62 | + 'company/portfolio', | ||
63 | + 'company_id' => $this->params[ 'company' ]->id, | ||
64 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
81 | ], | 65 | ], |
82 | - [ | ||
83 | - 'label' => 'Выполненные работы', | ||
84 | - 'url' => [ | ||
85 | - 'company/portfolio', | ||
86 | - 'company_id' => $this->params[ 'company' ]->id, | ||
87 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
88 | - ], | ||
89 | - 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params['type'] == 'implementer' ) ? true : false, | 66 | + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, |
67 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | ||
68 | + ], | ||
69 | + [ | ||
70 | + 'label' => 'Заказанные работы', | ||
71 | + 'url' => [ | ||
72 | + 'company/projects', | ||
73 | + 'company_id' => $this->params[ 'company' ]->id, | ||
74 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
90 | ], | 75 | ], |
91 | - [ | ||
92 | - 'label' => 'Заказанные работы', | ||
93 | - 'url' => [ | ||
94 | - 'company/projects', | ||
95 | - 'company_id' => $this->params[ 'company' ]->id, | ||
96 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
97 | - ], | ||
98 | - 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params['type'] == 'customer' ) ? true : false, | 76 | + 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, |
77 | + 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, | ||
78 | + ], | ||
79 | + [ | ||
80 | + 'label' => 'Вакансии', | ||
81 | + 'url' => [ | ||
82 | + 'company/vacancy-list', | ||
83 | + 'company_id' => $this->params[ 'company' ]->id, | ||
84 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
99 | ], | 85 | ], |
86 | + 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, | ||
87 | + ], | ||
88 | + [ | ||
89 | + 'label' => 'Мнения', | ||
90 | + 'url' => [ | ||
91 | + 'company/review', | ||
92 | + 'company_id' => $this->params[ 'company' ]->id, | ||
93 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
94 | + ], | ||
95 | + ], | ||
96 | + ]; | ||
97 | + if(empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer') { | ||
98 | + $items = array_merge($items, [ | ||
100 | [ | 99 | [ |
101 | 'label' => 'Команда', | 100 | 'label' => 'Команда', |
102 | 'url' => [ | 101 | 'url' => [ |
@@ -106,28 +105,13 @@ | @@ -106,28 +105,13 @@ | ||
106 | ], | 105 | ], |
107 | ], | 106 | ], |
108 | [ | 107 | [ |
109 | - 'label' => 'Вакансии', | ||
110 | - 'url' => [ | ||
111 | - 'company/vacancy-list', | ||
112 | - 'company_id' => $this->params[ 'company' ]->id, | ||
113 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
114 | - ], | ||
115 | - ], | ||
116 | - [ | ||
117 | 'label' => 'Блог', | 108 | 'label' => 'Блог', |
118 | 'url' => [ | 109 | 'url' => [ |
119 | 'company/blog-list', | 110 | 'company/blog-list', |
120 | 'company_id' => $this->params[ 'company' ]->id, | 111 | 'company_id' => $this->params[ 'company' ]->id, |
121 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 112 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
122 | ], | 113 | ], |
123 | - ], | ||
124 | - [ | ||
125 | - 'label' => 'Мнения', | ||
126 | - 'url' => [ | ||
127 | - 'company/review', | ||
128 | - 'company_id' => $this->params[ 'company' ]->id, | ||
129 | - 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | ||
130 | - ], | 114 | + 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, |
131 | ], | 115 | ], |
132 | [ | 116 | [ |
133 | 'label' => 'Галерея', | 117 | 'label' => 'Галерея', |
@@ -137,7 +121,14 @@ | @@ -137,7 +121,14 @@ | ||
137 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 121 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
138 | ], | 122 | ], |
139 | ], | 123 | ], |
124 | + ]); | ||
125 | + } | ||
126 | + echo Menu::widget([ | ||
127 | + 'options' => [ | ||
128 | + 'class' => 'menu-content', | ||
140 | ], | 129 | ], |
130 | + 'activeCssClass' => 'active-menu-content', | ||
131 | + 'items' => $items, | ||
141 | ]); | 132 | ]); |
142 | ?> | 133 | ?> |
143 | </div> | 134 | </div> |
@@ -154,48 +145,64 @@ | @@ -154,48 +145,64 @@ | ||
154 | <ul> | 145 | <ul> |
155 | <li class="activejob"> | 146 | <li class="activejob"> |
156 | <?php | 147 | <?php |
157 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
158 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
159 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
160 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 148 | + if($this->params[ 'company' ]->userInfo->is_freelancer xor $this->params[ 'company' ]->userInfo->is_customer) { |
149 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
150 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
151 | + } else { | ||
152 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
153 | + } | ||
161 | } else { | 154 | } else { |
162 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 155 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
156 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
157 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
158 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
159 | + } else { | ||
160 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
161 | + } | ||
162 | + ?> | ||
163 | + <div class="sidebar-droped-wr style"> | ||
164 | + <ul> | ||
165 | + <li> | ||
166 | + <?php | ||
167 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
168 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
169 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
170 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
171 | + } else { | ||
172 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
173 | + } | ||
174 | + ?> | ||
175 | + </li> | ||
176 | + <li style="display: none"> | ||
177 | + <?php | ||
178 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
179 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
180 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
181 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
182 | + } else { | ||
183 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
184 | + } | ||
185 | + ?> | ||
186 | + </ul> | ||
187 | + </div> | ||
188 | + <?php | ||
163 | } | 189 | } |
164 | ?> | 190 | ?> |
165 | - <div class="sidebar-droped-wr style"> | ||
166 | - <ul> | ||
167 | - <li> | ||
168 | - <?php | ||
169 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
170 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
171 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
172 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
173 | - } else { | ||
174 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
175 | - } | ||
176 | - ?> | ||
177 | - </li> | ||
178 | - <li style="display: none"> | ||
179 | - <?php | ||
180 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
181 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
182 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
183 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
184 | - } else { | ||
185 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
186 | - } | ||
187 | - ?> | ||
188 | - </ul> | ||
189 | - </div> | ||
190 | </li> | 191 | </li> |
191 | </ul> | 192 | </ul> |
192 | </div> | 193 | </div> |
193 | <div class="performance-vacancy-sidebar-stars style"> | 194 | <div class="performance-vacancy-sidebar-stars style"> |
194 | <?php | 195 | <?php |
195 | echo StarRating::widget([ | 196 | echo StarRating::widget([ |
196 | - 'name' => 'rating_company', | ||
197 | - 'value' => $this->params[ 'company' ]->userInfo->rating, | ||
198 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 197 | + 'name' => 'rating_company', |
198 | + 'value' => $this->params[ 'company' ]->userInfo->rating, | ||
199 | + 'pluginOptions' => [ | ||
200 | + 'displayOnly' => true, | ||
201 | + 'size' => 'xxs', | ||
202 | + 'min' => 0, | ||
203 | + 'max' => 10, | ||
204 | + 'stars' => 10, | ||
205 | + ], | ||
199 | ]); | 206 | ]); |
200 | ?> | 207 | ?> |
201 | </div> | 208 | </div> |
@@ -211,7 +218,7 @@ | @@ -211,7 +218,7 @@ | ||
211 | ?> | 218 | ?> |
212 | </div> | 219 | </div> |
213 | <div class="performer-vacancy-sidebar-img style"> | 220 | <div class="performer-vacancy-sidebar-img style"> |
214 | - <?= Html::img($this->params[ 'company' ]->userInfo->image); ?> | 221 | + <?= Html::img($this->params[ 'company' ]->userInfo->ShowAvatar($this->params[ 'company' ]->userInfo->image, 180,180)); ?> |
215 | </div> | 222 | </div> |
216 | </div> | 223 | </div> |
217 | </div> | 224 | </div> |
@@ -229,7 +236,9 @@ | @@ -229,7 +236,9 @@ | ||
229 | <script> | 236 | <script> |
230 | $('div.rating').rating( | 237 | $('div.rating').rating( |
231 | { | 238 | { |
232 | - fx : 'full', readOnly : 'true', url : 'rating.php' | 239 | + fx : 'full', |
240 | + readOnly : 'true', | ||
241 | + url : 'rating.php' | ||
233 | } | 242 | } |
234 | ); | 243 | ); |
235 | </script> | 244 | </script> |
frontend/views/layouts/gallery.php
@@ -2,16 +2,16 @@ | @@ -2,16 +2,16 @@ | ||
2 | 2 | ||
3 | use kartik\rating\StarRating; | 3 | use kartik\rating\StarRating; |
4 | use yii\helpers\Html; | 4 | use yii\helpers\Html; |
5 | -use yii\helpers\Url; | ||
6 | -use yii\widgets\Breadcrumbs; | ||
7 | -use yii\widgets\Menu; | 5 | + use yii\helpers\Url; |
6 | + use yii\widgets\Breadcrumbs; | ||
7 | + use yii\widgets\Menu; | ||
8 | 8 | ||
9 | -\frontend\assets\AppAsset::register($this); | ||
10 | -/* @var $content string */ | ||
11 | -$this->beginContent('@app/views/layouts/main.php'); | 9 | + \frontend\assets\AppAsset::register($this); |
10 | + /* @var $content string */ | ||
11 | + $this->beginContent('@app/views/layouts/main.php'); | ||
12 | ?> | 12 | ?> |
13 | <div class="section-box content"> | 13 | <div class="section-box content"> |
14 | - <div class="section-box-16" style="background: url('<?= $this->params['user']->userInfo->poster;?>') 50% no-repeat"> | 14 | + <div class="section-box-16" style="background: url('<?= $this->params[ 'user' ]->userInfo->poster; ?>') 50% no-repeat"> |
15 | <div class="box-wr"> | 15 | <div class="box-wr"> |
16 | <div class="box-all"> | 16 | <div class="box-all"> |
17 | <div class="blog-buttons-wr style"> | 17 | <div class="blog-buttons-wr style"> |
@@ -64,39 +64,44 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -64,39 +64,44 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
64 | 'url' => [ | 64 | 'url' => [ |
65 | 'performer/common', | 65 | 'performer/common', |
66 | 'performer_id' => $this->params[ 'user' ]->id, | 66 | 'performer_id' => $this->params[ 'user' ]->id, |
67 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 67 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
68 | ], | 68 | ], |
69 | ], | 69 | ], |
70 | [ | 70 | [ |
71 | - 'label' => 'Портфолио', | ||
72 | - 'url' => [ | 71 | + 'label' => 'Портфолио', |
72 | + 'url' => [ | ||
73 | 'performer/portfolio', | 73 | 'performer/portfolio', |
74 | 'performer_id' => $this->params[ 'user' ]->id, | 74 | 'performer_id' => $this->params[ 'user' ]->id, |
75 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 75 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
76 | ], | 76 | ], |
77 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | ||
78 | + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, | ||
77 | ], | 79 | ], |
78 | [ | 80 | [ |
79 | - 'label' => 'Заказанные работы', | ||
80 | - 'url' => [ | 81 | + 'label' => 'Заказанные работы', |
82 | + 'url' => [ | ||
81 | 'performer/projects', | 83 | 'performer/projects', |
82 | 'performer_id' => $this->params[ 'user' ]->id, | 84 | 'performer_id' => $this->params[ 'user' ]->id, |
83 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 85 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
84 | ], | 86 | ], |
87 | + 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, | ||
88 | + 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, | ||
85 | ], | 89 | ], |
86 | [ | 90 | [ |
87 | 'label' => 'Блог', | 91 | 'label' => 'Блог', |
88 | 'url' => [ | 92 | 'url' => [ |
89 | 'performer/blog-list', | 93 | 'performer/blog-list', |
90 | 'performer_id' => $this->params[ 'user' ]->id, | 94 | 'performer_id' => $this->params[ 'user' ]->id, |
91 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 95 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
92 | ], | 96 | ], |
97 | + 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, | ||
93 | ], | 98 | ], |
94 | [ | 99 | [ |
95 | 'label' => 'Мнения', | 100 | 'label' => 'Мнения', |
96 | 'url' => [ | 101 | 'url' => [ |
97 | 'performer/review', | 102 | 'performer/review', |
98 | 'performer_id' => $this->params[ 'user' ]->id, | 103 | 'performer_id' => $this->params[ 'user' ]->id, |
99 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 104 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
100 | ], | 105 | ], |
101 | ], | 106 | ], |
102 | [ | 107 | [ |
@@ -104,7 +109,7 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -104,7 +109,7 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
104 | 'url' => [ | 109 | 'url' => [ |
105 | 'performer/workplace', | 110 | 'performer/workplace', |
106 | 'performer_id' => $this->params[ 'user' ]->id, | 111 | 'performer_id' => $this->params[ 'user' ]->id, |
107 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 112 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
108 | ], | 113 | ], |
109 | ], | 114 | ], |
110 | [ | 115 | [ |
@@ -112,7 +117,7 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -112,7 +117,7 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
112 | 'url' => [ | 117 | 'url' => [ |
113 | 'performer/gallery', | 118 | 'performer/gallery', |
114 | 'performer_id' => $this->params[ 'user' ]->id, | 119 | 'performer_id' => $this->params[ 'user' ]->id, |
115 | - 'type' => (!empty($this->params['type']))?$this->params['type']:null, | 120 | + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
116 | ], | 121 | ], |
117 | ], | 122 | ], |
118 | ], | 123 | ], |
@@ -127,53 +132,69 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -127,53 +132,69 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
127 | <div class="performer-vacancy-sidebar-left-wr gallery-page-sidebar"> | 132 | <div class="performer-vacancy-sidebar-left-wr gallery-page-sidebar"> |
128 | <div class="performer-vacancy-sidebar-left"> | 133 | <div class="performer-vacancy-sidebar-left"> |
129 | <div class="performance-vacancy-sidebar-company-wr"> | 134 | <div class="performance-vacancy-sidebar-company-wr"> |
130 | - <div class="performance-vacancy-sidebar-company-title style"><?=$this->params['user']->name?></div> | 135 | + <div class="performance-vacancy-sidebar-company-title style"><?= $this->params[ 'user' ]->name ?></div> |
131 | <div class="performance-vacancy-sidebar-company-job style"> | 136 | <div class="performance-vacancy-sidebar-company-job style"> |
132 | <ul> | 137 | <ul> |
133 | <li class="activejob"> | 138 | <li class="activejob"> |
134 | <?php | 139 | <?php |
135 | - if(!empty($this->params['type']) && $this->params['type'] == 'implementer') { | ||
136 | - echo Html::a('Исполнитель', Url::current(['type' => 'implementer'])); | ||
137 | - } elseif(!empty($this->params['type']) && $this->params['type'] == 'customer') { | ||
138 | - echo Html::a('Заказчик', Url::current(['type' => null])); | 140 | + if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { |
141 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | ||
142 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
143 | + } else { | ||
144 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
145 | + } | ||
139 | } else { | 146 | } else { |
140 | - echo Html::a('Исполнитель', Url::current(['type' => null])); | 147 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
148 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
149 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
150 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
151 | + } else { | ||
152 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
153 | + } | ||
154 | + ?> | ||
155 | + <div class="sidebar-droped-wr style"> | ||
156 | + <ul> | ||
157 | + <li> | ||
158 | + <?php | ||
159 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
160 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
161 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
162 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
163 | + } else { | ||
164 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
165 | + } | ||
166 | + ?> | ||
167 | + </li> | ||
168 | + <li style="display: none"> | ||
169 | + <?php | ||
170 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
171 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
172 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
173 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
174 | + } else { | ||
175 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
176 | + } | ||
177 | + ?> | ||
178 | + </ul> | ||
179 | + </div> | ||
180 | + <?php | ||
141 | } | 181 | } |
142 | ?> | 182 | ?> |
143 | - <div class="sidebar-droped-wr style"> | ||
144 | - <ul> | ||
145 | - <li> | ||
146 | - <?php | ||
147 | - if(!empty($this->params['type']) && $this->params['type'] == 'implementer') { | ||
148 | - echo Html::a('Заказчик', Url::current(['type' => 'customer'])); | ||
149 | - } elseif(!empty($this->params['type']) && $this->params['type'] == 'customer') { | ||
150 | - echo Html::a('Исполнитель', Url::current(['type' => null])); | ||
151 | - } else { | ||
152 | - echo Html::a('Заказчик', Url::current(['type' => 'customer'])); | ||
153 | - } | ||
154 | - ?> | ||
155 | - </li> | ||
156 | - <li style="display: none"> | ||
157 | - <?php | ||
158 | - if(!empty($this->params['type']) && $this->params['type'] == 'implementer') { | ||
159 | - echo Html::a('Исполнитель', Url::current(['type' => 'implementer'])); | ||
160 | - } elseif(!empty($this->params['type']) && $this->params['type'] == 'customer') { | ||
161 | - echo Html::a('Заказчик', Url::current(['type' => null])); | ||
162 | - } else { | ||
163 | - echo Html::a('Исполнитель', Url::current(['type' => null])); | ||
164 | - } | ||
165 | - ?> | ||
166 | - </ul> | ||
167 | - </div> | ||
168 | </li> | 183 | </li> |
169 | </ul> | 184 | </ul> |
170 | </div> | 185 | </div> |
171 | <div class="performance-vacancy-sidebar-stars style"> | 186 | <div class="performance-vacancy-sidebar-stars style"> |
172 | <?php | 187 | <?php |
173 | echo StarRating::widget([ | 188 | echo StarRating::widget([ |
174 | - 'name' => 'rating_company', | ||
175 | - 'value' => $this->params[ 'user' ]->userInfo->rating, | ||
176 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 189 | + 'name' => 'rating_company', |
190 | + 'value' => $this->params[ 'user' ]->userInfo->rating, | ||
191 | + 'pluginOptions' => [ | ||
192 | + 'displayOnly' => true, | ||
193 | + 'size' => 'xxs', | ||
194 | + 'min' => 0, | ||
195 | + 'max' => 10, | ||
196 | + 'stars' => 10, | ||
197 | + ], | ||
177 | ]); | 198 | ]); |
178 | ?> | 199 | ?> |
179 | </div> | 200 | </div> |
@@ -189,7 +210,7 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -189,7 +210,7 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
189 | ?> | 210 | ?> |
190 | </div> | 211 | </div> |
191 | <div class="performer-vacancy-sidebar-img style"> | 212 | <div class="performer-vacancy-sidebar-img style"> |
192 | - <?= Html::img($this->params['user']->userInfo->image);?> | 213 | + <?= Html::img($this->params[ 'user' ]->userInfo->image); ?> |
193 | </div> | 214 | </div> |
194 | </div> | 215 | </div> |
195 | </div> | 216 | </div> |
@@ -205,11 +226,13 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -205,11 +226,13 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
205 | </div> | 226 | </div> |
206 | </div> | 227 | </div> |
207 | <script> | 228 | <script> |
208 | - $('div.rating').rating({ | ||
209 | - fx: 'full', | ||
210 | - readOnly: 'true', | ||
211 | - url: 'rating.php' | ||
212 | - }); | 229 | + $('div.rating').rating( |
230 | + { | ||
231 | + fx : 'full', | ||
232 | + readOnly : 'true', | ||
233 | + url : 'rating.php' | ||
234 | + } | ||
235 | + ); | ||
213 | </script> | 236 | </script> |
214 | 237 | ||
215 | <?php $this->endContent() ?> | 238 | <?php $this->endContent() ?> |
216 | \ No newline at end of file | 239 | \ No newline at end of file |
frontend/views/layouts/main.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | -/* @var $this \yii\web\View */ | ||
4 | -/* @var $content string */ | 3 | + /* @var $this \yii\web\View */ |
4 | + /* @var $content string */ | ||
5 | 5 | ||
6 | -use yii\helpers\Html; | ||
7 | -use yii\widgets\Menu; | ||
8 | -use frontend\assets\AppAsset; | ||
9 | -AppAsset::register($this); | 6 | + use common\modules\comment\models\CommentProject; |
7 | + use yii\helpers\Html; | ||
8 | + use yii\helpers\Url; | ||
9 | + use yii\widgets\Menu; | ||
10 | + use frontend\assets\AppAsset; | ||
11 | + | ||
12 | + AppAsset::register($this); | ||
10 | ?> | 13 | ?> |
11 | 14 | ||
12 | <?php $this->beginPage() ?> | 15 | <?php $this->beginPage() ?> |
@@ -18,8 +21,6 @@ AppAsset::register($this); | @@ -18,8 +21,6 @@ AppAsset::register($this); | ||
18 | <head> | 21 | <head> |
19 | 22 | ||
20 | 23 | ||
21 | - | ||
22 | - | ||
23 | <meta charset="<?= Yii::$app->charset ?>"> | 24 | <meta charset="<?= Yii::$app->charset ?>"> |
24 | 25 | ||
25 | <?= Html::csrfMetaTags() ?> | 26 | <?= Html::csrfMetaTags() ?> |
@@ -39,32 +40,36 @@ AppAsset::register($this); | @@ -39,32 +40,36 @@ AppAsset::register($this); | ||
39 | <a href="/"><img class="logo" src="/images/logo.png" width="100" height="68" alt=""/></a> | 40 | <a href="/"><img class="logo" src="/images/logo.png" width="100" height="68" alt=""/></a> |
40 | <div class="header-proektant-slogan">Международная Федерация Проектантов</div> | 41 | <div class="header-proektant-slogan">Международная Федерация Проектантов</div> |
41 | <ul class="header-contacts-menu"> | 42 | <ul class="header-contacts-menu"> |
42 | - <li><span><img src="/images/icon_question_01.png" alt=""/></span><?= Html::a('Задать вопрос','', ['class' =>'contactsLinkModalFirst'])?></li> | ||
43 | - <li><span><img src="/images/icon_help_01.png" alt=""/></span><?= Html::a('Помощь',['/site/help'], ['class' =>'contactsLinkModal'])?></li> | 43 | + <li> |
44 | + <span><img src="/images/icon_question_01.png" alt=""/></span><?= Html::a('Задать вопрос', '', [ 'class' => 'contactsLinkModalFirst' ]) ?> | ||
45 | + </li> | ||
46 | + <li> | ||
47 | + <span><img src="/images/icon_help_01.png" alt=""/></span><?= Html::a('Помощь', [ '/site/help' ], [ 'class' => 'contactsLinkModal' ]) ?> | ||
48 | + </li> | ||
44 | </ul> | 49 | </ul> |
45 | <div class="header-cabinet-wr"> | 50 | <div class="header-cabinet-wr"> |
46 | <?php | 51 | <?php |
47 | - if (Yii::$app->user->isGuest): ?> | ||
48 | - <div class="header-cabinet-foto"> | 52 | + if(Yii::$app->user->isGuest): ?> |
53 | + <div class="header-cabinet-foto"> | ||
49 | 54 | ||
50 | - </div> | ||
51 | - <div class="header-cabinet-profile not-login">Профиль</div> | ||
52 | - <div> | ||
53 | - <?= Html::a('Вход',['/site/login'], ['class'=>'loginLinkModal']) ?> | ||
54 | - <?= Html::a('Регистрация',['/site/registration']) ?> | ||
55 | - </div> | 55 | + </div> |
56 | + <div class="header-cabinet-profile not-login">Профиль</div> | ||
57 | + <div> | ||
58 | + <?= Html::a('Вход', [ '/site/login' ], [ 'class' => 'loginLinkModal' ]) ?> | ||
59 | + <?= Html::a('Регистрация', [ '/site/registration' ]) ?> | ||
60 | + </div> | ||
56 | 61 | ||
57 | - <?php else : ?> | ||
58 | - <div class="header-cabinet-foto"> | ||
59 | - <?php | ||
60 | - if(!empty(\Yii::$app->user->identity->userInfo->image)) { | ||
61 | - echo Html::img(Yii::$app->user->identity->minImg(Yii::$app->user->identity->userInfo->image,48,48)); | ||
62 | - } | ||
63 | - ?> | ||
64 | - </div> | ||
65 | - <div class="header-cabinet-profile">Профиль</div> | ||
66 | - <?= Html::a(Yii::$app->user->identity->email,['/accounts']) ?> | ||
67 | - <?php endif; ?> | 62 | + <?php else : ?> |
63 | + <div class="header-cabinet-foto"> | ||
64 | + <?php | ||
65 | + if(!empty( \Yii::$app->user->identity->userInfo->image )) { | ||
66 | + echo Html::img(Yii::$app->user->identity->minImg(Yii::$app->user->identity->userInfo->image, 48, 48)); | ||
67 | + } | ||
68 | + ?> | ||
69 | + </div> | ||
70 | + <div class="header-cabinet-profile">Профиль</div> | ||
71 | + <?= Html::a(Yii::$app->user->identity->email, [ '/accounts' ]) ?> | ||
72 | + <?php endif; ?> | ||
68 | 73 | ||
69 | </div> | 74 | </div> |
70 | </div> | 75 | </div> |
@@ -82,18 +87,18 @@ AppAsset::register($this); | @@ -82,18 +87,18 @@ AppAsset::register($this); | ||
82 | 87 | ||
83 | <li> | 88 | <li> |
84 | <?php | 89 | <?php |
85 | - if(\Yii::$app->user->isGuest) { | ||
86 | - echo Html::a('Войти в профиль', ['site/login']); | ||
87 | - } else { | ||
88 | - echo Html::a('Редактировать профиль', ['accounts/']); | ||
89 | - } | 90 | + if(\Yii::$app->user->isGuest) { |
91 | + echo Html::a('Войти в профиль', [ 'site/login' ]); | ||
92 | + } else { | ||
93 | + echo Html::a('Редактировать профиль', [ 'accounts/' ]); | ||
94 | + } | ||
90 | ?> | 95 | ?> |
91 | </li> | 96 | </li> |
92 | </ul> | 97 | </ul> |
93 | <ul> | 98 | <ul> |
94 | - <li><?= Html::a(Yii::t('app', 'Project list'), ['search/project'])?></li> | ||
95 | - <li><?= Html::a('Список вакансий', ['search/vacancy'])?></li> | ||
96 | - <li><?= Html::a('Список заказчиков', ['search/customer'])?></li> | 99 | + <li><?= Html::a(Yii::t('app', 'Project list'), [ 'search/project' ]) ?></li> |
100 | + <li><?= Html::a('Список вакансий', [ 'search/vacancy' ]) ?></li> | ||
101 | + <li><?= Html::a('Список заказчиков', [ 'search/customer' ]) ?></li> | ||
97 | </ul> | 102 | </ul> |
98 | </div> | 103 | </div> |
99 | </li> | 104 | </li> |
@@ -102,13 +107,19 @@ AppAsset::register($this); | @@ -102,13 +107,19 @@ AppAsset::register($this); | ||
102 | <div class="main-menu-hover"> | 107 | <div class="main-menu-hover"> |
103 | <ul> | 108 | <ul> |
104 | 109 | ||
105 | - <li><?= Html::a(Yii::t('app', 'Add project'), ['accounts/projects-create'])?></li> | ||
106 | - <li><?= Html::a('Разместить вакансию', ['accounts/vacancy'])?></li> | 110 | + <li><?= Html::a(Yii::t('app', 'Add project'), [ 'accounts/projects-create' ]) ?></li> |
111 | + <li><?= Html::a('Разместить вакансию', [ 'accounts/vacancy' ]) ?></li> | ||
107 | </ul> | 112 | </ul> |
108 | <ul> | 113 | <ul> |
109 | 114 | ||
110 | - <li><?= Html::a('Список проектантов', ['search/performer','SearchPerformerForm[type]'=>'1'])?></li> | ||
111 | - <li><?= Html::a('Список проектных компаний', ['search/performer','SearchPerformerForm[type]'=>'2'])?></li> | 115 | + <li><?= Html::a('Список проектантов', [ |
116 | + 'search/performer', | ||
117 | + 'SearchPerformerForm[type]' => '1', | ||
118 | + ]) ?></li> | ||
119 | + <li><?= Html::a('Список проектных компаний', [ | ||
120 | + 'search/performer', | ||
121 | + 'SearchPerformerForm[type]' => '2', | ||
122 | + ]) ?></li> | ||
112 | </ul> | 123 | </ul> |
113 | </div> | 124 | </div> |
114 | </li> | 125 | </li> |
@@ -117,28 +128,28 @@ AppAsset::register($this); | @@ -117,28 +128,28 @@ AppAsset::register($this); | ||
117 | <div class="main-menu-hover"> | 128 | <div class="main-menu-hover"> |
118 | <ul> | 129 | <ul> |
119 | 130 | ||
120 | - <li><?= Html::a(Yii::t('app', 'Add project'), ['accounts/projects-create'])?></li> | ||
121 | - <li><?= Html::a('Разместить вакансию', ['accounts/vacancy-create'])?></li> | ||
122 | - <li><?= Html::a('Редактировать портфолио', ['accounts/portfolio'])?></li> | 131 | + <li><?= Html::a(Yii::t('app', 'Add project'), [ 'accounts/projects-create' ]) ?></li> |
132 | + <li><?= Html::a('Разместить вакансию', [ 'accounts/vacancy-create' ]) ?></li> | ||
133 | + <li><?= Html::a('Редактировать портфолио', [ 'accounts/portfolio' ]) ?></li> | ||
123 | </ul> | 134 | </ul> |
124 | <ul> | 135 | <ul> |
125 | - <li><?= Html::a('Список проектантов', ['search/performer'])?></li> | ||
126 | - <li><?= Html::a(Yii::t('app', 'Project list'), ['search/project'])?></li> | ||
127 | - <li><?= Html::a('Список заказчиков', ['search/customer'])?></li> | 136 | + <li><?= Html::a('Список проектантов', [ 'search/performer' ]) ?></li> |
137 | + <li><?= Html::a(Yii::t('app', 'Project list'), [ 'search/project' ]) ?></li> | ||
138 | + <li><?= Html::a('Список заказчиков', [ 'search/customer' ]) ?></li> | ||
128 | </ul> | 139 | </ul> |
129 | </div> | 140 | </div> |
130 | </li> | 141 | </li> |
131 | </ul> | 142 | </ul> |
132 | 143 | ||
133 | <div class="search-main-menu"> | 144 | <div class="search-main-menu"> |
134 | - <form action=""> | ||
135 | - <input value="" name="" type="search"/> | ||
136 | - <input type="hidden" value="1" name="" /> | 145 | + <form action="<?= Url::to([ 'search/common' ]) ?>" method="get"> |
146 | + <input value="" name="query" type="text"/> | ||
147 | + <input type="hidden" value="1" name="action"/> | ||
137 | <button type="submit" value=""></button> | 148 | <button type="submit" value=""></button> |
138 | <div class="search-list"> | 149 | <div class="search-list"> |
139 | - <span><?=Yii::t('app', 'Projects')?></span> | 150 | + <span><?= Yii::t('app', 'Projects') ?></span> |
140 | <ul class="search-ul"> | 151 | <ul class="search-ul"> |
141 | - <li><?=Yii::t('app', 'Projects')?></li> | 152 | + <li><?= Yii::t('app', 'Projects') ?></li> |
142 | <li>Исполнители</li> | 153 | <li>Исполнители</li> |
143 | <li>Заказчики</li> | 154 | <li>Заказчики</li> |
144 | </ul> | 155 | </ul> |
@@ -148,25 +159,25 @@ AppAsset::register($this); | @@ -148,25 +159,25 @@ AppAsset::register($this); | ||
148 | <?php | 159 | <?php |
149 | if(!\Yii::$app->user->isGuest) { | 160 | if(!\Yii::$app->user->isGuest) { |
150 | echo Menu::widget([ | 161 | echo Menu::widget([ |
151 | - 'options' => [ | ||
152 | - 'tag' => 'div', | 162 | + 'options' => [ |
163 | + 'tag' => 'div', | ||
153 | 'class' => 'main-menu-icons-wr', | 164 | 'class' => 'main-menu-icons-wr', |
154 | ], | 165 | ], |
155 | 'itemOptions' => [ | 166 | 'itemOptions' => [ |
156 | 'tag' => false, | 167 | 'tag' => false, |
157 | ], | 168 | ], |
158 | - 'items' => [ | 169 | + 'items' => [ |
159 | [ | 170 | [ |
160 | - 'url' => ['/projects'], | ||
161 | - 'template' => '<a href="{url}" class="main-menu-icons-home"><span>'.count(\Yii::$app->user->identity->commentProjects).'</span></a>', | 171 | + 'url' => [ '/projects' ], |
172 | + 'template' => '<a href="{url}" class="main-menu-icons-home"><span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span></a>', | ||
162 | ], | 173 | ], |
163 | [ | 174 | [ |
164 | - 'url' => ['chat/list'], | ||
165 | - 'template' => '<a href="{url}" class="main-menu-icons-edit"><span>'.\Yii::$app->user->identity->chatCount.'</span></a>', | 175 | + 'url' => [ 'chat/list' ], |
176 | + 'template' => '<a href="{url}" class="main-menu-icons-edit"><span>' . \Yii::$app->user->identity->newMessagesCount . '</span></a>', | ||
166 | ], | 177 | ], |
167 | [ | 178 | [ |
168 | - 'url' => ['/bookmarks'], | ||
169 | - 'template' => "<a href='{url}' class='main-menu-icons-copy'><span>".count(\Yii::$app->user->identity->bookmarks)."</span></a>", | 179 | + 'url' => [ '/bookmarks' ], |
180 | + 'template' => "<a href='{url}' class='main-menu-icons-copy'><span>" . count(\Yii::$app->user->identity->bookmarks) . "</span></a>", | ||
170 | ], | 181 | ], |
171 | ], | 182 | ], |
172 | ]); | 183 | ]); |
@@ -189,70 +200,81 @@ AppAsset::register($this); | @@ -189,70 +200,81 @@ AppAsset::register($this); | ||
189 | <div class="footer-all-wr"> | 200 | <div class="footer-all-wr"> |
190 | <div class="footer-menu-wrapper first-footer-menu"> | 201 | <div class="footer-menu-wrapper first-footer-menu"> |
191 | <?php | 202 | <?php |
203 | + $items = [ | ||
204 | + [ | ||
205 | + 'label' => Yii::t('app', 'Projects'), | ||
206 | + 'url' => [ 'search/project' ], | ||
207 | + ], | ||
208 | + [ | ||
209 | + 'label' => 'Вакансии', | ||
210 | + 'url' => [ 'search/vacancy' ], | ||
211 | + ], | ||
212 | + [ | ||
213 | + 'label' => 'Рейтинг проектантов', | ||
214 | + 'url' => [ 'search/performer' ], | ||
215 | + ], | ||
216 | + ]; | ||
217 | + if(empty( \Yii::$app->user->id )) { | ||
218 | + array_unshift($items, [ | ||
219 | + 'label' => 'Регистрация проектанта', | ||
220 | + 'url' => [ '/site/registration' ], | ||
221 | + ]); | ||
222 | + } | ||
192 | echo Menu::widget([ | 223 | echo Menu::widget([ |
193 | 'options' => [ | 224 | 'options' => [ |
194 | 'class' => 'footer-menu', | 225 | 'class' => 'footer-menu', |
195 | ], | 226 | ], |
196 | - 'items' => [ | ||
197 | - [ | ||
198 | - 'label' => 'Регистрация проектанта', | ||
199 | - 'url' => ['site/signup'], | ||
200 | - ], | ||
201 | - [ | ||
202 | - 'label' => Yii::t('app', 'Projects'), | ||
203 | - 'url' => ['search/project'], | ||
204 | - ], | ||
205 | - [ | ||
206 | - 'label' => 'Вакансии', | ||
207 | - 'url' => ['search/vacancy'], | ||
208 | - ], | ||
209 | - [ | ||
210 | - 'label' => 'Рейтинг проектантов', | ||
211 | - 'url' => ['search/performer'], | ||
212 | - ], | ||
213 | - ] | 227 | + 'items' => $items, |
214 | ]); | 228 | ]); |
229 | + unset( $items ); | ||
215 | ?> | 230 | ?> |
216 | </div> | 231 | </div> |
217 | 232 | ||
218 | <div class="footer-menu-wrapper second-footer-menu"> | 233 | <div class="footer-menu-wrapper second-footer-menu"> |
219 | <?php | 234 | <?php |
235 | + $items = [ | ||
236 | + [ | ||
237 | + 'label' => 'Рейтинг компаний', | ||
238 | + 'url' => [ | ||
239 | + 'search/performer', | ||
240 | + 'SearchPerformerForm[type]' => 2, | ||
241 | + ], | ||
242 | + ], | ||
243 | + ]; | ||
244 | + if(empty( \Yii::$app->user->id )) { | ||
245 | + array_unshift($items, [ | ||
246 | + 'label' => 'Регистрация заказчика', | ||
247 | + 'url' => [ '/site/registration' ], | ||
248 | + ]); | ||
249 | + } | ||
220 | echo Menu::widget([ | 250 | echo Menu::widget([ |
221 | 'options' => [ | 251 | 'options' => [ |
222 | 'class' => 'footer-menu', | 252 | 'class' => 'footer-menu', |
223 | ], | 253 | ], |
224 | - 'items' => [ | ||
225 | - [ | ||
226 | - 'label' => 'Регистрация заказчика', | ||
227 | - 'url' => ['site/signup'], | ||
228 | - ], | ||
229 | - [ | ||
230 | - 'label' => 'Рейтинг компаний', | ||
231 | - 'url' => ['search/index'], | ||
232 | - ], | ||
233 | - ] | 254 | + 'items' => $items, |
234 | ]); | 255 | ]); |
256 | + unset( $items ); | ||
235 | ?> | 257 | ?> |
236 | <div class="footer-menu-project"> | 258 | <div class="footer-menu-project"> |
237 | <?php | 259 | <?php |
238 | echo Menu::widget([ | 260 | echo Menu::widget([ |
239 | - 'options' => [ | ||
240 | - 'tag' => 'div', | 261 | + 'options' => [ |
262 | + 'tag' => 'div', | ||
241 | 'class' => 'footer-menu-project-ico', | 263 | 'class' => 'footer-menu-project-ico', |
242 | ], | 264 | ], |
243 | 'encodeLabels' => false, | 265 | 'encodeLabels' => false, |
244 | - 'itemOptions' => [ | 266 | + 'itemOptions' => [ |
245 | 'tag' => false, | 267 | 'tag' => false, |
246 | ], | 268 | ], |
247 | 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', | 269 | 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', |
248 | - 'items' => [ | 270 | + 'items' => [ |
249 | [ | 271 | [ |
250 | 'label' => "<img src='/images/soc-ico-1.png' alt=''/>", | 272 | 'label' => "<img src='/images/soc-ico-1.png' alt=''/>", |
251 | - 'url' => 'http://rss.com', | 273 | + 'url' => 'http://rss.com', |
252 | ], | 274 | ], |
253 | [ | 275 | [ |
254 | 'label' => "<img src='/images/soc-ico-2.png' alt=''/>", | 276 | 'label' => "<img src='/images/soc-ico-2.png' alt=''/>", |
255 | - 'url' => 'http://twitter.com', | 277 | + 'url' => 'http://twitter.com', |
256 | ], | 278 | ], |
257 | ], | 279 | ], |
258 | ]); | 280 | ]); |
@@ -263,49 +285,56 @@ AppAsset::register($this); | @@ -263,49 +285,56 @@ AppAsset::register($this); | ||
263 | 285 | ||
264 | <div class="footer-menu-wrapper third-footer-menu"> | 286 | <div class="footer-menu-wrapper third-footer-menu"> |
265 | <?php | 287 | <?php |
266 | - echo Menu::widget([ | ||
267 | - 'options' => [ | ||
268 | - 'class' => 'footer-menu', | ||
269 | - ], | ||
270 | - 'items' => [ | ||
271 | - [ | ||
272 | - 'label' => 'Регистрация компаний', | ||
273 | - 'url' => ['site/signup'], | ||
274 | - ], | 288 | + $items = [ |
275 | [ | 289 | [ |
276 | 'label' => 'Рейтинг компаний', | 290 | 'label' => 'Рейтинг компаний', |
277 | - 'url' => ['search/company'], | 291 | + 'url' => [ |
292 | + 'search/performer', | ||
293 | + 'SearchPerformerForm[type]' => 2, | ||
294 | + ], | ||
278 | ], | 295 | ], |
279 | - ] | ||
280 | - ]); | ||
281 | - ?> | ||
282 | - <div class="footer-menu-project-two"> | ||
283 | - <?php | 296 | + ]; |
297 | + if(empty( \Yii::$app->user->id )) { | ||
298 | + array_unshift($items, [ | ||
299 | + 'label' => 'Регистрация компаний', | ||
300 | + 'url' => [ '/site/registration' ], | ||
301 | + ]); | ||
302 | + } | ||
284 | echo Menu::widget([ | 303 | echo Menu::widget([ |
285 | 'options' => [ | 304 | 'options' => [ |
286 | - 'tag' => 'div', | ||
287 | - 'class' => 'footer-menu-project-ico', | ||
288 | - ], | ||
289 | - 'encodeLabels' => false, | ||
290 | - 'itemOptions' => [ | ||
291 | - 'tag' => false, | 305 | + 'class' => 'footer-menu', |
292 | ], | 306 | ], |
293 | - 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', | ||
294 | - 'items' => [ | ||
295 | - [ | ||
296 | - 'label' => "<img src='/images/soc-ico-3.png' alt=''/>", | ||
297 | - 'url' => 'http://fb.com', | 307 | + 'items' => $items, |
308 | + ]); | ||
309 | + unset( $items ); | ||
310 | + ?> | ||
311 | + <div class="footer-menu-project-two"> | ||
312 | + <?php | ||
313 | + echo Menu::widget([ | ||
314 | + 'options' => [ | ||
315 | + 'tag' => 'div', | ||
316 | + 'class' => 'footer-menu-project-ico', | ||
298 | ], | 317 | ], |
299 | - [ | ||
300 | - 'label' => "<img src='/images/soc-ico-4.png' alt=''/>", | ||
301 | - 'url' => 'http://vk.com', | 318 | + 'encodeLabels' => false, |
319 | + 'itemOptions' => [ | ||
320 | + 'tag' => false, | ||
302 | ], | 321 | ], |
303 | - [ | ||
304 | - 'label' => "<img src='/images/soc-ico-5.png' alt=''/>", | ||
305 | - 'url' => 'http://plus.google.com', | 322 | + 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', |
323 | + 'items' => [ | ||
324 | + [ | ||
325 | + 'label' => "<img src='/images/soc-ico-3.png' alt=''/>", | ||
326 | + 'url' => 'http://fb.com', | ||
327 | + ], | ||
328 | + [ | ||
329 | + 'label' => "<img src='/images/soc-ico-4.png' alt=''/>", | ||
330 | + 'url' => 'http://vk.com', | ||
331 | + ], | ||
332 | + [ | ||
333 | + 'label' => "<img src='/images/soc-ico-5.png' alt=''/>", | ||
334 | + 'url' => 'http://plus.google.com', | ||
335 | + ], | ||
306 | ], | 336 | ], |
307 | - ], | ||
308 | - ]); | 337 | + ]); |
309 | ?> | 338 | ?> |
310 | <div class="footer-menu-project-ico-txt">новости сервера</div> | 339 | <div class="footer-menu-project-ico-txt">новости сервера</div> |
311 | </div> | 340 | </div> |
@@ -313,41 +342,43 @@ AppAsset::register($this); | @@ -313,41 +342,43 @@ AppAsset::register($this); | ||
313 | 342 | ||
314 | <div class="footer-menu-wrapper last-footer-menu"> | 343 | <div class="footer-menu-wrapper last-footer-menu"> |
315 | <?php | 344 | <?php |
316 | - echo Menu::widget([ | ||
317 | - 'options' => [ | ||
318 | - 'class' => 'footer-menu', | ||
319 | - ], | ||
320 | - 'items' => [ | ||
321 | - [ | ||
322 | - 'label' => 'Русский', | ||
323 | - 'url' => [' '] | ||
324 | - ], | ||
325 | - [ | ||
326 | - 'label' => 'Конфиденциальность', | ||
327 | - 'url' => [' '] | ||
328 | - ], | ||
329 | - [ | ||
330 | - 'label' => 'Условия использования', | ||
331 | - 'url' => [' '] | ||
332 | - ], | ||
333 | - [ | ||
334 | - 'label' => 'Файлы cookie', | ||
335 | - 'url' => [' '] | ||
336 | - ], | ||
337 | - [ | ||
338 | - 'label' => 'Реклама', | ||
339 | - 'url' => [' '] | ||
340 | - ], | ||
341 | - [ | ||
342 | - 'label' => 'Ad Choices', | ||
343 | - 'url' => [' '] | 345 | + /* No content |
346 | + echo Menu::widget([ | ||
347 | + 'options' => [ | ||
348 | + 'class' => 'footer-menu', | ||
344 | ], | 349 | ], |
345 | - [ | ||
346 | - 'label' => 'Еще', | ||
347 | - 'url' => [' '] | 350 | + 'items' => [ |
351 | + [ | ||
352 | + 'label' => 'Русский', | ||
353 | + 'url' => [ ' ' ], | ||
354 | + ], | ||
355 | + [ | ||
356 | + 'label' => 'Конфиденциальность', | ||
357 | + 'url' => [ ' ' ], | ||
358 | + ], | ||
359 | + [ | ||
360 | + 'label' => 'Условия использования', | ||
361 | + 'url' => [ ' ' ], | ||
362 | + ], | ||
363 | + [ | ||
364 | + 'label' => 'Файлы cookie', | ||
365 | + 'url' => [ ' ' ], | ||
366 | + ], | ||
367 | + [ | ||
368 | + 'label' => 'Реклама', | ||
369 | + 'url' => [ ' ' ], | ||
370 | + ], | ||
371 | + [ | ||
372 | + 'label' => 'Ad Choices', | ||
373 | + 'url' => [ ' ' ], | ||
374 | + ], | ||
375 | + [ | ||
376 | + 'label' => 'Еще', | ||
377 | + 'url' => [ ' ' ], | ||
378 | + ], | ||
348 | ], | 379 | ], |
349 | - ] | ||
350 | - ]); | 380 | + ]); |
381 | + */ | ||
351 | ?> | 382 | ?> |
352 | </div> | 383 | </div> |
353 | 384 | ||
@@ -365,7 +396,7 @@ AppAsset::register($this); | @@ -365,7 +396,7 @@ AppAsset::register($this); | ||
365 | <div class="artweb-wr"> | 396 | <div class="artweb-wr"> |
366 | <a target="_blank" href="http://artweb.ua/">Создание сайтов</a> | 397 | <a target="_blank" href="http://artweb.ua/">Создание сайтов</a> |
367 | <div class="artweb-img"> | 398 | <div class="artweb-img"> |
368 | - <a target="_blank" href="http://artweb.ua/"><img src="/images/artweb.png" /></a> | 399 | + <a target="_blank" href="http://artweb.ua/"><img src="/images/artweb.png"/></a> |
369 | </div> | 400 | </div> |
370 | </div> | 401 | </div> |
371 | </div> | 402 | </div> |
frontend/views/layouts/performer.php
@@ -80,6 +80,7 @@ | @@ -80,6 +80,7 @@ | ||
80 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 80 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
81 | ], | 81 | ], |
82 | 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | 82 | 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, |
83 | + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, | ||
83 | ], | 84 | ], |
84 | [ | 85 | [ |
85 | 'label' => 'Заказанные работы', | 86 | 'label' => 'Заказанные работы', |
@@ -89,6 +90,7 @@ | @@ -89,6 +90,7 @@ | ||
89 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 90 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
90 | ], | 91 | ], |
91 | 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, | 92 | 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, |
93 | + 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, | ||
92 | ], | 94 | ], |
93 | [ | 95 | [ |
94 | 'label' => 'Блог', | 96 | 'label' => 'Блог', |
@@ -97,6 +99,7 @@ | @@ -97,6 +99,7 @@ | ||
97 | 'performer_id' => $this->params[ 'user' ]->id, | 99 | 'performer_id' => $this->params[ 'user' ]->id, |
98 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 100 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
99 | ], | 101 | ], |
102 | + 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, | ||
100 | ], | 103 | ], |
101 | [ | 104 | [ |
102 | 'label' => 'Мнения', | 105 | 'label' => 'Мнения', |
@@ -139,48 +142,64 @@ | @@ -139,48 +142,64 @@ | ||
139 | <ul> | 142 | <ul> |
140 | <li class="activejob"> | 143 | <li class="activejob"> |
141 | <?php | 144 | <?php |
142 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
143 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
144 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
145 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 145 | + if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { |
146 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | ||
147 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
148 | + } else { | ||
149 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
150 | + } | ||
146 | } else { | 151 | } else { |
147 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 152 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
153 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
154 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
155 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
156 | + } else { | ||
157 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
158 | + } | ||
159 | + ?> | ||
160 | + <div class="sidebar-droped-wr style"> | ||
161 | + <ul> | ||
162 | + <li> | ||
163 | + <?php | ||
164 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
165 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
166 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
167 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
168 | + } else { | ||
169 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
170 | + } | ||
171 | + ?> | ||
172 | + </li> | ||
173 | + <li style="display: none"> | ||
174 | + <?php | ||
175 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
176 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
177 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
178 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
179 | + } else { | ||
180 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
181 | + } | ||
182 | + ?> | ||
183 | + </ul> | ||
184 | + </div> | ||
185 | + <?php | ||
148 | } | 186 | } |
149 | ?> | 187 | ?> |
150 | - <div class="sidebar-droped-wr style"> | ||
151 | - <ul> | ||
152 | - <li> | ||
153 | - <?php | ||
154 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
155 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
156 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
157 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
158 | - } else { | ||
159 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
160 | - } | ||
161 | - ?> | ||
162 | - </li> | ||
163 | - <li style="display: none"> | ||
164 | - <?php | ||
165 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
166 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
167 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
168 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
169 | - } else { | ||
170 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
171 | - } | ||
172 | - ?> | ||
173 | - </ul> | ||
174 | - </div> | ||
175 | </li> | 188 | </li> |
176 | </ul> | 189 | </ul> |
177 | </div> | 190 | </div> |
178 | <div class="performance-vacancy-sidebar-stars style"> | 191 | <div class="performance-vacancy-sidebar-stars style"> |
179 | <?php | 192 | <?php |
180 | echo StarRating::widget([ | 193 | echo StarRating::widget([ |
181 | - 'name' => 'rating_company', | ||
182 | - 'value' => $this->params[ 'user' ]->userInfo->rating, | ||
183 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 194 | + 'name' => 'rating_company', |
195 | + 'value' => $this->params[ 'user' ]->userInfo->rating, | ||
196 | + 'pluginOptions' => [ | ||
197 | + 'displayOnly' => true, | ||
198 | + 'size' => 'xxs', | ||
199 | + 'min' => 0, | ||
200 | + 'max' => 10, | ||
201 | + 'stars' => 10, | ||
202 | + ], | ||
184 | ]); | 203 | ]); |
185 | ?> | 204 | ?> |
186 | </div> | 205 | </div> |
@@ -260,7 +279,7 @@ | @@ -260,7 +279,7 @@ | ||
260 | <span class="sidebar-views-txt">Стоимость работ:<br/></span> | 279 | <span class="sidebar-views-txt">Стоимость работ:<br/></span> |
261 | <?php | 280 | <?php |
262 | if(!empty( $this->params[ 'user' ]->userInfo->salary )) { | 281 | if(!empty( $this->params[ 'user' ]->userInfo->salary )) { |
263 | - echo 'от '.$this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label.' за час'; | 282 | + echo 'от ' . $this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label . ' за час'; |
264 | } else { | 283 | } else { |
265 | echo 'Не указано'; | 284 | echo 'Не указано'; |
266 | } | 285 | } |
@@ -308,7 +327,9 @@ | @@ -308,7 +327,9 @@ | ||
308 | <script> | 327 | <script> |
309 | $('div.rating').rating( | 328 | $('div.rating').rating( |
310 | { | 329 | { |
311 | - fx : 'full', readOnly : 'true', url : 'rating.php' | 330 | + fx : 'full', |
331 | + readOnly : 'true', | ||
332 | + url : 'rating.php' | ||
312 | } | 333 | } |
313 | ); | 334 | ); |
314 | </script> | 335 | </script> |
frontend/views/performer/common.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | * @var array $developments | 10 | * @var array $developments |
11 | * @var array $educations | 11 | * @var array $educations |
12 | * @var array $courses | 12 | * @var array $courses |
13 | - * @var int[] $geography | 13 | + * @var int[] $geography |
14 | */ | 14 | */ |
15 | $this->params[ 'user' ] = $user; | 15 | $this->params[ 'user' ] = $user; |
16 | 16 | ||
@@ -23,10 +23,10 @@ | @@ -23,10 +23,10 @@ | ||
23 | if(!$first) { | 23 | if(!$first) { |
24 | $geographyString .= ', '; | 24 | $geographyString .= ', '; |
25 | } | 25 | } |
26 | - $geographyString .= $city . ' ('.$count.')'; | 26 | + $geographyString .= $city . ' (' . $count . ')'; |
27 | $first = 0; | 27 | $first = 0; |
28 | } | 28 | } |
29 | - unset($first); | 29 | + unset( $first ); |
30 | ?> | 30 | ?> |
31 | <div class="proektant-profile-content"> | 31 | <div class="proektant-profile-content"> |
32 | <?php | 32 | <?php |
@@ -236,11 +236,17 @@ | @@ -236,11 +236,17 @@ | ||
236 | <div class="company-performer-comments-bl"> | 236 | <div class="company-performer-comments-bl"> |
237 | <?php | 237 | <?php |
238 | if(!empty( $user->comments[ $i ]->rating )) { | 238 | if(!empty( $user->comments[ $i ]->rating )) { |
239 | - echo StarRating::widget([ | ||
240 | - 'name' => 'rating_common', | ||
241 | - 'value' => $user->comments[ $i ]->rating->value, | ||
242 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | ||
243 | - ]); | 239 | + echo StarRating::widget([ |
240 | + 'name' => 'rating_common', | ||
241 | + 'value' => $user->comments[ $i ]->rating->value, | ||
242 | + 'pluginOptions' => [ | ||
243 | + 'displayOnly' => true, | ||
244 | + 'size' => 'xxs', | ||
245 | + 'min' => 0, | ||
246 | + 'max' => 10, | ||
247 | + 'stars' => 10, | ||
248 | + ], | ||
249 | + ]); | ||
244 | } | 250 | } |
245 | ?> | 251 | ?> |
246 | <div class="company-performer-comments-autor">Мнение от: <?= $user->comments[ $i ]->getAuthor(' (Гость)') ?></div> | 252 | <div class="company-performer-comments-autor">Мнение от: <?= $user->comments[ $i ]->getAuthor(' (Гость)') ?></div> |
frontend/views/performer/gallery.php
@@ -9,31 +9,35 @@ | @@ -9,31 +9,35 @@ | ||
9 | $this->params[ 'user' ] = $user; | 9 | $this->params[ 'user' ] = $user; |
10 | $this->title = 'My Yii Application'; | 10 | $this->title = 'My Yii Application'; |
11 | ?> | 11 | ?> |
12 | -<div class="video-performer-wrapper style"> | ||
13 | - <div class="gallery-title">Видео: <?= count($videos) ?></div> | ||
14 | - <div class="slider-video-wr"> | ||
15 | - <div id="demo5" class="scroll-img video-slider"> | ||
16 | - <ul> | ||
17 | - <?php foreach($videos as $video): ?> | ||
18 | - <li> | ||
19 | - <div class="iframe-video"> | ||
20 | - <iframe width="560" height="320" src="<?= $video[ 'youtube' ] ?>" frameborder="0" allowfullscreen></iframe> | ||
21 | - </div> | 12 | +<?php |
13 | + if(!empty( $videos )) { | ||
14 | + ?> | ||
15 | + <div class="video-performer-wrapper style"> | ||
16 | + <div class="gallery-title">Видео: <?= count($videos) ?></div> | ||
17 | + <div class="slider-video-wr"> | ||
18 | + <div id="demo5" class="scroll-img video-slider"> | ||
19 | + <ul> | ||
20 | + <?php foreach($videos as $video): ?> | ||
21 | + <li> | ||
22 | + <div class="iframe-video"> | ||
23 | + <iframe width="560" height="320" src="<?= $video[ 'youtube' ] ?>" frameborder="0" allowfullscreen></iframe> | ||
24 | + </div> | ||
22 | 25 | ||
23 | - <a href="#"></a><span></span> | ||
24 | - </li> | ||
25 | - <?php endforeach; ?> | 26 | + <a href="#"></a><span></span> |
27 | + </li> | ||
28 | + <?php endforeach; ?> | ||
26 | 29 | ||
27 | - </ul> | ||
28 | - </div> | ||
29 | - <div id="demo5-btn" class="text-center"> | ||
30 | - <button class="btn" id="demo5-backward"></button> | ||
31 | - <button class="btn" id="demo5-forward"></button> | 30 | + </ul> |
31 | + </div> | ||
32 | + <div id="demo5-btn" class="text-center"> | ||
33 | + <button class="btn" id="demo5-backward"></button> | ||
34 | + <button class="btn" id="demo5-forward"></button> | ||
35 | + </div> | ||
36 | + </div> | ||
32 | </div> | 37 | </div> |
33 | - </div> | ||
34 | - | ||
35 | - | ||
36 | -</div> | 38 | + <?php |
39 | + } | ||
40 | +?> | ||
37 | <div class="gallery-performer-wrapper style"> | 41 | <div class="gallery-performer-wrapper style"> |
38 | <div class="gallery-performer-margin"> | 42 | <div class="gallery-performer-margin"> |
39 | <?= ListView::widget([ | 43 | <?= ListView::widget([ |
@@ -50,7 +54,9 @@ | @@ -50,7 +54,9 @@ | ||
50 | { | 54 | { |
51 | $('#demo5').scrollbox( | 55 | $('#demo5').scrollbox( |
52 | { | 56 | { |
53 | - direction : 'h', distance : 220, autoPlay : false | 57 | + direction : 'h', |
58 | + distance : 220, | ||
59 | + autoPlay : false | ||
54 | } | 60 | } |
55 | ); | 61 | ); |
56 | $('#demo5-backward').click( | 62 | $('#demo5-backward').click( |
frontend/views/performer/portfolio-view.php
@@ -80,6 +80,9 @@ | @@ -80,6 +80,9 @@ | ||
80 | 'pluginOptions' => [ | 80 | 'pluginOptions' => [ |
81 | 'displayOnly' => true, | 81 | 'displayOnly' => true, |
82 | 'size' => 'xxs', | 82 | 'size' => 'xxs', |
83 | + 'min' => 0, | ||
84 | + 'max' => 10, | ||
85 | + 'stars' => 10, | ||
83 | ], | 86 | ], |
84 | ]); | 87 | ]); |
85 | ?> | 88 | ?> |
@@ -120,7 +123,9 @@ | @@ -120,7 +123,9 @@ | ||
120 | <?php | 123 | <?php |
121 | foreach($portfolio->ShowGallery($portfolio->gallery->photo) as $one_photo) { | 124 | foreach($portfolio->ShowGallery($portfolio->gallery->photo) as $one_photo) { |
122 | ?> | 125 | ?> |
123 | - <li><img src="<?= $portfolio->minImg($one_photo, 210, 150) ?>" alt=""/></li> | 126 | + <li> |
127 | + <img src="<?= $portfolio->minImg($one_photo, 210, 150) ?>" alt=""/> | ||
128 | + </li> | ||
124 | <?php | 129 | <?php |
125 | } | 130 | } |
126 | ?> | 131 | ?> |
@@ -171,8 +176,13 @@ | @@ -171,8 +176,13 @@ | ||
171 | <div class="new-portf-slider-wr style"> | 176 | <div class="new-portf-slider-wr style"> |
172 | <p>Участники проекта:</p> | 177 | <p>Участники проекта:</p> |
173 | <?php | 178 | <?php |
174 | - foreach($portfolio->portfolioUsers as $portfolioUser) { | ||
175 | - $gallery = $portfolio->ShowGallery($portfolioUser->gallery->photo); | 179 | + foreach($portfolio->getPortfolioUsers() |
180 | + ->where([ 'status' => 1 ]) | ||
181 | + ->with('gallery') | ||
182 | + ->all() as $portfolioUser) { | ||
183 | + if(!empty( $portfolioUser->gallery )) { | ||
184 | + $gallery = $portfolio->ShowGallery($portfolioUser->gallery->photo); | ||
185 | + } | ||
176 | ?> | 186 | ?> |
177 | <a href="<?= Url::to([ | 187 | <a href="<?= Url::to([ |
178 | 'performer/portfolio-view', | 188 | 'performer/portfolio-view', |
@@ -251,7 +261,10 @@ | @@ -251,7 +261,10 @@ | ||
251 | { | 261 | { |
252 | $('.new-portf-slider #demo5').scrollbox( | 262 | $('.new-portf-slider #demo5').scrollbox( |
253 | { | 263 | { |
254 | - direction : 'h', distance : 230, autoPlay : false, onMouseOverPause : false | 264 | + direction : 'h', |
265 | + distance : 230, | ||
266 | + autoPlay : false, | ||
267 | + onMouseOverPause : false | ||
255 | } | 268 | } |
256 | ); | 269 | ); |
257 | $('#demo5-backward').click( | 270 | $('#demo5-backward').click( |
@@ -268,8 +281,9 @@ | @@ -268,8 +281,9 @@ | ||
268 | ); | 281 | ); |
269 | var widthSlider = $('.new-portf-slider ul li').length | 282 | var widthSlider = $('.new-portf-slider ul li').length |
270 | $('.new-portf-slider ul').css({width : ((widthSlider * 230) - 20)}) | 283 | $('.new-portf-slider ul').css({width : ((widthSlider * 230) - 20)}) |
271 | - if (widthSlider<=3) { | ||
272 | - $('#demo5-forward, #demo5-backward').css({display:'none'}) | 284 | + if(widthSlider <= 3) |
285 | + { | ||
286 | + $('#demo5-forward, #demo5-backward').css({display : 'none'}) | ||
273 | } | 287 | } |
274 | } | 288 | } |
275 | ); | 289 | ); |
frontend/views/search/_customer_list_view.php
@@ -31,27 +31,33 @@ | @@ -31,27 +31,33 @@ | ||
31 | </div> | 31 | </div> |
32 | <div class="search_perform-stars-wr"> | 32 | <div class="search_perform-stars-wr"> |
33 | 33 | ||
34 | - <?php | ||
35 | - if($rating = $model->userInfo->rating) { | ||
36 | - echo StarRating::widget([ | ||
37 | - 'name' => 'rating_customer', | ||
38 | - 'value' => $rating, | ||
39 | - 'pluginOptions' => [ | ||
40 | - 'displayOnly' => true, | ||
41 | - 'size' => 'xxs', | ||
42 | - ], | ||
43 | - ]); | ||
44 | - } else { | ||
45 | - echo StarRating::widget([ | ||
46 | - 'name' => 'rating_customer', | ||
47 | - 'value' => 0, | ||
48 | - 'pluginOptions' => [ | ||
49 | - 'displayOnly' => true, | ||
50 | - 'size' => 'xxs', | ||
51 | - ], | ||
52 | - ]); | ||
53 | - } | ||
54 | - ?> | 34 | + <?php |
35 | + if($rating = $model->userInfo->rating) { | ||
36 | + echo StarRating::widget([ | ||
37 | + 'name' => 'rating_customer', | ||
38 | + 'value' => $rating, | ||
39 | + 'pluginOptions' => [ | ||
40 | + 'displayOnly' => true, | ||
41 | + 'size' => 'xxs', | ||
42 | + 'min' => 0, | ||
43 | + 'max' => 10, | ||
44 | + 'stars' => 10, | ||
45 | + ], | ||
46 | + ]); | ||
47 | + } else { | ||
48 | + echo StarRating::widget([ | ||
49 | + 'name' => 'rating_customer', | ||
50 | + 'value' => 0, | ||
51 | + 'pluginOptions' => [ | ||
52 | + 'displayOnly' => true, | ||
53 | + 'size' => 'xxs', | ||
54 | + 'min' => 0, | ||
55 | + 'max' => 10, | ||
56 | + 'stars' => 10, | ||
57 | + ], | ||
58 | + ]); | ||
59 | + } | ||
60 | + ?> | ||
55 | 61 | ||
56 | <div class="search_perform-stars-txt"> | 62 | <div class="search_perform-stars-txt"> |
57 | <?= count($model->comments) ?> отзывов | 63 | <?= count($model->comments) ?> отзывов |
frontend/views/search/_performer_list_view.php
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | ->limit(4) | 16 | ->limit(4) |
17 | ->all(), 'cover'); ?> | 17 | ->all(), 'cover'); ?> |
18 | <?php | 18 | <?php |
19 | - if(!empty($portfolios)) { | 19 | + if(!empty( $portfolios )) { |
20 | for($i = 0; $i < count($portfolios); $i++) { | 20 | for($i = 0; $i < count($portfolios); $i++) { |
21 | if($i) { | 21 | if($i) { |
22 | echo Html::a(Html::img($portfolios[ $i ]), '#', [ 'class' => 'small-img-search gallery-box-min' ]); | 22 | echo Html::a(Html::img($portfolios[ $i ]), '#', [ 'class' => 'small-img-search gallery-box-min' ]); |
@@ -61,9 +61,15 @@ | @@ -61,9 +61,15 @@ | ||
61 | <div> | 61 | <div> |
62 | <?php | 62 | <?php |
63 | echo StarRating::widget([ | 63 | echo StarRating::widget([ |
64 | - 'name' => 'rating_performer', | ||
65 | - 'value' => $model->userInfo->rating, | ||
66 | - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] | 64 | + 'name' => 'rating_performer', |
65 | + 'value' => $model->userInfo->rating, | ||
66 | + 'pluginOptions' => [ | ||
67 | + 'displayOnly' => true, | ||
68 | + 'size' => 'xxs', | ||
69 | + 'min' => 0, | ||
70 | + 'max' => 10, | ||
71 | + 'stars' => 10, | ||
72 | + ], | ||
67 | ]); | 73 | ]); |
68 | ?> | 74 | ?> |
69 | </div> | 75 | </div> |
@@ -111,7 +117,10 @@ | @@ -111,7 +117,10 @@ | ||
111 | 'data-id' => $model->id, | 117 | 'data-id' => $model->id, |
112 | ]); | 118 | ]); |
113 | } | 119 | } |
114 | - echo Html::a(Yii::t('app', 'Offer project'), ['#'], ['class' => 'get-project', 'data' => ['performer-id' => $model->id]]); | 120 | + echo Html::a(Yii::t('app', 'Offer project'), [ '#' ], [ |
121 | + 'class' => 'get-project', | ||
122 | + 'data' => [ 'performer-id' => $model->id ], | ||
123 | + ]); | ||
115 | } | 124 | } |
116 | ?> | 125 | ?> |
117 | </div> | 126 | </div> |
frontend/views/search/_vacancy_list_view.php
@@ -30,9 +30,9 @@ | @@ -30,9 +30,9 @@ | ||
30 | <div class="performer-vacant-reclam-bl-content"> | 30 | <div class="performer-vacant-reclam-bl-content"> |
31 | <span><?= TextHelper::truncateHtmlText($model->description, 200, '...') ?></span> | 31 | <span><?= TextHelper::truncateHtmlText($model->description, 200, '...') ?></span> |
32 | <?= Html::a('<img src="/images/performar_vacancy/arrow-post.png" alt=""/>', [ | 32 | <?= Html::a('<img src="/images/performar_vacancy/arrow-post.png" alt=""/>', [ |
33 | - 'vacancy-view', | 33 | + 'company/vacancy-view', |
34 | 'company_id' => $model->user_id, | 34 | 'company_id' => $model->user_id, |
35 | - 'vacancy_id' => $model->vacancy_id, | 35 | + 'link' => $model->link, |
36 | ], [ 'class' => 'performer-vacant-reclam-bl-content-read' ]) ?> | 36 | ], [ 'class' => 'performer-vacant-reclam-bl-content-read' ]) ?> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | \ No newline at end of file | 39 | \ No newline at end of file |
frontend/views/search/project.php
@@ -30,6 +30,11 @@ | @@ -30,6 +30,11 @@ | ||
30 | 'options' => [ 'class' => 'search-work-form' ], | 30 | 'options' => [ 'class' => 'search-work-form' ], |
31 | 'action' => [ '' ], | 31 | 'action' => [ '' ], |
32 | ]); | 32 | ]); |
33 | + echo $form->field($model, 'info', [ 'options' => [ 'class' => 'info-search-input' ] ]) | ||
34 | + ->label('Поиск') | ||
35 | + ->textInput([ 'class' => 'form-control', | ||
36 | + 'placeholder' => 'Текст для поиска', | ||
37 | + ]); | ||
33 | echo $form->field($model, 'specialization') | 38 | echo $form->field($model, 'specialization') |
34 | ->dropDownList($specialization, [ 'prompt' => 'Любая' ]); | 39 | ->dropDownList($specialization, [ 'prompt' => 'Любая' ]); |
35 | 40 | ||
@@ -74,7 +79,7 @@ | @@ -74,7 +79,7 @@ | ||
74 | 'template' => "{input}\n{label}\n{hint}\n{error}", | 79 | 'template' => "{input}\n{label}\n{hint}\n{error}", |
75 | 'options' => [ 'class' => 'blocks-check-list' ], | 80 | 'options' => [ 'class' => 'blocks-check-list' ], |
76 | ]) | 81 | ]) |
77 | - ->label("<span></span>{$model->getAttributeLabel('contractual')}", ['class' => '']) | 82 | + ->label("<span></span>{$model->getAttributeLabel('contractual')}", [ 'class' => '' ]) |
78 | ->checkbox([ ], false) ?> | 83 | ->checkbox([ ], false) ?> |
79 | <?= $form->field($model, 'payment', [ 'template' => "{input}\n{error}" ]) | 84 | <?= $form->field($model, 'payment', [ 'template' => "{input}\n{error}" ]) |
80 | ->checkboxList($payments, [ | 85 | ->checkboxList($payments, [ |
@@ -94,93 +99,7 @@ | @@ -94,93 +99,7 @@ | ||
94 | </div> | 99 | </div> |
95 | <?php | 100 | <?php |
96 | $form->end(); | 101 | $form->end(); |
97 | - /* | ||
98 | ?> | 102 | ?> |
99 | - <form action="" class="search-work-form"> | ||
100 | - | ||
101 | - <div class="blocks-check-list-wrapp"> | ||
102 | - <div class="blocks-check-title">Профиль</div> | ||
103 | - <div class="blocks-check-list-wrapp"> | ||
104 | - <select> | ||
105 | - <option selected disabled>Дизайн</option> | ||
106 | - <option value="">Ландшафтный дизайн</option> | ||
107 | - <option value="">Интерьерный дизайн</option> | ||
108 | - </select> | ||
109 | - </div> | ||
110 | - | ||
111 | - <div class="blocks-check-list-wrapp"> | ||
112 | - <select> | ||
113 | - <option selected disabled>Архитектура</option> | ||
114 | - <option value="">Ландшафтный дизайн</option> | ||
115 | - <option value="">Интерьерный дизайн</option> | ||
116 | - </select> | ||
117 | - </div> | ||
118 | - | ||
119 | - <div class="blocks-check-list-wrapp"> | ||
120 | - <select> | ||
121 | - <option selected disabled>Строительство</option> | ||
122 | - <option value="">Ландшафтный дизайн</option> | ||
123 | - <option value="">Интерьерный дизайн</option> | ||
124 | - </select> | ||
125 | - </div> | ||
126 | - </div> | ||
127 | - | ||
128 | - <div class="blocks-check-list-wrapp"> | ||
129 | - <div class="blocks-check-title">Регион</div> | ||
130 | - <select> | ||
131 | - <option selected value="">Все страны</option> | ||
132 | - <option style="color: #000; font-weight: bold !important;" value="">Украина</option> | ||
133 | - <option value="">Россия</option> | ||
134 | - <option value="">Белорусь</option> | ||
135 | - </select> | ||
136 | - </div> | ||
137 | - <div class="blocks-check-list-wrapp"> | ||
138 | - <select id="theme-1"> | ||
139 | - <option selected disabled>Город</option> | ||
140 | - <option value="">Все</option> | ||
141 | - <option value="">Киев</option> | ||
142 | - <option value="">Житомир</option> | ||
143 | - <option value="">Львов</option> | ||
144 | - <option value="">Киев</option> | ||
145 | - <option value="">Житомир</option> | ||
146 | - <option value="">Львов</option> | ||
147 | - </select> | ||
148 | - </div> | ||
149 | - | ||
150 | - <div class="blocks-check-list-wrapp"> | ||
151 | - <div class="blocks-check-title">Бюджет</div> | ||
152 | - <div class="form-price-wr"> | ||
153 | - <input type="text" placeholder="от"/> | ||
154 | - <input type="text" placeholder="до"/> | ||
155 | - <div class="blocks-check-list-wrapp check-valuta"> | ||
156 | - <select> | ||
157 | - <option selected>грн</option> | ||
158 | - <option value="">$</option> | ||
159 | - <option value="">eur</option> | ||
160 | - </select> | ||
161 | - </div> | ||
162 | - </div> | ||
163 | - <div class="blocks-check-list"> | ||
164 | - <input type="checkbox" name="group2" class="check-search" id="theme-4"><label for="theme-4"><span></span>Договорной</label> | ||
165 | - </div> | ||
166 | - <div class="blocks-check-list"> | ||
167 | - <input type="checkbox" name="group2" class="check-search" id="theme-5"><label for="theme-5"><span></span>Компании</label> | ||
168 | - </div> | ||
169 | - <div class="blocks-check-list"> | ||
170 | - <input type="checkbox" name="group2" class="check-search" id="theme-6"><label for="theme-6"><span></span>Проектанты</label> | ||
171 | - </div> | ||
172 | - <div class="blocks-check-list"> | ||
173 | - <input checked type="checkbox" name="group2" class="check-search" id="theme-7"><label for="theme-7"><span></span>Все</label> | ||
174 | - </div> | ||
175 | - </div> | ||
176 | - | ||
177 | - | ||
178 | - <a href="#" class="reset-filter">Сбросить фильтр</a> | ||
179 | - <div class="blocks-check-list-submit"> | ||
180 | - <input type="submit" value="Найти"/> | ||
181 | - </div> | ||
182 | - </form> | ||
183 | - */ ?> | ||
184 | </div> | 103 | </div> |
185 | <div class="right-search-work"> | 104 | <div class="right-search-work"> |
186 | <div class="search-worker-title style">Сейчас <?= $dataProvider->totalCount ?> предложений</div> | 105 | <div class="search-worker-title style">Сейчас <?= $dataProvider->totalCount ?> предложений</div> |
@@ -197,7 +116,9 @@ | @@ -197,7 +116,9 @@ | ||
197 | </div> | 116 | </div> |
198 | </div> | 117 | </div> |
199 | <div> | 118 | <div> |
119 | + <?php | ||
200 | 120 | ||
121 | + ?> | ||
201 | <div class="section-box" style="height: 720px; overflow: hidden"> | 122 | <div class="section-box" style="height: 720px; overflow: hidden"> |
202 | <div class="map-settings-opacity"></div> | 123 | <div class="map-settings-opacity"></div> |
203 | <div class="map-settings-wrapp"> | 124 | <div class="map-settings-wrapp"> |
@@ -226,7 +147,7 @@ | @@ -226,7 +147,7 @@ | ||
226 | </ul> | 147 | </ul> |
227 | <ul class="min_markers_two"> | 148 | <ul class="min_markers_two"> |
228 | <li><span><img src="/images/markers/marker-min-10.png"/></span> | 149 | <li><span><img src="/images/markers/marker-min-10.png"/></span> |
229 | - <p><?=Yii::t('app', 'projects')?></p></li> | 150 | + <p><?= Yii::t('app', 'projects') ?></p></li> |
230 | <li><span><img src="/images/markers/marker-min-11.png"/></span> | 151 | <li><span><img src="/images/markers/marker-min-11.png"/></span> |
231 | <p>подряды</p></li> | 152 | <p>подряды</p></li> |
232 | </ul> | 153 | </ul> |
@@ -240,12 +161,16 @@ | @@ -240,12 +161,16 @@ | ||
240 | var start_position = new google.maps.LatLng('56', '30'); | 161 | var start_position = new google.maps.LatLng('56', '30'); |
241 | var settings = { | 162 | var settings = { |
242 | zoom : 7, // scrollwheel: false, | 163 | zoom : 7, // scrollwheel: false, |
243 | - center : start_position, mapTypeControl : false, | 164 | + center : start_position, |
165 | + mapTypeControl : false, | ||
244 | mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU}, | 166 | mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU}, |
245 | navigationControl : false, | 167 | navigationControl : false, |
246 | navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL}, | 168 | navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL}, |
247 | - scaleControl : false, streetViewControl : false, rotateControl : false, | ||
248 | - zoomControl : false, mapTypeId : google.maps.MapTypeId.ROADMAP | 169 | + scaleControl : false, |
170 | + streetViewControl : false, | ||
171 | + rotateControl : false, | ||
172 | + zoomControl : false, | ||
173 | + mapTypeId : google.maps.MapTypeId.ROADMAP | ||
249 | }; | 174 | }; |
250 | var map = new google.maps.Map(document.getElementById("map_canvas"), settings); | 175 | var map = new google.maps.Map(document.getElementById("map_canvas"), settings); |
251 | 176 | ||
@@ -308,45 +233,57 @@ | @@ -308,45 +233,57 @@ | ||
308 | 233 | ||
309 | var marker = new google.maps.Marker( | 234 | var marker = new google.maps.Marker( |
310 | { | 235 | { |
311 | - position : new google.maps.LatLng('56', '35.3'), map : map, | ||
312 | - title : 'Marker Title2', icon : image1 | 236 | + position : new google.maps.LatLng('56', '35.3'), |
237 | + map : map, | ||
238 | + title : 'Marker Title2', | ||
239 | + icon : image1 | ||
313 | } | 240 | } |
314 | ); | 241 | ); |
315 | markers.push(marker); | 242 | markers.push(marker); |
316 | 243 | ||
317 | var marker = new google.maps.Marker( | 244 | var marker = new google.maps.Marker( |
318 | { | 245 | { |
319 | - position : new google.maps.LatLng('56', '36'), map : map, | ||
320 | - title : 'Marker Title2', icon : image2 | 246 | + position : new google.maps.LatLng('56', '36'), |
247 | + map : map, | ||
248 | + title : 'Marker Title2', | ||
249 | + icon : image2 | ||
321 | } | 250 | } |
322 | ); | 251 | ); |
323 | markers.push(marker); | 252 | markers.push(marker); |
324 | 253 | ||
325 | var marker = new google.maps.Marker( | 254 | var marker = new google.maps.Marker( |
326 | { | 255 | { |
327 | - position : new google.maps.LatLng('56', '34.5'), map : map, | ||
328 | - title : 'Marker Title3', icon : image18 | 256 | + position : new google.maps.LatLng('56', '34.5'), |
257 | + map : map, | ||
258 | + title : 'Marker Title3', | ||
259 | + icon : image18 | ||
329 | } | 260 | } |
330 | ); | 261 | ); |
331 | markers.push(marker); | 262 | markers.push(marker); |
332 | 263 | ||
333 | var marker = new google.maps.Marker( | 264 | var marker = new google.maps.Marker( |
334 | { | 265 | { |
335 | - position : new google.maps.LatLng('56', '35'), map : map, | ||
336 | - title : 'Marker Title4', icon : image13 | 266 | + position : new google.maps.LatLng('56', '35'), |
267 | + map : map, | ||
268 | + title : 'Marker Title4', | ||
269 | + icon : image13 | ||
337 | } | 270 | } |
338 | ); | 271 | ); |
339 | markers.push(marker); | 272 | markers.push(marker); |
340 | 273 | ||
341 | var clusterStyles = [ | 274 | var clusterStyles = [ |
342 | { | 275 | { |
343 | - url : '/images/markers/clasters.png', height : 36, width : 36 | 276 | + url : '/images/markers/clasters.png', |
277 | + height : 36, | ||
278 | + width : 36 | ||
344 | } | 279 | } |
345 | 280 | ||
346 | ]; | 281 | ]; |
347 | markerClusterer = new MarkerClusterer( | 282 | markerClusterer = new MarkerClusterer( |
348 | map, markers, { | 283 | map, markers, { |
349 | - maxZoom : 10, gridSize : 100, styles : clusterStyles | 284 | + maxZoom : 10, |
285 | + gridSize : 100, | ||
286 | + styles : clusterStyles | ||
350 | } | 287 | } |
351 | ); | 288 | ); |
352 | //балун | 289 | //балун |
@@ -365,6 +302,10 @@ | @@ -365,6 +302,10 @@ | ||
365 | </script> | 302 | </script> |
366 | </div> | 303 | </div> |
367 | <div id="map_canvas" style="width: 100%; height:100%;"></div> | 304 | <div id="map_canvas" style="width: 100%; height:100%;"></div> |
305 | + <?php | ||
306 | + | ||
307 | + /* Решено убрать нижний слайдер | ||
308 | + ?> | ||
368 | <div class="slider_map-wr"> | 309 | <div class="slider_map-wr"> |
369 | <div class="slider_map_overlay"></div> | 310 | <div class="slider_map_overlay"></div> |
370 | <div class="slider_map"> | 311 | <div class="slider_map"> |
@@ -456,7 +397,10 @@ | @@ -456,7 +397,10 @@ | ||
456 | </div> | 397 | </div> |
457 | </div> | 398 | </div> |
458 | </div> | 399 | </div> |
459 | - </div> | ||
460 | - | 400 | + <?php |
401 | + */ | ||
402 | + ?> | ||
461 | </div> | 403 | </div> |
404 | + | ||
405 | +</div> | ||
462 | </div> | 406 | </div> |
frontend/views/site/index.php
1 | <?php | 1 | <?php |
2 | use \yii\helpers\Html; | 2 | use \yii\helpers\Html; |
3 | use \common\models\Specialization; | 3 | use \common\models\Specialization; |
4 | - | ||
5 | /** | 4 | /** |
6 | * @var $this yii\web\View | 5 | * @var $this yii\web\View |
7 | * @var $specializations common\models\Specialization | 6 | * @var $specializations common\models\Specialization |
8 | */ | 7 | */ |
9 | - | ||
10 | $this->title = 'My Yii Application'; | 8 | $this->title = 'My Yii Application'; |
11 | ?> | 9 | ?> |
12 | <div class="section-box-1"> | 10 | <div class="section-box-1"> |
@@ -108,6 +106,7 @@ | @@ -108,6 +106,7 @@ | ||
108 | <li class="federation-home-list-active"><span>Заказчикам</span></li> | 106 | <li class="federation-home-list-active"><span>Заказчикам</span></li> |
109 | <li><span>Компаниям</span></li> | 107 | <li><span>Компаниям</span></li> |
110 | <li><span>Проектантам</span></li> | 108 | <li><span>Проектантам</span></li> |
109 | + <li><span>Проекту</span></li> | ||
111 | <li><span>Наша миссия</span></li> | 110 | <li><span>Наша миссия</span></li> |
112 | </ul> | 111 | </ul> |
113 | </div> | 112 | </div> |
@@ -117,16 +116,19 @@ | @@ -117,16 +116,19 @@ | ||
117 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> | 116 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> |
118 | </div> | 117 | </div> |
119 | <div class="federation-home-text">Описания рейтингов</div> | 118 | <div class="federation-home-text">Описания рейтингов</div> |
119 | + <div class="federation-home-text-two">Для поиска лучших Команд или Проектантов </div> | ||
120 | </div> | 120 | </div> |
121 | <div class="federation-home-blocks"> | 121 | <div class="federation-home-blocks"> |
122 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> | 122 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> |
123 | </div> | 123 | </div> |
124 | <div class="federation-home-text">Вы получаете лучшую цену</div> | 124 | <div class="federation-home-text">Вы получаете лучшую цену</div> |
125 | + <div class="federation-home-text-two">Для понимания специализации Компании или Проектанта, с которой работает или будет работать</div> | ||
125 | </div> | 126 | </div> |
126 | <div class="federation-home-blocks"> | 127 | <div class="federation-home-blocks"> |
127 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> | 128 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> |
128 | </div> | 129 | </div> |
129 | <div class="federation-home-text">Гарантии получения проекта в срок</div> | 130 | <div class="federation-home-text">Гарантии получения проекта в срок</div> |
131 | + <div class="federation-home-text-two">Для оценки рисков при выборе исполнителя</div> | ||
130 | </div> | 132 | </div> |
131 | </div> | 133 | </div> |
132 | 134 | ||
@@ -135,16 +137,19 @@ | @@ -135,16 +137,19 @@ | ||
135 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> | 137 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> |
136 | </div> | 138 | </div> |
137 | <div class="federation-home-text">2Описания рейтингов</div> | 139 | <div class="federation-home-text">2Описания рейтингов</div> |
140 | + <div class="federation-home-text-two">Формирование имиджа Компании и узнаваемости Заказчиками и ведущими Проектантами</div> | ||
138 | </div> | 141 | </div> |
139 | <div class="federation-home-blocks"> | 142 | <div class="federation-home-blocks"> |
140 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> | 143 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> |
141 | </div> | 144 | </div> |
142 | <div class="federation-home-text">2Вы получаете лучшую цену</div> | 145 | <div class="federation-home-text">2Вы получаете лучшую цену</div> |
146 | + <div class="federation-home-text-two">Для синергии с партнерами и поиска лучших Проектантов в Команду</div> | ||
143 | </div> | 147 | </div> |
144 | <div class="federation-home-blocks"> | 148 | <div class="federation-home-blocks"> |
145 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> | 149 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> |
146 | </div> | 150 | </div> |
147 | <div class="federation-home-text">2Гарантии получения проекта в срок</div> | 151 | <div class="federation-home-text">2Гарантии получения проекта в срок</div> |
152 | + <div class="federation-home-text-two">Формирования Лучшей Команды за Проектантами которой прейдут Заказчики</div> | ||
148 | </div> | 153 | </div> |
149 | </div> | 154 | </div> |
150 | 155 | ||
@@ -153,16 +158,19 @@ | @@ -153,16 +158,19 @@ | ||
153 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> | 158 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> |
154 | </div> | 159 | </div> |
155 | <div class="federation-home-text">3Описания рейтингов</div> | 160 | <div class="federation-home-text">3Описания рейтингов</div> |
161 | + <div class="federation-home-text-two">Для оценки уровня Опыта в специализации</div> | ||
156 | </div> | 162 | </div> |
157 | <div class="federation-home-blocks"> | 163 | <div class="federation-home-blocks"> |
158 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> | 164 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> |
159 | </div> | 165 | </div> |
160 | <div class="federation-home-text">3Вы получаете лучшую цену</div> | 166 | <div class="federation-home-text">3Вы получаете лучшую цену</div> |
167 | + <div class="federation-home-text-two">Для представления себя Рынку как профессионала в определенной области</div> | ||
161 | </div> | 168 | </div> |
162 | <div class="federation-home-blocks"> | 169 | <div class="federation-home-blocks"> |
163 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> | 170 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> |
164 | </div> | 171 | </div> |
165 | <div class="federation-home-text">3Гарантии получения проекта в срок</div> | 172 | <div class="federation-home-text">3Гарантии получения проекта в срок</div> |
173 | + <div class="federation-home-text-two">Для поиска Проектов в которых можно реализовать себя</div> | ||
166 | </div> | 174 | </div> |
167 | </div> | 175 | </div> |
168 | 176 | ||
@@ -171,17 +179,44 @@ | @@ -171,17 +179,44 @@ | ||
171 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> | 179 | <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> |
172 | </div> | 180 | </div> |
173 | <div class="federation-home-text">4Описания рейтингов</div> | 181 | <div class="federation-home-text">4Описания рейтингов</div> |
182 | + <div class="federation-home-text-two">Качество. Чем профессиональней будут исполнители, тем лучше будут приняты решения для проекта</div> | ||
174 | </div> | 183 | </div> |
175 | <div class="federation-home-blocks"> | 184 | <div class="federation-home-blocks"> |
176 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> | 185 | <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> |
177 | </div> | 186 | </div> |
178 | <div class="federation-home-text">4Вы получаете лучшую цену</div> | 187 | <div class="federation-home-text">4Вы получаете лучшую цену</div> |
188 | + <div class="federation-home-text-two">Цена. Чем меньше будет ошибок, тем более рентабельным будет Проект и окажется цена</div> | ||
179 | </div> | 189 | </div> |
180 | <div class="federation-home-blocks"> | 190 | <div class="federation-home-blocks"> |
181 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> | 191 | <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> |
182 | </div> | 192 | </div> |
183 | <div class="federation-home-text">4Гарантии получения проекта в срок</div> | 193 | <div class="federation-home-text">4Гарантии получения проекта в срок</div> |
194 | + <div class="federation-home-text-two">Скорость. Чем слаженней будет командная работа профессионалов, тем выше будет скорость</div> | ||
195 | + </div> | ||
196 | + </div> | ||
197 | + | ||
198 | + <div class="federation-home-blocks-wr-blocks"> | ||
199 | + | ||
200 | + <div class="federation-home-blocks"> | ||
201 | + <div class="federation-home-ico"><img src="/images/ico-fed-1.png" alt=""/> | ||
202 | + </div> | ||
203 | + <div class="federation-home-text">Знание</div> | ||
204 | +<!-- <div class="federation-home-text-two">Помочь профессиональному Проектанту (PRO=Знание*Опыт*Продуктивность) реализовать лучший(Качество) Проект(Опыт) в постоянно развивающейся и продуктивной (Скорость) Компании(Команде) для понимающих(не жадных, лучших - ) Заказчиков.</div>--> | ||
184 | </div> | 205 | </div> |
206 | + <div class="federation-home-blocks"> | ||
207 | + <div class="federation-home-ico"><img src="/images/ico-fed-2.png" alt=""/> | ||
208 | + </div> | ||
209 | + <div class="federation-home-text">Опыт</div> | ||
210 | +<!-- <div class="federation-home-text-two">Постоянное развитие Рынка Проектантов и поддержка их профессионального роста</div>--> | ||
211 | + </div> | ||
212 | + <div class="federation-home-blocks"> | ||
213 | + <div class="federation-home-ico"><img src="/images/ico-fed-3.png" alt=""/> | ||
214 | + </div> | ||
215 | + <div class="federation-home-text">Продуктивность</div> | ||
216 | +<!-- <div class="federation-home-text-two"></div>--> | ||
217 | + </div> | ||
218 | + | ||
219 | + <div class="style new_txt_fed_home">Помочь профессиональному Проектанту реализовать лучший Проект в постоянно развивающейся и продуктивной Компании для понимающих Заказчиков</div> | ||
185 | </div> | 220 | </div> |
186 | </div> | 221 | </div> |
187 | </div> | 222 | </div> |
frontend/views/tender/view.php
@@ -67,6 +67,9 @@ | @@ -67,6 +67,9 @@ | ||
67 | 'pluginOptions' => [ | 67 | 'pluginOptions' => [ |
68 | 'displayOnly' => true, | 68 | 'displayOnly' => true, |
69 | 'size' => 'xxs', | 69 | 'size' => 'xxs', |
70 | + 'min' => 0, | ||
71 | + 'max' => 10, | ||
72 | + 'stars' => 10, | ||
70 | ], | 73 | ], |
71 | ]); | 74 | ]); |
72 | ?> | 75 | ?> |
@@ -209,13 +212,18 @@ | @@ -209,13 +212,18 @@ | ||
209 | { | 212 | { |
210 | var start_position = new google.maps.LatLng('56', '30'); | 213 | var start_position = new google.maps.LatLng('56', '30'); |
211 | var settings = { | 214 | var settings = { |
212 | - zoom : 7, scrollwheel : false, center : start_position, | 215 | + zoom : 7, |
216 | + scrollwheel : false, | ||
217 | + center : start_position, | ||
213 | mapTypeControl : false, | 218 | mapTypeControl : false, |
214 | mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU}, | 219 | mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU}, |
215 | navigationControl : false, | 220 | navigationControl : false, |
216 | navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL}, | 221 | navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL}, |
217 | - scaleControl : false, streetViewControl : false, rotateControl : false, | ||
218 | - zoomControl : true, mapTypeId : google.maps.MapTypeId.ROADMAP | 222 | + scaleControl : false, |
223 | + streetViewControl : false, | ||
224 | + rotateControl : false, | ||
225 | + zoomControl : true, | ||
226 | + mapTypeId : google.maps.MapTypeId.ROADMAP | ||
219 | }; | 227 | }; |
220 | var map = new google.maps.Map(document.getElementById("map_canvas"), settings); | 228 | var map = new google.maps.Map(document.getElementById("map_canvas"), settings); |
221 | 229 | ||
@@ -225,8 +233,10 @@ | @@ -225,8 +233,10 @@ | ||
225 | 233 | ||
226 | var marker = new google.maps.Marker( | 234 | var marker = new google.maps.Marker( |
227 | { | 235 | { |
228 | - position : new google.maps.LatLng('56', '35.3'), map : map, | ||
229 | - title : 'Marker Title2', icon : image1 | 236 | + position : new google.maps.LatLng('56', '35.3'), |
237 | + map : map, | ||
238 | + title : 'Marker Title2', | ||
239 | + icon : image1 | ||
230 | } | 240 | } |
231 | ); | 241 | ); |
232 | 242 | ||
@@ -247,69 +257,69 @@ | @@ -247,69 +257,69 @@ | ||
247 | </div> | 257 | </div> |
248 | </div> | 258 | </div> |
249 | 259 | ||
250 | - </div> | ||
251 | - | ||
252 | - <div class="tabs_views-wr"> | ||
253 | - <div class="_tabs style"> | ||
254 | - <div class="box-wr"> | ||
255 | - <div class="box-all"> | ||
256 | - <?php | ||
257 | - Pjax::begin(); | ||
258 | - echo \common\modules\comment\widgets\CommentWidget::widget([ | ||
259 | - 'context' => $this, | ||
260 | - 'model' => $model::className(), | ||
261 | - 'model_id' => $model->project_id, | ||
262 | - 'comment_class' => \common\modules\comment\models\CommentProject::className(), | ||
263 | - 'class_options' => [ | ||
264 | - 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, | ||
265 | - 'user_id' => \Yii::$app->user->getId(), | ||
266 | - 'guestComment' => false, | ||
267 | - 'status' => \common\modules\comment\models\CommentProject::STATUS_ACTIVE, | ||
268 | - ], | ||
269 | - 'list_options' => [ | ||
270 | - 'view' => 'list-project-comment', | ||
271 | - 'class' => 'section box tender-offer-proj-wr', | ||
272 | - ], | ||
273 | - 'form_options' => [ | ||
274 | - 'view' => 'form-project-comment', | ||
275 | - 'tag' => 'div', | ||
276 | - 'class' => 'artbox_comment_form section-box tender-add-answer', | ||
277 | - ], | ||
278 | - 'options' => [ | ||
279 | - 'tag' => false, | ||
280 | - ], | ||
281 | - ]); | ||
282 | - Pjax::end(); | ||
283 | - ?> | 260 | + </div> |
261 | + | ||
262 | + <div class="tabs_views-wr"> | ||
263 | + <div class="_tabs style"> | ||
264 | + <div class="box-wr"> | ||
265 | + <div class="box-all"> | ||
266 | + <?php | ||
267 | + Pjax::begin(); | ||
268 | + echo \common\modules\comment\widgets\CommentWidget::widget([ | ||
269 | + 'context' => $this, | ||
270 | + 'model' => $model::className(), | ||
271 | + 'model_id' => $model->project_id, | ||
272 | + 'comment_class' => \common\modules\comment\models\CommentProject::className(), | ||
273 | + 'class_options' => [ | ||
274 | + 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, | ||
275 | + 'user_id' => \Yii::$app->user->getId(), | ||
276 | + 'guestComment' => false, | ||
277 | + 'status' => \common\modules\comment\models\CommentProject::STATUS_ACTIVE, | ||
278 | + ], | ||
279 | + 'list_options' => [ | ||
280 | + 'view' => 'list-project-comment', | ||
281 | + 'class' => 'section box tender-offer-proj-wr', | ||
282 | + ], | ||
283 | + 'form_options' => [ | ||
284 | + 'view' => 'form-project-comment', | ||
285 | + 'tag' => 'div', | ||
286 | + 'class' => 'artbox_comment_form section-box tender-add-answer', | ||
287 | + ], | ||
288 | + 'options' => [ | ||
289 | + 'tag' => false, | ||
290 | + ], | ||
291 | + ]); | ||
292 | + Pjax::end(); | ||
293 | + ?> | ||
294 | + </div> | ||
284 | </div> | 295 | </div> |
285 | </div> | 296 | </div> |
286 | - </div> | ||
287 | - <div class="_tabs style"> | ||
288 | - <div class="box-wr"> | ||
289 | - <div class="box-all"> | ||
290 | - <?php | ||
291 | - Pjax::begin(); | ||
292 | - echo \common\modules\comment\widgets\CommentWidget::widget([ | ||
293 | - 'context' => $this, | ||
294 | - 'model' => $model->className(), | ||
295 | - 'model_id' => $model->project_id, | ||
296 | - 'comment_class' => \common\modules\comment\models\CommentProjectAnswer::className(), | ||
297 | - 'class_options' => [ | ||
298 | - 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, | ||
299 | - 'user_id' => \Yii::$app->user->getId(), | ||
300 | - 'guestComment' => false, | ||
301 | - 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, | ||
302 | - ], | ||
303 | - 'provider_options' => [ | ||
304 | - 'pagination' => [ | ||
305 | - 'pageSize' => 2, | 297 | + <div class="_tabs style"> |
298 | + <div class="box-wr"> | ||
299 | + <div class="box-all"> | ||
300 | + <?php | ||
301 | + Pjax::begin(); | ||
302 | + echo \common\modules\comment\widgets\CommentWidget::widget([ | ||
303 | + 'context' => $this, | ||
304 | + 'model' => $model->className(), | ||
305 | + 'model_id' => $model->project_id, | ||
306 | + 'comment_class' => \common\modules\comment\models\CommentProjectAnswer::className(), | ||
307 | + 'class_options' => [ | ||
308 | + 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, | ||
309 | + 'user_id' => \Yii::$app->user->getId(), | ||
310 | + 'guestComment' => false, | ||
311 | + 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, | ||
312 | + ], | ||
313 | + 'provider_options' => [ | ||
314 | + 'pagination' => [ | ||
315 | + 'pageSize' => 2, | ||
316 | + ], | ||
306 | ], | 317 | ], |
307 | - ], | ||
308 | - 'success_options' => [ | ||
309 | - 'tag' => 'div', | ||
310 | -// 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', | ||
311 | - 'content' => function(){ | ||
312 | - return "<script> | 318 | + 'success_options' => [ |
319 | + 'tag' => 'div', | ||
320 | + // 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', | ||
321 | + 'content' => function() { | ||
322 | + return "<script> | ||
313 | addRemoveBlocks() | 323 | addRemoveBlocks() |
314 | function addRemoveBlocks() | 324 | function addRemoveBlocks() |
315 | { | 325 | { |
@@ -343,136 +353,148 @@ | @@ -343,136 +353,148 @@ | ||
343 | setTimeout(closeSuccsescomm, 4000) | 353 | setTimeout(closeSuccsescomm, 4000) |
344 | } | 354 | } |
345 | </script>"; | 355 | </script>"; |
346 | - }, | ||
347 | - 'class' => 'test-class-success', | ||
348 | - ], | ||
349 | - 'list_options' => [ | ||
350 | - 'view' => 'list-comment-question', | ||
351 | - ], | ||
352 | - 'form_options' => [ | ||
353 | - 'view' => 'form-comment-answer', | ||
354 | - 'tag' => 'span', | ||
355 | - 'class' => ( ( $model->user_id == \Yii::$app->user->id ) ? 'hidden' : '' ), | ||
356 | - ], | ||
357 | - 'options' => [ | ||
358 | - 'class' => 'proektant-comments-wr fix_te style', | ||
359 | - ], | ||
360 | - ]); | ||
361 | - Pjax::end(); | ||
362 | - ?> | 356 | + }, |
357 | + 'class' => 'test-class-success', | ||
358 | + ], | ||
359 | + 'list_options' => [ | ||
360 | + 'view' => 'list-comment-question', | ||
361 | + ], | ||
362 | + 'form_options' => [ | ||
363 | + 'view' => 'form-comment-answer', | ||
364 | + 'tag' => 'span', | ||
365 | + 'class' => ( ( $model->user_id == \Yii::$app->user->id ) ? 'hidden' : '' ), | ||
366 | + ], | ||
367 | + 'options' => [ | ||
368 | + 'class' => 'proektant-comments-wr fix_te style', | ||
369 | + ], | ||
370 | + ]); | ||
371 | + Pjax::end(); | ||
372 | + ?> | ||
373 | + </div> | ||
363 | </div> | 374 | </div> |
364 | </div> | 375 | </div> |
365 | </div> | 376 | </div> |
366 | </div> | 377 | </div> |
367 | - </div> | ||
368 | 378 | ||
369 | 379 | ||
370 | -</div> | ||
371 | -<script> | ||
372 | - $(document).ready( | ||
373 | - function() | ||
374 | - { | ||
375 | - tabs_(); | ||
376 | - inputNumber(); | ||
377 | - tenderMark(); | ||
378 | - | ||
379 | - function inputNumber() | 380 | + </div> |
381 | + <script> | ||
382 | + $(document).ready( | ||
383 | + function() | ||
380 | { | 384 | { |
381 | - $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") | ||
382 | - .keypress( | ||
383 | - function(e) | ||
384 | - { | ||
385 | - return 8 == e.which || e.which > 47 && e.which < 58 ? void 0 : !1 | ||
386 | - } | ||
387 | - ) | ||
388 | - } | 385 | + tabs_(); |
386 | + inputNumber(); | ||
387 | + tenderMark(); | ||
389 | 388 | ||
390 | - function tabs_() | ||
391 | - { | ||
392 | - $('.tabs_list').css('display', 'block') | ||
393 | - if(location.hash=='#tabs_2') { | ||
394 | - $('._tabs').css({display : 'block'}) | ||
395 | - $('._tabs:first-child').css({display : 'none'}) | ||
396 | - $('.tabs_list ul li').addClass('active') | ||
397 | - $('.tabs_list ul li:first-child').removeClass('active') | ||
398 | - } else { | ||
399 | - $('._tabs').css({display : 'none'}) | ||
400 | - $('._tabs:first-child').css({display : 'block'}) | 389 | + function inputNumber() |
390 | + { | ||
391 | + $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") | ||
392 | + .keypress( | ||
393 | + function(e) | ||
394 | + { | ||
395 | + return 8 == e.which || e.which > 47 && e.which < 58 ? void 0 : !1 | ||
396 | + } | ||
397 | + ) | ||
401 | } | 398 | } |
402 | 399 | ||
403 | - $('.tabs_list ul li').click( | ||
404 | - function() | 400 | + function tabs_() |
401 | + { | ||
402 | + $('.tabs_list').css('display', 'block') | ||
403 | + if(location.hash == '#tabs_2') | ||
405 | { | 404 | { |
406 | - $('.tabs_list ul li').removeClass('active') | ||
407 | - $(this).addClass('active') | ||
408 | - var index = $(this).index() | ||
409 | - var tabs = $('._tabs') | ||
410 | - tabs.css({display : 'none'}) | ||
411 | - $(tabs[index]).css({display : 'block'}) | ||
412 | - var thisHash = $(this).find('a').attr('href') | ||
413 | - window.location.hash = thisHash; | 405 | + $('._tabs').css({display : 'block'}) |
406 | + $('._tabs:first-child').css({display : 'none'}) | ||
407 | + $('.tabs_list ul li').addClass('active') | ||
408 | + $('.tabs_list ul li:first-child').removeClass('active') | ||
409 | + } else | ||
410 | + { | ||
411 | + $('._tabs').css({display : 'none'}) | ||
412 | + $('._tabs:first-child').css({display : 'block'}) | ||
414 | } | 413 | } |
415 | - ) | ||
416 | - | ||
417 | - } | ||
418 | 414 | ||
419 | - function tenderMark() | ||
420 | - { | ||
421 | - var markParrent = $('.project_owner_control') | ||
422 | - markParrent.addClass('_on') | ||
423 | - for(var i = 0; i < markParrent.length; i++) | ||
424 | - { | ||
425 | - var markTxt = $(markParrent[i]).find('a.active') | ||
426 | - $(markParrent[i]).find('p.new_mark_').html(markTxt.text()) | ||
427 | - markTxt.css({display : 'none'}) | 415 | + $('.tabs_list ul li').click( |
416 | + function() | ||
417 | + { | ||
418 | + $('.tabs_list ul li').removeClass('active') | ||
419 | + $(this).addClass('active') | ||
420 | + var index = $(this).index() | ||
421 | + var tabs = $('._tabs') | ||
422 | + tabs.css({display : 'none'}) | ||
423 | + $(tabs[index]).css({display : 'block'}) | ||
424 | + var thisHash = $(this).find('a').attr('href') | ||
425 | + window.location.hash = thisHash; | ||
426 | + } | ||
427 | + ) | ||
428 | + | ||
428 | } | 429 | } |
429 | 430 | ||
430 | - markParrent.click( | ||
431 | - function() | 431 | + function tenderMark() |
432 | + { | ||
433 | + var markParrent = $('.project_owner_control') | ||
434 | + markParrent.addClass('_on') | ||
435 | + for(var i = 0; i < markParrent.length; i++) | ||
432 | { | 436 | { |
433 | - $(this).toggleClass('focus') | ||
434 | - if($(this).hasClass('focus')) | ||
435 | - { | ||
436 | - $(this).addClass('shadow_') | ||
437 | - var height = $(this).height() | ||
438 | - var newHeight = ($(this).find('div').height()) + 2 | ||
439 | - $(this).css({height : (height + newHeight)}) | ||
440 | - markParrent.find('a').click( | ||
441 | - function() | ||
442 | - { | ||
443 | - $(this).parent().prev().html($(this).text()) | 437 | + var markTxt = $(markParrent[i]).find('a.active') |
438 | + $(markParrent[i]).find('p.new_mark_').html(markTxt.text()) | ||
439 | + markTxt.css({display : 'none'}) | ||
440 | + } | ||
444 | 441 | ||
445 | - } | ||
446 | - ) | ||
447 | - } else | 442 | + markParrent.click( |
443 | + function() | ||
448 | { | 444 | { |
449 | - $(this).removeClass('shadow_') | ||
450 | - $(this).css({height : 29}) | 445 | + $(this).toggleClass('focus') |
446 | + if($(this).hasClass('focus')) | ||
447 | + { | ||
448 | + $(this).addClass('shadow_') | ||
449 | + var height = $(this).height() | ||
450 | + var newHeight = ($(this).find('div').height()) + 2 | ||
451 | + $(this).css({height : (height + newHeight)}) | ||
452 | + markParrent.find('a').click( | ||
453 | + function() | ||
454 | + { | ||
455 | + $(this).parent().prev().html($(this).text()) | ||
456 | + | ||
457 | + } | ||
458 | + ) | ||
459 | + } else | ||
460 | + { | ||
461 | + $(this).removeClass('shadow_') | ||
462 | + $(this).css({height : 29}) | ||
463 | + } | ||
451 | } | 464 | } |
452 | - } | ||
453 | - ) | ||
454 | -// submitForm(); | ||
455 | - function submitForm() { | ||
456 | - $('.input-blocks-comm-button button').click(function () { | ||
457 | - setInterval(function () { | ||
458 | - var length = ($('.test-class-success').length) | ||
459 | - if(length>0){ | ||
460 | - console.log('has') | 465 | + ) |
466 | + // submitForm(); | ||
467 | + function submitForm() | ||
468 | + { | ||
469 | + $('.input-blocks-comm-button button').click( | ||
470 | + function() | ||
471 | + { | ||
472 | + setInterval( | ||
473 | + function() | ||
474 | + { | ||
475 | + var length = ($('.test-class-success').length) | ||
476 | + if(length > 0) | ||
477 | + { | ||
478 | + console.log('has') | ||
479 | + } | ||
480 | + }, 100 | ||
481 | + ) | ||
482 | + | ||
461 | } | 483 | } |
462 | - },100) | 484 | + ) |
485 | + } | ||
463 | 486 | ||
464 | - }) | ||
465 | } | 487 | } |
466 | 488 | ||
467 | } | 489 | } |
468 | - | ||
469 | - } | ||
470 | - ) | ||
471 | -</script> | ||
472 | -<script> | ||
473 | - $('div.rating, div.rating-new').rating( | ||
474 | - { | ||
475 | - fx : 'full', readOnly : 'true', url : 'rating.php' | ||
476 | - } | ||
477 | - ); | ||
478 | -</script> | ||
479 | \ No newline at end of file | 490 | \ No newline at end of file |
491 | + ) | ||
492 | + </script> | ||
493 | + <script> | ||
494 | + $('div.rating, div.rating-new').rating( | ||
495 | + { | ||
496 | + fx : 'full', | ||
497 | + readOnly : 'true', | ||
498 | + url : 'rating.php' | ||
499 | + } | ||
500 | + ); | ||
501 | + </script> | ||
480 | \ No newline at end of file | 502 | \ No newline at end of file |
frontend/web/css/style.css
@@ -2488,7 +2488,8 @@ input[type=file]::-webkit-file-upload-button { | @@ -2488,7 +2488,8 @@ input[type=file]::-webkit-file-upload-button { | ||
2488 | } | 2488 | } |
2489 | 2489 | ||
2490 | .performance-vacancy-sidebar-stars { | 2490 | .performance-vacancy-sidebar-stars { |
2491 | - margin-top: 24px | 2491 | + /*margin-top: 24px;*/ |
2492 | + margin-top: -5px; | ||
2492 | } | 2493 | } |
2493 | .performance-vacancy-sidebar-stars .rating-container {height: 19px} | 2494 | .performance-vacancy-sidebar-stars .rating-container {height: 19px} |
2494 | /****perform-vacancy-page****/ | 2495 | /****perform-vacancy-page****/ |
@@ -2750,7 +2751,7 @@ input[type=file]::-webkit-file-upload-button { | @@ -2750,7 +2751,7 @@ input[type=file]::-webkit-file-upload-button { | ||
2750 | } | 2751 | } |
2751 | 2752 | ||
2752 | .blog-post-wr:first-child { | 2753 | .blog-post-wr:first-child { |
2753 | - margin-top: 15px; | 2754 | + margin-top: -1px |
2754 | } | 2755 | } |
2755 | 2756 | ||
2756 | .blog-post-title p { | 2757 | .blog-post-title p { |
@@ -8842,14 +8843,10 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -8842,14 +8843,10 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
8842 | text-align: center; | 8843 | text-align: center; |
8843 | } | 8844 | } |
8844 | 8845 | ||
8845 | -.admin-avatar-pattern .remover_image#image_remove_img { | 8846 | +.admin-avatar-pattern .remover_image { |
8846 | left: 180px !important; | 8847 | left: 180px !important; |
8847 | } | 8848 | } |
8848 | 8849 | ||
8849 | -.admin-avatar-pattern .remover_image#poster_remove_img { | ||
8850 | - left: 700px !important; | ||
8851 | -} | ||
8852 | - | ||
8853 | .admin-pattern .file-help-1 { | 8850 | .admin-pattern .file-help-1 { |
8854 | display: none | 8851 | display: none |
8855 | } | 8852 | } |
@@ -12431,4 +12428,5 @@ li.active-menu-admin:hover a .ico_num { | @@ -12431,4 +12428,5 @@ li.active-menu-admin:hover a .ico_num { | ||
12431 | background: url("/images/delet-file.png") no-repeat; | 12428 | background: url("/images/delet-file.png") no-repeat; |
12432 | padding-left: 0 !important; | 12429 | padding-left: 0 !important; |
12433 | } | 12430 | } |
12434 | -#modal_form_contacts .fileloader-item-remove:before {display:none;} | ||
12435 | \ No newline at end of file | 12431 | \ No newline at end of file |
12432 | +#modal_form_contacts .fileloader-item-remove:before {display:none;} | ||
12433 | +.command-block-name {height: 50px;overflow: hidden; font-size: 16px;} | ||
12436 | \ No newline at end of file | 12434 | \ No newline at end of file |
frontend/web/js/artbox.maps.js
frontend/web/js/script.js
@@ -293,15 +293,6 @@ $(document).ready( | @@ -293,15 +293,6 @@ $(document).ready( | ||
293 | 293 | ||
294 | function federationHome() | 294 | function federationHome() |
295 | { | 295 | { |
296 | - var menu_width = 0; | ||
297 | - $('.federation-home-list li').each( | ||
298 | - function() | ||
299 | - { | ||
300 | - menu_width = menu_width + $(this).outerWidth() + 9 | ||
301 | - } | ||
302 | - ); | ||
303 | - $('.federation-home-list').css({width : menu_width}); | ||
304 | - | ||
305 | $('.federation-home-list li').click( | 296 | $('.federation-home-list li').click( |
306 | function() | 297 | function() |
307 | { | 298 | { |