Commit c20d5820761b45e113e6373c5d0ca28d0f0cd418
1 parent
d1721449
test
Showing
11 changed files
with
51 additions
and
50 deletions
Show diff stats
common/models/Job.php
... | ... | @@ -40,7 +40,9 @@ |
40 | 40 | |
41 | 41 | public function beforeSave($insert) |
42 | 42 | { |
43 | - $this->date_start = \Yii::$app->formatter->asDatetime($this->date_start, 'Y-MM-d HH:mm:ss'); | |
43 | + if($this->date_start) { | |
44 | + $this->date_start = \Yii::$app->formatter->asDatetime($this->date_start, 'Y-MM-d HH:mm:ss'); | |
45 | + } | |
44 | 46 | |
45 | 47 | if($this->date_end) { |
46 | 48 | $this->date_end = \Yii::$app->formatter->asDatetime($this->date_end, 'Y-MM-d HH:mm:ss'); |
... | ... | @@ -173,16 +175,6 @@ |
173 | 175 | return false; |
174 | 176 | } |
175 | 177 | return $result; |
176 | -// if($this->date_end && $this->date_start) { | |
177 | -// $date = new \DateTime(date('Y-m-d H:i:s', $this->date_start)); | |
178 | -// return \Yii::$app->formatter->asRelativeTime($date->diff(new \DateTime(date('Y-m-d H:i:s', $this->date_end)))); | |
179 | -// } elseif($this->date_start) { | |
180 | -// $now = new \DateTime(); | |
181 | -// $date = new \DateTime(date('Y-m-d H:i:s', strtotime($this->date_start))); | |
182 | -// return \Yii::$app->formatter->asRelativeTime($date->diff(new \DateTime())); | |
183 | -// } else { | |
184 | -// return 'неизвестна дата начала'; | |
185 | -// } | |
186 | 178 | } |
187 | 179 | |
188 | 180 | ... | ... |
frontend/controllers/CompanyController.php
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | |
36 | 36 | public function afterAction($action, $result) |
37 | 37 | { |
38 | + $result = parent::afterAction($action, $result); | |
38 | 39 | if(!empty( $action->controller->actionParams[ 'company_id' ] )) { |
39 | 40 | $company_id = $action->controller->actionParams[ 'company_id' ]; |
40 | 41 | $user = User::findOne($company_id); |
... | ... | @@ -52,10 +53,12 @@ |
52 | 53 | } |
53 | 54 | } |
54 | 55 | } |
55 | - $user->userInfo->updateCounters([ 'view_count' => 1 ]); | |
56 | + if($user->id != \Yii::$app->user->id) { | |
57 | + $user->userInfo->updateCounters([ 'view_count' => 1 ]); | |
58 | + } | |
56 | 59 | } |
57 | 60 | } |
58 | - return parent::afterAction($action, $result); | |
61 | + return $result; | |
59 | 62 | } |
60 | 63 | |
61 | 64 | /** | ... | ... |
frontend/controllers/PerformerController.php
frontend/controllers/TenderController.php
... | ... | @@ -6,26 +6,10 @@ |
6 | 6 | use common\models\Project; |
7 | 7 | use common\modules\comment\models\CommentProject; |
8 | 8 | use Yii; |
9 | - use common\models\LoginForm; | |
10 | - use frontend\models\PasswordResetRequestForm; | |
11 | - use frontend\models\ResetPasswordForm; | |
12 | - use frontend\models\SignupForm; | |
13 | - use frontend\models\ContactForm; | |
14 | - use frontend\models\Options; | |
15 | - use frontend\models\OptionValues; | |
16 | - use yii\base\InvalidParamException; | |
17 | 9 | use yii\helpers\Html; |
18 | - use yii\web\BadRequestHttpException; | |
19 | 10 | use yii\web\Controller; |
20 | - use yii\filters\VerbFilter; | |
21 | 11 | use yii\filters\AccessControl; |
22 | - use frontend\models\OptionsToValues; | |
23 | - use yii\validators\EmailValidator; | |
24 | 12 | use common\models\User; |
25 | - use yii\helpers\VarDumper; | |
26 | - use common\models\Page; | |
27 | - use frontend\models\Option; | |
28 | - use common\models\Social; | |
29 | 13 | use yii\web\NotFoundHttpException; |
30 | 14 | |
31 | 15 | /** | ... | ... |
frontend/views/accounts/_job_form.php
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | * @var integer $index |
4 | 4 | */ |
5 | 5 | use common\models\Job; |
6 | + use mihaildev\ckeditor\CKEditor; | |
6 | 7 | use yii\helpers\Html; |
7 | 8 | use yii\jui\DatePicker; |
8 | 9 | use yii\widgets\ActiveForm; |
... | ... | @@ -72,6 +73,14 @@ |
72 | 73 | </div> |
73 | 74 | </div> |
74 | 75 | |
76 | + <div class="input-blocks-wrapper"> | |
77 | + <div class="input-blocks"> | |
78 | + <?= $form->field($model, '[' . $index . ']achievement') | |
79 | + ->label('Достижения') | |
80 | + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?> | |
81 | + </div> | |
82 | + </div> | |
83 | + | |
75 | 84 | <div class="input-blocks-wrapper admin-quantity-project"> |
76 | 85 | <div class="input-blocks"> |
77 | 86 | <?= $form->field($model, '[' . $index . ']total_count') | ... | ... |
frontend/views/accounts/general.php
frontend/views/layouts/performer.php
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
81 | 81 | ], |
82 | 82 | 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, |
83 | - 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, | |
83 | + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id) ? true : false, | |
84 | 84 | ], |
85 | 85 | [ |
86 | 86 | 'label' => 'Заказанные работы', |
... | ... | @@ -90,15 +90,16 @@ |
90 | 90 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
91 | 91 | ], |
92 | 92 | 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, |
93 | - 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, | |
93 | + 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, | |
94 | 94 | ], |
95 | 95 | [ |
96 | - 'label' => 'Блог', | |
97 | - 'url' => [ | |
96 | + 'label' => 'Блог', | |
97 | + 'url' => [ | |
98 | 98 | 'performer/blog-list', |
99 | 99 | 'performer_id' => $this->params[ 'user' ]->id, |
100 | 100 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
101 | 101 | ], |
102 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | |
102 | 103 | 'active' => preg_match('/^blog.*$/', $this->context->action->id) ? true : false, |
103 | 104 | ], |
104 | 105 | [ |
... | ... | @@ -116,6 +117,7 @@ |
116 | 117 | 'performer_id' => $this->params[ 'user' ]->id, |
117 | 118 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
118 | 119 | ], |
120 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | |
119 | 121 | ], |
120 | 122 | [ |
121 | 123 | 'label' => 'Галерея', |
... | ... | @@ -124,6 +126,7 @@ |
124 | 126 | 'performer_id' => $this->params[ 'user' ]->id, |
125 | 127 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
126 | 128 | ], |
129 | + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | |
127 | 130 | ], |
128 | 131 | ], |
129 | 132 | ]); |
... | ... | @@ -143,7 +146,7 @@ |
143 | 146 | <li class="activejob"> |
144 | 147 | <?php |
145 | 148 | if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { |
146 | - if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | |
149 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | |
147 | 150 | echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); |
148 | 151 | } else { |
149 | 152 | echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); |
... | ... | @@ -248,19 +251,21 @@ |
248 | 251 | ?> |
249 | 252 | </div> |
250 | 253 | </li> |
251 | - <li> | |
252 | - <img src="/images/sidebar-ico/ico-10.png" alt=""/> | |
253 | - <div class="sidebarvievstxt"> | |
254 | - <span class="sidebar-views-txt">Трудовой стаж:<br/></span> | |
255 | - <?php | |
256 | - if(!empty( $this->params[ 'user' ]->userInfo->experience )) { | |
257 | - echo 'С ' . $this->params[ 'user' ]->userInfo->experience . ' года'; | |
258 | - } else { | |
259 | - echo 'Не указано'; | |
260 | - } | |
254 | + <?php | |
255 | + if(!empty( $this->params[ 'user' ]->userInfo->experience )) { | |
261 | 256 | ?> |
262 | - </div> | |
263 | - </li> | |
257 | + <li> | |
258 | + <img src="/images/sidebar-ico/ico-10.png" alt=""/> | |
259 | + <div class="sidebarvievstxt"> | |
260 | + <span class="sidebar-views-txt">Трудовой стаж:<br/></span> | |
261 | + <?php | |
262 | + echo 'С ' . $this->params[ 'user' ]->userInfo->experience . ' года'; | |
263 | + ?> | |
264 | + </div> | |
265 | + </li> | |
266 | + <?php | |
267 | + } | |
268 | + ?> | |
264 | 269 | <?php |
265 | 270 | // Predefined in DB variable rank will be used further |
266 | 271 | if(!empty( $this->params[ 'user' ]->userInfo->member )) { | ... | ... |
frontend/views/patrial/show_site.php
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <div class="style"> |
4 | 4 | <div class="profile-site"> |
5 | 5 | <img src="/images/ico-site.png" alt=""/> |
6 | - <a href="http://<?= $site['site']?>" target="_blank"><?= $site['site']?></a> | |
6 | + <a href="<?= $site['site']?>" target="_blank"><?= $site['site']?></a> | |
7 | 7 | </div> |
8 | 8 | </div> |
9 | 9 | <?php endif; ?> | ... | ... |
frontend/views/performer/common.php
frontend/views/performer/workplace.php
... | ... | @@ -30,6 +30,10 @@ |
30 | 30 | ?> |
31 | 31 | </div> |
32 | 32 | <div class="workplace-experience-post-vacancy"><?= $job->position ?></div> |
33 | + <div class="workplace-experience-post-vacancy"> | |
34 | + <span>Достижения:</span> | |
35 | + <p><?=$job->achievement?></p> | |
36 | + </div> | |
33 | 37 | </div> |
34 | 38 | <?php endforeach; ?> |
35 | 39 | </div> | ... | ... |
frontend/web/css/style.css
... | ... | @@ -8842,10 +8842,14 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- |
8842 | 8842 | text-align: center; |
8843 | 8843 | } |
8844 | 8844 | |
8845 | -.admin-avatar-pattern .remover_image { | |
8845 | +.admin-avatar-pattern .remover_image#image_remove_img { | |
8846 | 8846 | left: 180px !important; |
8847 | 8847 | } |
8848 | 8848 | |
8849 | +.admin-avatar-pattern .remover_image#poster_remove_img { | |
8850 | + left: 700px !important; | |
8851 | +} | |
8852 | + | |
8849 | 8853 | .admin-pattern .file-help-1 { |
8850 | 8854 | display: none |
8851 | 8855 | } | ... | ... |