Commit 69e6fb9626d968e44e246775e8c89ea5a45f18d9

Authored by Yarik
1 parent 90930c7c

test

common/models/CompanyInfo.php
... ... @@ -52,6 +52,7 @@
52 52 [ 'staff' ],
53 53 'integer',
54 54 'min' => 1,
  55 + 'max' => 100000
55 56 ],
56 57 ];
57 58 }
... ...
common/models/User.php
... ... @@ -437,7 +437,7 @@
437 437 public function getAddress()
438 438 {
439 439 $address = $this->userInfo->city;
440   - if(!empty($this->userInfo->county)) {
  440 + if(!empty($this->userInfo->country)) {
441 441 $address = $this->userInfo->country.', '.$address;
442 442 }
443 443 if($this->type == 2) {
... ...
frontend/views/layouts/admin.php
... ... @@ -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 41 'label' => Yii::t('app', 'Your projects'),
47 42 'url' => [ 'accounts/projects' ],
48 43 'active' => preg_match('/^projects.*$/', $this->context->action->id) ? true : false,
... ... @@ -83,7 +78,7 @@
83 78 ],
84 79 [
85 80 'label' => 'Закладки',
86   - 'url' => [ 'accounts/bookmarks' ],
  81 + 'url' => [ '/bookmarks' ],
87 82 'options' => [ 'class' => 'admin-menu-icons admin-menu-ico-3', ],
88 83 ],
89 84 [
... ... @@ -108,10 +103,14 @@
108 103 );
109 104 } else if(\Yii::$app->user->identity->type == 2) {
110 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 1 <?php
2 2 /**
3   - * @var View $this
  3 + * @var View $this
4 4 * @var SearchPerformerForm $model
5 5 */
6 6  
... ... @@ -37,8 +37,6 @@
37 37 'method' => 'get',
38 38 ]);
39 39 ?>
40   -
41   -
42 40 <?= $form->field($model, 'city')
43 41 ->widget(Select2::classname(), [
44 42 'options' => [ 'placeholder' => 'Выбор города ...' ],
... ... @@ -177,8 +175,11 @@
177 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 184 <div class="search-worker-sort-wr style">
184 185 <div class="search-worker-sort">Сортировать:&nbsp;</div>
... ...