Commit 69e6fb9626d968e44e246775e8c89ea5a45f18d9
1 parent
90930c7c
test
Showing
4 changed files
with
17 additions
and
16 deletions
Show diff stats
common/models/CompanyInfo.php
common/models/User.php
| @@ -437,7 +437,7 @@ | @@ -437,7 +437,7 @@ | ||
| 437 | public function getAddress() | 437 | public function getAddress() |
| 438 | { | 438 | { |
| 439 | $address = $this->userInfo->city; | 439 | $address = $this->userInfo->city; |
| 440 | - if(!empty($this->userInfo->county)) { | 440 | + if(!empty($this->userInfo->country)) { |
| 441 | $address = $this->userInfo->country.', '.$address; | 441 | $address = $this->userInfo->country.', '.$address; |
| 442 | } | 442 | } |
| 443 | if($this->type == 2) { | 443 | if($this->type == 2) { |
frontend/views/layouts/admin.php
| @@ -38,11 +38,6 @@ | @@ -38,11 +38,6 @@ | ||
| 38 | ], | 38 | ], |
| 39 | 39 | ||
| 40 | [ | 40 | [ |
| 41 | - 'label' => 'Вакансии', | ||
| 42 | - 'url' => [ 'accounts/vacancy' ], | ||
| 43 | - 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, | ||
| 44 | - ], | ||
| 45 | - [ | ||
| 46 | 'label' => Yii::t('app', 'Your projects'), | 41 | 'label' => Yii::t('app', 'Your projects'), |
| 47 | 'url' => [ 'accounts/projects' ], | 42 | 'url' => [ 'accounts/projects' ], |
| 48 | 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, | 43 | 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false, |
| @@ -83,7 +78,7 @@ | @@ -83,7 +78,7 @@ | ||
| 83 | ], | 78 | ], |
| 84 | [ | 79 | [ |
| 85 | 'label' => 'Закладки', | 80 | 'label' => 'Закладки', |
| 86 | - 'url' => [ 'accounts/bookmarks' ], | 81 | + 'url' => [ '/bookmarks' ], |
| 87 | 'options' => [ 'class' => 'admin-menu-icons admin-menu-ico-3', ], | 82 | 'options' => [ 'class' => 'admin-menu-icons admin-menu-ico-3', ], |
| 88 | ], | 83 | ], |
| 89 | [ | 84 | [ |
| @@ -108,10 +103,14 @@ | @@ -108,10 +103,14 @@ | ||
| 108 | ); | 103 | ); |
| 109 | } else if(\Yii::$app->user->identity->type == 2) { | 104 | } else if(\Yii::$app->user->identity->type == 2) { |
| 110 | array_push($item, [ | 105 | array_push($item, [ |
| 111 | - 'label' => 'Команда', | ||
| 112 | - 'url' => [ 'accounts/team' ], | ||
| 113 | - 'active' => preg_match('/^team.*$/', $this->context->action->id) ? true : false, | ||
| 114 | - ]); | 106 | + 'label' => 'Команда', |
| 107 | + 'url' => [ 'accounts/team' ], | ||
| 108 | + 'active' => preg_match('/^team.*$/', $this->context->action->id) ? true : false, | ||
| 109 | + ], [ | ||
| 110 | + 'label' => 'Вакансии', | ||
| 111 | + 'url' => [ 'accounts/vacancy' ], | ||
| 112 | + 'active' => preg_match('/^vacancy.*$/', $this->context->action->id) ? true : false, | ||
| 113 | + ]); | ||
| 115 | 114 | ||
| 116 | } | 115 | } |
| 117 | 116 |
frontend/views/search/performer.php
| 1 | <?php | 1 | <?php |
| 2 | /** | 2 | /** |
| 3 | - * @var View $this | 3 | + * @var View $this |
| 4 | * @var SearchPerformerForm $model | 4 | * @var SearchPerformerForm $model |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -37,8 +37,6 @@ | @@ -37,8 +37,6 @@ | ||
| 37 | 'method' => 'get', | 37 | 'method' => 'get', |
| 38 | ]); | 38 | ]); |
| 39 | ?> | 39 | ?> |
| 40 | - | ||
| 41 | - | ||
| 42 | <?= $form->field($model, 'city') | 40 | <?= $form->field($model, 'city') |
| 43 | ->widget(Select2::classname(), [ | 41 | ->widget(Select2::classname(), [ |
| 44 | 'options' => [ 'placeholder' => 'Выбор города ...' ], | 42 | 'options' => [ 'placeholder' => 'Выбор города ...' ], |
| @@ -177,8 +175,11 @@ | @@ -177,8 +175,11 @@ | ||
| 177 | $form2->end(); | 175 | $form2->end(); |
| 178 | ?> | 176 | ?> |
| 179 | 177 | ||
| 180 | - | ||
| 181 | - <?= Html::a('Добавить себя в каталог', Url::toRoute('accounts/service'), [ 'class' => 'add-to-catalog-search-worker' ]) ?> | 178 | + <?php |
| 179 | + if(empty(\Yii::$app->user->id) || empty(\Yii::$app->user->identity->specializations)) { | ||
| 180 | + echo Html::a('Добавить себя в каталог', Url::toRoute('accounts/service'), [ 'class' => 'add-to-catalog-search-worker' ]); | ||
| 181 | + } | ||
| 182 | + ?> | ||
| 182 | 183 | ||
| 183 | <div class="search-worker-sort-wr style"> | 184 | <div class="search-worker-sort-wr style"> |
| 184 | <div class="search-worker-sort">Сортировать: </div> | 185 | <div class="search-worker-sort">Сортировать: </div> |