Commit ee19d6cf565511efcfd57d3f1bde8b3fcc9208f6
Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/web/css/style.css
Showing
15 changed files
with
170 additions
and
149 deletions
Show diff stats
common/models/Team.php
common/models/TeamSearch.php
@@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
170 | 0, | 170 | 0, |
171 | ]); | 171 | ]); |
172 | } | 172 | } |
173 | - | 173 | + |
174 | $query->andFilterWhere([ | 174 | $query->andFilterWhere([ |
175 | 'like', | 175 | 'like', |
176 | 'firstname', | 176 | 'firstname', |
@@ -188,8 +188,8 @@ | @@ -188,8 +188,8 @@ | ||
188 | ]) | 188 | ]) |
189 | ->andFilterWhere([ | 189 | ->andFilterWhere([ |
190 | 'like', | 190 | 'like', |
191 | - 'position', | ||
192 | - $this->position, | 191 | + 'LOWER(position)', |
192 | + mb_strtolower($this->position), | ||
193 | ]) | 193 | ]) |
194 | ->andFilterWhere([ | 194 | ->andFilterWhere([ |
195 | 'like', | 195 | 'like', |
common/models/Vacancy.php
@@ -29,6 +29,8 @@ | @@ -29,6 +29,8 @@ | ||
29 | class Vacancy extends \yii\db\ActiveRecord | 29 | class Vacancy extends \yii\db\ActiveRecord |
30 | { | 30 | { |
31 | 31 | ||
32 | + const STATUS_ACTIVE = 1; | ||
33 | + const STATUS_CLOSED = 3; | ||
32 | /** | 34 | /** |
33 | * @inheritdoc | 35 | * @inheritdoc |
34 | */ | 36 | */ |
@@ -82,10 +84,15 @@ | @@ -82,10 +84,15 @@ | ||
82 | 'safe', | 84 | 'safe', |
83 | ], | 85 | ], |
84 | [ | 86 | [ |
85 | - ['salary_currency'], | 87 | + ['salary_currency', 'status',], |
86 | 'integer' | 88 | 'integer' |
87 | ], | 89 | ], |
88 | [ | 90 | [ |
91 | + ['salary'], | ||
92 | + 'integer', | ||
93 | + 'min' => 0, | ||
94 | + ], | ||
95 | + [ | ||
89 | [ 'employmentInput', 'specializationInput' ], | 96 | [ 'employmentInput', 'specializationInput' ], |
90 | 'default', | 97 | 'default', |
91 | 'value' => [], | 98 | 'value' => [], |
@@ -96,6 +103,11 @@ | @@ -96,6 +103,11 @@ | ||
96 | 'value' => 0, | 103 | 'value' => 0, |
97 | ], | 104 | ], |
98 | [ | 105 | [ |
106 | + [ 'status' ], | ||
107 | + 'default', | ||
108 | + 'value' => 1, | ||
109 | + ], | ||
110 | + [ | ||
99 | [ | 111 | [ |
100 | 'name', | 112 | 'name', |
101 | 'link', | 113 | 'link', |
common/models/VacancySearch.php
@@ -112,16 +112,11 @@ | @@ -112,16 +112,11 @@ | ||
112 | 112 | ||
113 | $query->andFilterWhere([ | 113 | $query->andFilterWhere([ |
114 | 'like', | 114 | 'like', |
115 | - 'name', | ||
116 | - $this->name, | 115 | + 'LOWER(name)', |
116 | + mb_strtolower($this->name), | ||
117 | ]) | 117 | ]) |
118 | ->andFilterWhere([ | 118 | ->andFilterWhere([ |
119 | 'like', | 119 | 'like', |
120 | - 'link', | ||
121 | - $this->link, | ||
122 | - ]) | ||
123 | - ->andFilterWhere([ | ||
124 | - 'like', | ||
125 | 'user_name', | 120 | 'user_name', |
126 | $this->user_name, | 121 | $this->user_name, |
127 | ]) | 122 | ]) |
common/widgets/ImageUploader.php
@@ -21,6 +21,7 @@ class ImageUploader extends Widget | @@ -21,6 +21,7 @@ class ImageUploader extends Widget | ||
21 | public $gallery; | 21 | public $gallery; |
22 | public $size; | 22 | public $size; |
23 | public $name = 'Add file...'; | 23 | public $name = 'Add file...'; |
24 | + public $remover = false; | ||
24 | 25 | ||
25 | public function init(){ | 26 | public function init(){ |
26 | 27 | ||
@@ -40,7 +41,8 @@ class ImageUploader extends Widget | @@ -40,7 +41,8 @@ class ImageUploader extends Widget | ||
40 | 'height' => $this->height, | 41 | 'height' => $this->height, |
41 | 'width' => $this->width, | 42 | 'width' => $this->width, |
42 | 'multi' => $this->multi, | 43 | 'multi' => $this->multi, |
43 | - 'name' => $this->name | 44 | + 'name' => $this->name, |
45 | + 'remover' => $this->remover | ||
44 | ]); | 46 | ]); |
45 | 47 | ||
46 | } | 48 | } |
common/widgets/views/image_sizer.php
@@ -21,6 +21,13 @@ $id = $model::tableName().'_id'; | @@ -21,6 +21,13 @@ $id = $model::tableName().'_id'; | ||
21 | <div class="tst"> | 21 | <div class="tst"> |
22 | <div id="<?= $field?>_img_block" class="admin-avatar-pattern-wr"> | 22 | <div id="<?= $field?>_img_block" class="admin-avatar-pattern-wr"> |
23 | <div class="admin-avatar-pattern"> | 23 | <div class="admin-avatar-pattern"> |
24 | + <?php | ||
25 | + if($remover && $model->$field) { | ||
26 | + ?> | ||
27 | + <span id="<?=$field?>_remove_img" class="remover_image" style="left:<?=$size[0]['width']?>px"><img src="/images/delete-ico.png" alt=""></span> | ||
28 | + <?php | ||
29 | + } | ||
30 | + ?> | ||
24 | <?= $model->$field ? Html::img($model->$field): '' ?> | 31 | <?= $model->$field ? Html::img($model->$field): '' ?> |
25 | </div> | 32 | </div> |
26 | </div> | 33 | </div> |
@@ -34,67 +41,93 @@ $id = $model::tableName().'_id'; | @@ -34,67 +41,93 @@ $id = $model::tableName().'_id'; | ||
34 | </span> | 41 | </span> |
35 | 42 | ||
36 | <script> | 43 | <script> |
37 | - $(function(){ | ||
38 | - | ||
39 | - $("#<?= $field?>").fileupload({ | ||
40 | - dataType: 'json', | ||
41 | - formData: {size:'<?= json_encode($size)?>'}, | ||
42 | - done: function (e, data) { | ||
43 | - if($("#<?=$field?>_buttons_block").length){ | ||
44 | - $("#<?=$field?>_buttons_block").remove() | 44 | + $(function() |
45 | + { | ||
46 | + | ||
47 | + $("#<?= $field?>").fileupload( | ||
48 | + { | ||
49 | + dataType : 'json', formData : {size : '<?= json_encode($size)?>'}, | ||
50 | + done : function(e, data) | ||
51 | + { | ||
52 | + if($("#<?=$field?>_buttons_block").length) | ||
53 | + { | ||
54 | + $("#<?=$field?>_buttons_block").remove() | ||
55 | + } | ||
56 | + | ||
57 | + $("#<?= $field?>").parent().prev().find('.admin-ava-wr').remove() | ||
58 | + | ||
59 | + var host = window.location.host.toString(); | ||
60 | + var img = '<div class="admin-ava-wr">' + | ||
61 | + <?php | ||
62 | + if($remover) { | ||
63 | + echo "'<span id=\"" . $field . "_remove_img\" class=\"remover_image\" style=\"left:{$size[0]['width']}px\"><img src=\"/images/delete-ico.png\" alt=\"\"></span>'+"; | ||
64 | + } | ||
65 | + ?> | ||
66 | + '<img style="vertical-align: middle; width: <?=$width?>px; height: <?=$height?>px;" src="http://' + host + data.result.link + '"></div>' + '<div id="<?=$field?>_buttons_block">' + '<button type="button" id="<?=$field?>_save_img" class="btn btn-success img-action-buttons" >Сохранить</button>' + '<button type="button" id="<?=$field?>_remove_img" class="btn btn-danger img-action-buttons" >Отмена</button>' + '</div>'; | ||
67 | + var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); | ||
68 | + block.find('img').remove(); | ||
69 | + block.append(img); | ||
70 | + block.parents('.file-uploader-block').parent().addClass('success_download'); | ||
71 | + $("#<?=$field?>_picture_link").val(data.result.link); | ||
72 | + $("#<?=$field?>_new_img").val(data.result.link); | ||
45 | } | 73 | } |
46 | - | ||
47 | - $("#<?= $field?>").parent().prev().find('.admin-ava-wr').remove() | ||
48 | - | ||
49 | - var host = window.location.host.toString(); | ||
50 | - var img = '<div class="admin-ava-wr"><img style="vertical-align: middle; width: <?=$width?>px; height: <?=$height?>px;" src="http://'+host+data.result.link+'"></div>'+ | ||
51 | - '<div id="<?=$field?>_buttons_block">'+ | ||
52 | - '<button type="button" id="<?=$field?>_save_img" class="btn btn-success img-action-buttons" >Сохранить</button>'+ | ||
53 | - '<button type="button" id="<?=$field?>_remove_img" class="btn btn-danger img-action-buttons" >Отмена</button>'+ | ||
54 | - '</div>'; | ||
55 | - var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); | ||
56 | - block.find('img').remove(); | ||
57 | - block.append(img); | ||
58 | - block.parents('.file-uploader-block').parent().addClass('success_download'); | ||
59 | - $("#<?=$field?>_picture_link").val(data.result.link); | ||
60 | - $("#<?=$field?>_new_img").val(data.result.link); | ||
61 | } | 74 | } |
62 | - }); | ||
63 | - | ||
64 | - | ||
65 | - $('body').on('click', '#<?=$field?>_save_img',function(){ | ||
66 | - $("#<?= $field?>_img_block").parent().parent().parent().removeClass('success_download') | ||
67 | - | ||
68 | - $("#<?=$field?>_buttons_block").remove(); | ||
69 | - var old_url = $('#<?=$field?>_old_img').val(); | ||
70 | - var new_url = $('#<?=$field?>_new_img').val(); | ||
71 | - var model = '<?=str_replace('\\', '-',$model::className());?>'; | ||
72 | - $.post( "/file/uploader/delete-image",{new_url:new_url,old_img: old_url,model:model,field:"<?= $field?>", id:"<?=$model->$id?>",action:'save'}, function() { | ||
73 | - }); | ||
74 | - $("#<?=$field?>_picture_link").val(new_url); | ||
75 | - }); | ||
76 | - | ||
77 | - $('body').on('click', '#<?=$field?>_remove_img',function(){ | ||
78 | - $("#<?= $field?>_img_block").parent().parent().parent().removeClass('success_download') | ||
79 | - $("#<?= $field?>_img_block").parent().parent().find('.admin-ava-wr').remove() | ||
80 | - | ||
81 | - $("#<?=$field?>_buttons_block").remove(); | ||
82 | - var old_url = $('#<?=$field?>_old_img').val(); | ||
83 | - var new_url = $('#<?=$field?>_new_img').val(); | ||
84 | - $.post( "/file/uploader/delete-image",{old_img: new_url}, function() { | ||
85 | - }); | ||
86 | - $("#<?=$field?>_picture_link").val(old_url); | ||
87 | - if(old_url.length<=1){ | ||
88 | - $('#<?= $field?>_img_block').find('img').remove() | 75 | + ); |
76 | + | ||
77 | + $('body').on( | ||
78 | + 'click', '#<?=$field?>_save_img', function() | ||
79 | + { | ||
80 | + $("#<?= $field?>_img_block").parent().parent().parent() | ||
81 | + .removeClass('success_download') | ||
82 | + | ||
83 | + $("#<?=$field?>_buttons_block").remove(); | ||
84 | + var old_url = $('#<?=$field?>_old_img').val(); | ||
85 | + var new_url = $('#<?=$field?>_new_img').val(); | ||
86 | + var model = '<?=str_replace('\\', '-', $model::className());?>'; | ||
87 | + $.post( | ||
88 | + "/file/uploader/delete-image", { | ||
89 | + new_url : new_url, old_img : old_url, model : model, field : "<?= $field?>", | ||
90 | + id : "<?=$model->$id?>", action : 'save' | ||
91 | + }, function() | ||
92 | + { | ||
93 | + } | ||
94 | + ); | ||
95 | + $("#<?=$field?>_picture_link").val(new_url); | ||
89 | } | 96 | } |
90 | - else { | ||
91 | - $('#<?= $field?>_img_block').find('img').attr('src',old_url); | 97 | + ); |
98 | + | ||
99 | + $('body').on( | ||
100 | + 'click', '#<?=$field?>_remove_img', function() | ||
101 | + { | ||
102 | + $("#<?= $field?>_img_block").parent().parent().parent() | ||
103 | + .removeClass('success_download'); | ||
104 | + $("#<?= $field?>_img_block").parent().parent().find('.admin-ava-wr').remove(); | ||
105 | + | ||
106 | + $("#<?=$field?>_buttons_block").remove(); | ||
107 | + var old_url = $('#<?=$field?>_old_img').val(); | ||
108 | + var new_url = $('#<?=$field?>_new_img').val(); | ||
109 | + $.post( | ||
110 | + "/file/uploader/delete-image", {old_img : new_url}, function() | ||
111 | + { | ||
112 | + } | ||
113 | + ); | ||
114 | + <?php | ||
115 | + if($remover) { | ||
116 | + echo "$(\"#{$field}_picture_link\").val(''); | ||
117 | + $('#{$field}_img_block').find('img').remove();"; | ||
118 | + } else { | ||
119 | + echo "$(\"#{$field}_picture_link\").val(old_url); | ||
120 | + if(old_url.length<=1){ | ||
121 | + $('#{$field}_img_block').find('img').remove() | ||
122 | + } | ||
123 | + else { | ||
124 | + $('#{$field}_img_block').find('img').attr('src',old_url); | ||
125 | + }"; | ||
126 | + }; | ||
127 | + ?> | ||
92 | } | 128 | } |
93 | - | ||
94 | - }); | ||
95 | - | ||
96 | - | ||
97 | - }) | 129 | + ); |
130 | + }); | ||
98 | </script> | 131 | </script> |
99 | 132 | ||
100 | <?php else:?> | 133 | <?php else:?> |
common/widgets/views/requirements_field.php
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <?php endfor; ?> | 26 | <?php endfor; ?> |
27 | 27 | ||
28 | </div> | 28 | </div> |
29 | - <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить поле</p> | 29 | + <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить еще</p> |
30 | </fieldset> | 30 | </fieldset> |
31 | <script> | 31 | <script> |
32 | var start_i_<?=$this->context->id?> = <?=$i?>; | 32 | var start_i_<?=$this->context->id?> = <?=$i?>; |
console/migrations/m160208_101449_team.php
@@ -16,7 +16,7 @@ class m160208_101449_team extends Migration | @@ -16,7 +16,7 @@ class m160208_101449_team extends Migration | ||
16 | 'middlename' => $this->string(255), | 16 | 'middlename' => $this->string(255), |
17 | 'link' => $this->string(255), | 17 | 'link' => $this->string(255), |
18 | 'position' => $this->string(255)->notNull(), | 18 | 'position' => $this->string(255)->notNull(), |
19 | - 'department_id' => $this->integer()->notNull(), | 19 | + 'department_id' => $this->integer(), |
20 | 'experience_from' => $this->integer(), | 20 | 'experience_from' => $this->integer(), |
21 | 'date_add' => $this->timestamp()->notNull(), | 21 | 'date_add' => $this->timestamp()->notNull(), |
22 | 'user_add_id' => $this->integer(), | 22 | 'user_add_id' => $this->integer(), |
frontend/controllers/AccountsController.php
@@ -416,16 +416,15 @@ | @@ -416,16 +416,15 @@ | ||
416 | $post = \Yii::$app->request->post(); | 416 | $post = \Yii::$app->request->post(); |
417 | if(!empty( $post )) { | 417 | if(!empty( $post )) { |
418 | 418 | ||
419 | - | ||
420 | - if($user_info->load($post)){ | 419 | + if($user_info->load($post)) { |
421 | $user_info->save(); | 420 | $user_info->save(); |
422 | } | 421 | } |
423 | 422 | ||
424 | - if($company_info->load($post)){ | 423 | + if($company_info->load($post)) { |
425 | $company_info->save(); | 424 | $company_info->save(); |
426 | } | 425 | } |
427 | 426 | ||
428 | - if($user->load($post) && $user->save() ) { | 427 | + if($user->load($post) && $user->save()) { |
429 | \Yii::$app->session->setFlash('userinfoupdate', 'Информация успешно обновлена'); | 428 | \Yii::$app->session->setFlash('userinfoupdate', 'Информация успешно обновлена'); |
430 | } else { | 429 | } else { |
431 | \Yii::$app->session->setFlash('userinfoupdate', 'Ошибка обновления. Проверьте форму'); | 430 | \Yii::$app->session->setFlash('userinfoupdate', 'Ошибка обновления. Проверьте форму'); |
@@ -730,7 +729,7 @@ | @@ -730,7 +729,7 @@ | ||
730 | foreach($project->paymentInput as $one_payment) { | 729 | foreach($project->paymentInput as $one_payment) { |
731 | $project->link('payments', Payment::findOne($one_payment)); | 730 | $project->link('payments', Payment::findOne($one_payment)); |
732 | } | 731 | } |
733 | - return $this->redirect(['projects']); | 732 | + return $this->redirect([ 'projects' ]); |
734 | } | 733 | } |
735 | } | 734 | } |
736 | return $this->render('_projects_form', [ | 735 | return $this->render('_projects_form', [ |
@@ -952,9 +951,14 @@ | @@ -952,9 +951,14 @@ | ||
952 | ->column(); | 951 | ->column(); |
953 | $post = \Yii::$app->request->post(); | 952 | $post = \Yii::$app->request->post(); |
954 | if($team->load($post) && $team->save()) { | 953 | if($team->load($post) && $team->save()) { |
955 | - return $this->redirect([ | ||
956 | - 'team', | 954 | + return $this->render('_team_form', [ |
955 | + 'team' => $team, | ||
956 | + 'department' => $department, | ||
957 | + 'country' => $country, | ||
957 | ]); | 958 | ]); |
959 | + // return $this->redirect([ | ||
960 | + // 'team', | ||
961 | + // ]); | ||
958 | } else { | 962 | } else { |
959 | return $this->render('_team_form', [ | 963 | return $this->render('_team_form', [ |
960 | 'team' => $team, | 964 | 'team' => $team, |
@@ -1021,10 +1025,14 @@ | @@ -1021,10 +1025,14 @@ | ||
1021 | ->orderBy('specialization_id') | 1025 | ->orderBy('specialization_id') |
1022 | ->all(); | 1026 | ->all(); |
1023 | $currencies = Currency::getCurrencyDropdown(); | 1027 | $currencies = Currency::getCurrencyDropdown(); |
1028 | + $user = \Yii::$app->user->identity; | ||
1024 | $post = \Yii::$app->request->post(); | 1029 | $post = \Yii::$app->request->post(); |
1025 | if(!empty( $post )) { | 1030 | if(!empty( $post )) { |
1026 | $vacancy->load($post); | 1031 | $vacancy->load($post); |
1027 | $vacancy->validate(); | 1032 | $vacancy->validate(); |
1033 | + if(empty( $vacancy->specializationInput )) { | ||
1034 | + $vacancy->addError('specializationInput'); | ||
1035 | + } | ||
1028 | if(!$vacancy->hasErrors()) { | 1036 | if(!$vacancy->hasErrors()) { |
1029 | $vacancy->save(); | 1037 | $vacancy->save(); |
1030 | Fields::saveFieldData(Yii::$app->request->post('Fields'), $vacancy->vacancy_id, Vacancy::className(), 'ru'); | 1038 | Fields::saveFieldData(Yii::$app->request->post('Fields'), $vacancy->vacancy_id, Vacancy::className(), 'ru'); |
@@ -1046,6 +1054,7 @@ | @@ -1046,6 +1054,7 @@ | ||
1046 | 'employment' => $employment, | 1054 | 'employment' => $employment, |
1047 | 'currencies' => $currencies, | 1055 | 'currencies' => $currencies, |
1048 | 'specializations' => $specializations, | 1056 | 'specializations' => $specializations, |
1057 | + 'user' => $user, | ||
1049 | ]); | 1058 | ]); |
1050 | } | 1059 | } |
1051 | 1060 | ||
@@ -1078,6 +1087,7 @@ | @@ -1078,6 +1087,7 @@ | ||
1078 | ->where([ 'specialization_pid' => 0 ]) | 1087 | ->where([ 'specialization_pid' => 0 ]) |
1079 | ->orderBy('specialization_id') | 1088 | ->orderBy('specialization_id') |
1080 | ->all(); | 1089 | ->all(); |
1090 | + $user = \Yii::$app->user->identity; | ||
1081 | $currencies = Currency::getCurrencyDropdown(); | 1091 | $currencies = Currency::getCurrencyDropdown(); |
1082 | $post = \Yii::$app->request->post(); | 1092 | $post = \Yii::$app->request->post(); |
1083 | if(!empty( $post )) { | 1093 | if(!empty( $post )) { |
@@ -1106,6 +1116,7 @@ | @@ -1106,6 +1116,7 @@ | ||
1106 | 'employment' => $employment, | 1116 | 'employment' => $employment, |
1107 | 'currencies' => $currencies, | 1117 | 'currencies' => $currencies, |
1108 | 'specializations' => $specializations, | 1118 | 'specializations' => $specializations, |
1119 | + 'user' => $user, | ||
1109 | ]); | 1120 | ]); |
1110 | } | 1121 | } |
1111 | 1122 |
frontend/views/accounts/_team_form.php
@@ -8,9 +8,7 @@ | @@ -8,9 +8,7 @@ | ||
8 | use common\models\Team; | 8 | use common\models\Team; |
9 | use common\widgets\ImageUploader; | 9 | use common\widgets\ImageUploader; |
10 | use kartik\select2\Select2; | 10 | use kartik\select2\Select2; |
11 | - use mihaildev\ckeditor\CKEditor; | ||
12 | use yii\helpers\Html; | 11 | use yii\helpers\Html; |
13 | - use yii\jui\DatePicker; | ||
14 | use yii\web\JsExpression; | 12 | use yii\web\JsExpression; |
15 | use yii\widgets\ActiveForm; | 13 | use yii\widgets\ActiveForm; |
16 | 14 | ||
@@ -20,13 +18,9 @@ | @@ -20,13 +18,9 @@ | ||
20 | <div class="login-left-column-title"><?= $this->title ?></div> | 18 | <div class="login-left-column-title"><?= $this->title ?></div> |
21 | <div class="login-left-column-title-two style">Редактирование:</div> | 19 | <div class="login-left-column-title-two style">Редактирование:</div> |
22 | 20 | ||
23 | -<div class="input-blocks-wrapper"> | ||
24 | - <div class="input-blocks"> | ||
25 | - <?php | ||
26 | - $form = ActiveForm::begin(); | ||
27 | - ?> | ||
28 | - </div> | ||
29 | -</div> | 21 | +<?php |
22 | + $form = ActiveForm::begin(); | ||
23 | +?> | ||
30 | 24 | ||
31 | <div class="input-blocks-wrapper"> | 25 | <div class="input-blocks-wrapper"> |
32 | <div class="input-blocks"> | 26 | <div class="input-blocks"> |
@@ -60,7 +54,7 @@ | @@ -60,7 +54,7 @@ | ||
60 | <div class="input-blocks-wrapper admn-select-company"> | 54 | <div class="input-blocks-wrapper admn-select-company"> |
61 | <div class="input-blocks"> | 55 | <div class="input-blocks"> |
62 | <?= $form->field($team, 'department_id') | 56 | <?= $form->field($team, 'department_id') |
63 | - ->dropDownList($department) ?> | 57 | + ->dropDownList($department, [ 'prompt' => 'Выберите отдел' ]) ?> |
64 | </div> | 58 | </div> |
65 | </div> | 59 | </div> |
66 | 60 | ||
@@ -99,13 +93,14 @@ | @@ -99,13 +93,14 @@ | ||
99 | 93 | ||
100 | <div class="input-blocks-wrapper admin-avatar amin-team-foto"> | 94 | <div class="input-blocks-wrapper admin-avatar amin-team-foto"> |
101 | <?= ImageUploader::widget([ | 95 | <?= ImageUploader::widget([ |
96 | + 'remover' => true, | ||
102 | 'model' => $team, | 97 | 'model' => $team, |
103 | 'field' => 'photo', | 98 | 'field' => 'photo', |
104 | - 'size' => [ | 99 | + 'size' => [ |
105 | [ | 100 | [ |
106 | - 'width' => 100, | ||
107 | - 'height' => 100, | ||
108 | - ] | 101 | + 'width' => 100, |
102 | + 'height' => 100, | ||
103 | + ], | ||
109 | ], | 104 | ], |
110 | 'multi' => false, | 105 | 'multi' => false, |
111 | 'gallery' => $team->photo, | 106 | 'gallery' => $team->photo, |
@@ -115,7 +110,7 @@ | @@ -115,7 +110,7 @@ | ||
115 | 110 | ||
116 | <div class="input-blocks-wrapper"> | 111 | <div class="input-blocks-wrapper"> |
117 | <div class="admin-save-btn skills-save-btn admin-add-remove-wr style"> | 112 | <div class="admin-save-btn skills-save-btn admin-add-remove-wr style"> |
118 | - <?= Html::submitButton($team->isNewRecord?'Добавить':'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> | 113 | + <?= Html::submitButton($team->isNewRecord ? 'Добавить' : 'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> |
119 | <div class="admin-remove-note"> | 114 | <div class="admin-remove-note"> |
120 | <?php | 115 | <?php |
121 | if(!$team->isNewRecord) { | 116 | if(!$team->isNewRecord) { |
@@ -133,7 +128,7 @@ | @@ -133,7 +128,7 @@ | ||
133 | ?> | 128 | ?> |
134 | </div> | 129 | </div> |
135 | <div class="admin-back-note"> | 130 | <div class="admin-back-note"> |
136 | - <?= Html::a('вернуться', Request::getIsLocal(\Yii::$app->request->referrer)?\Yii::$app->request->referrer:['accounts/team' ]) ?> | 131 | + <?= Html::a('вернуться', Request::getIsLocal(\Yii::$app->request->referrer) ? \Yii::$app->request->referrer : [ 'accounts/team' ]) ?> |
137 | </div> | 132 | </div> |
138 | </div> | 133 | </div> |
139 | </div> | 134 | </div> |
frontend/views/accounts/_vacancy_form.php
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | * @var Employment[] $employment | 4 | * @var Employment[] $employment |
5 | * @var string[] $currencies | 5 | * @var string[] $currencies |
6 | * @var Specialization[] $specializations | 6 | * @var Specialization[] $specializations |
7 | + * @var User $user | ||
7 | */ | 8 | */ |
8 | use common\components\Request; | 9 | use common\components\Request; |
9 | use common\models\Employment; | 10 | use common\models\Employment; |
@@ -15,6 +16,7 @@ | @@ -15,6 +16,7 @@ | ||
15 | use yii\helpers\Html; | 16 | use yii\helpers\Html; |
16 | use yii\web\JsExpression; | 17 | use yii\web\JsExpression; |
17 | use yii\widgets\ActiveForm; | 18 | use yii\widgets\ActiveForm; |
19 | + use common\models\User; | ||
18 | 20 | ||
19 | $this->title = 'Вакансии'; | 21 | $this->title = 'Вакансии'; |
20 | $this->params[ 'breadcrumbs' ][] = $this->title; | 22 | $this->params[ 'breadcrumbs' ][] = $this->title; |
@@ -38,7 +40,7 @@ | @@ -38,7 +40,7 @@ | ||
38 | <div class="input-blocks"> | 40 | <div class="input-blocks"> |
39 | <?= $form->field($vacancy, 'user_name') | 41 | <?= $form->field($vacancy, 'user_name') |
40 | ->textInput (['class'=> 'custom-input-2']); ?> | 42 | ->textInput (['class'=> 'custom-input-2']); ?> |
41 | - <span class="admin-hint-vacancy-contact">Вы</span> | 43 | + <span class="admin-hint-vacancy-contact form_auto_data" data-value="<?=$user->firstname.' '.$user->lastname?>">Вы</span> |
42 | </div> | 44 | </div> |
43 | </div> | 45 | </div> |
44 | 46 | ||
@@ -46,7 +48,6 @@ | @@ -46,7 +48,6 @@ | ||
46 | <div class="input-blocks"> | 48 | <div class="input-blocks"> |
47 | <?= $form->field($vacancy, 'phone') | 49 | <?= $form->field($vacancy, 'phone') |
48 | ->textInput (['class'=> 'custom-input-2']); ?> | 50 | ->textInput (['class'=> 'custom-input-2']); ?> |
49 | - <span class="admin-hint-vacancy-contact">Ваш</span> | ||
50 | </div> | 51 | </div> |
51 | </div> | 52 | </div> |
52 | 53 | ||
@@ -69,7 +70,7 @@ | @@ -69,7 +70,7 @@ | ||
69 | ], | 70 | ], |
70 | ]); | 71 | ]); |
71 | ?> | 72 | ?> |
72 | - <span class="admin-hint-vacancy-contact">Ваш</span> | 73 | + <span class="admin-hint-vacancy-contact form_auto_data" data-value="<?=$user->userInfo->city?>">Ваш</span> |
73 | </div> | 74 | </div> |
74 | </div> | 75 | </div> |
75 | 76 | ||
@@ -80,7 +81,7 @@ | @@ -80,7 +81,7 @@ | ||
80 | 'options' => [ 'class' => 'form-inline' ], | 81 | 'options' => [ 'class' => 'form-inline' ], |
81 | ]) | 82 | ]) |
82 | ->label('Заработная плата') | 83 | ->label('Заработная плата') |
83 | - ->textInput (['class'=> 'custom-input-2 custom-input-2-date','type'=>'number']); | 84 | + ->textInput (['class'=> 'custom-input-2 custom-input-2-date','type'=>'number', 'min' => 0]); |
84 | ?> | 85 | ?> |
85 | </div> | 86 | </div> |
86 | <div class="input-blocks admin-currency-second"> | 87 | <div class="input-blocks admin-currency-second"> |
@@ -214,9 +215,14 @@ | @@ -214,9 +215,14 @@ | ||
214 | $form->end(); | 215 | $form->end(); |
215 | ?> | 216 | ?> |
216 | <script> | 217 | <script> |
217 | - $(document).ready(function(){ | 218 | + $(function() { |
218 | $('.input-blocks.admin-currency-second select').change(function(){ | 219 | $('.input-blocks.admin-currency-second select').change(function(){ |
219 | $(this).blur() | 220 | $(this).blur() |
220 | - }) | ||
221 | - }) | 221 | + }); |
222 | + $(document).on('click', '.form_auto_data', function() { | ||
223 | + var value = $(this).data('value'); | ||
224 | + var container = $(this).parents('.input-blocks').first(); | ||
225 | + $('#vacancy-city').select2().val(value).trigger('change'); | ||
226 | + }); | ||
227 | + }); | ||
222 | </script> | 228 | </script> |
223 | \ No newline at end of file | 229 | \ No newline at end of file |
frontend/views/company/_company_list_view.php
1 | <?php | 1 | <?php |
2 | -use yii\helpers\Html; | ||
3 | -use yii\helpers\Url; | ||
4 | - | 2 | + use yii\helpers\Html; |
3 | + use yii\helpers\Url; | ||
5 | 4 | ||
6 | ?> | 5 | ?> |
7 | <div class="command-block-wrapper"> | 6 | <div class="command-block-wrapper"> |
8 | <div class="command-block-wr-two"> | 7 | <div class="command-block-wr-two"> |
9 | <div class="command-block-foto"> | 8 | <div class="command-block-foto"> |
10 | - <?= Html::a(($model->photo ? Html::img($model->photo) : '') . '<div class="hover-command-bg"></div>', Url::toRoute(['#']))?> | 9 | + <?= Html::a(( $model->photo ? Html::img($model->photo) : '' ) . '<div class="hover-command-bg"></div>', Url::toRoute([ '#' ])) ?> |
11 | </div> | 10 | </div> |
12 | <div class="command-block-name"><?= $model->user ?></div> | 11 | <div class="command-block-name"><?= $model->user ?></div> |
13 | - <div class="command-block-job"><?= $model->department->name ?></div> | 12 | + <?php |
13 | + if(!empty( $model->department->name )) { | ||
14 | + ?> | ||
15 | + <div class="command-block-job"><?= $model->department->name ?></div> | ||
16 | + <?php | ||
17 | + } | ||
18 | + ?> | ||
14 | <div class="command-block-line"> | 19 | <div class="command-block-line"> |
15 | <div class="command-block-line-left"></div> | 20 | <div class="command-block-line-left"></div> |
16 | <div class="command-block-line-right"></div> | 21 | <div class="command-block-line-right"></div> |
frontend/web/css/art_box.css
frontend/web/css/style.css
@@ -6595,40 +6595,4 @@ input[disabled], select[disabled] { | @@ -6595,40 +6595,4 @@ input[disabled], select[disabled] { | ||
6595 | width: 24px; | 6595 | width: 24px; |
6596 | height: 24px; | 6596 | height: 24px; |
6597 | background: transparent url('/images/loading-plugin-new.gif') center left no-repeat; | 6597 | background: transparent url('/images/loading-plugin-new.gif') center left no-repeat; |
6598 | -} | ||
6599 | - | ||
6600 | -/***/ | ||
6601 | -.sidebar-droped-wr ul li:first-child {display: none;} | ||
6602 | -.right_search_perform_foto-wr {width: 140px;height: 93px;float: left;margin-left: 16px;} | ||
6603 | -.right_search_perform_foto-wr>div{width: 140px;height: 93px; display: table-cell; vertical-align: middle; text-align: center} | ||
6604 | -.right_search_perform_foto-wr>div{max-width: 140px;max-height: 93px; vertical-align: middle} | ||
6605 | -.right_search_perform_block-wr a { | ||
6606 | - float: left; | ||
6607 | - margin-top: 12px; | ||
6608 | - margin-left: 0; | ||
6609 | -} | ||
6610 | -.right_search_perform_block-wr { | ||
6611 | - width: 220px; float: right; | ||
6612 | -} | ||
6613 | -.search_perform_txt-wr { | ||
6614 | - width: 480px;float: left; | ||
6615 | -} | ||
6616 | -.search_perform_title {line-height: 15px} | ||
6617 | -.search_perform_title, .search_perform_leng { | ||
6618 | - font-size: 18px; | ||
6619 | -} | ||
6620 | -.search_perform_leng {margin-top: -1px; margin-bottom: 18px; height: 20px} | ||
6621 | -.search_perform_leng div{height: 20px; line-height: 20px} | ||
6622 | -.search_perform_title, .search_perform_leng, .search_perform_visit, .search_perform_projets_nam, .search_perform-stars-wr { | ||
6623 | - width: 100%; | ||
6624 | - float: left; | ||
6625 | -} | ||
6626 | -.search_perform_visit, .search_perform_projets_nam a { | ||
6627 | - font-size: 13px; | ||
6628 | -} | ||
6629 | -.search_perform_visit span, .search_perform_projets_nam a {font-weight: 700} | ||
6630 | -.search_perform-stars-wr { | ||
6631 | - height: 34px; | ||
6632 | -} | ||
6633 | -.search_perform-stars-txt {line-height: 34px} | ||
6634 | -.search_perform_projets_nam {margin-top: 15px;} | ||
6635 | \ No newline at end of file | 6598 | \ No newline at end of file |
6599 | +} | ||
6636 | \ No newline at end of file | 6600 | \ No newline at end of file |
frontend/web/js/script.js
@@ -559,7 +559,6 @@ $(document).ready(function(){ | @@ -559,7 +559,6 @@ $(document).ready(function(){ | ||
559 | alert('fdg') | 559 | alert('fdg') |
560 | } | 560 | } |
561 | var txtMulti = $('.MultiFile-title').text() | 561 | var txtMulti = $('.MultiFile-title').text() |
562 | - console.log(txtMulti) | ||
563 | $('.tender-file-wr a').click(function(e){ | 562 | $('.tender-file-wr a').click(function(e){ |
564 | e.preventDefault() | 563 | e.preventDefault() |
565 | }) | 564 | }) |