Commit 484e91220b3ec4b4779c300f230f9bcc3aa37139
Merge remote-tracking branch 'origin/master'
Showing
18 changed files
with
889 additions
and
49 deletions
Show diff stats
common/config/main.php
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace common\models; | ||
| 4 | + | ||
| 5 | +use Yii; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * This is the model class for table "country". | ||
| 9 | + * | ||
| 10 | + * @property integer $country_id | ||
| 11 | + * @property integer $oid | ||
| 12 | + * @property string $country_name | ||
| 13 | + * @property string $country_name_en | ||
| 14 | + */ | ||
| 15 | +class Country extends \yii\db\ActiveRecord | ||
| 16 | +{ | ||
| 17 | + /** | ||
| 18 | + * @inheritdoc | ||
| 19 | + */ | ||
| 20 | + public static function tableName() | ||
| 21 | + { | ||
| 22 | + return 'country'; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * @inheritdoc | ||
| 27 | + */ | ||
| 28 | + public function rules() | ||
| 29 | + { | ||
| 30 | + return [ | ||
| 31 | + [['oid'], 'integer'], | ||
| 32 | + [['country_name', 'country_name_en'], 'string', 'max' => 255], | ||
| 33 | + ]; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * @inheritdoc | ||
| 38 | + */ | ||
| 39 | + public function attributeLabels() | ||
| 40 | + { | ||
| 41 | + return [ | ||
| 42 | + 'country_id' => Yii::t('app', 'Country ID'), | ||
| 43 | + 'oid' => Yii::t('app', 'Oid'), | ||
| 44 | + 'country_name' => Yii::t('app', 'Country Name'), | ||
| 45 | + 'country_name_en' => Yii::t('app', 'Country Name En'), | ||
| 46 | + ]; | ||
| 47 | + } | ||
| 48 | +} |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace common\models; | ||
| 4 | + | ||
| 5 | +use Yii; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * This is the model class for table "department". | ||
| 9 | + * | ||
| 10 | + * @property integer $department_id | ||
| 11 | + * @property string $name | ||
| 12 | + * | ||
| 13 | + * @property Team[] $teams | ||
| 14 | + */ | ||
| 15 | +class Department extends \yii\db\ActiveRecord | ||
| 16 | +{ | ||
| 17 | + /** | ||
| 18 | + * @inheritdoc | ||
| 19 | + */ | ||
| 20 | + public static function tableName() | ||
| 21 | + { | ||
| 22 | + return 'department'; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * @inheritdoc | ||
| 27 | + */ | ||
| 28 | + public function rules() | ||
| 29 | + { | ||
| 30 | + return [ | ||
| 31 | + [['name'], 'string', 'max' => 255], | ||
| 32 | + ]; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * @inheritdoc | ||
| 37 | + */ | ||
| 38 | + public function attributeLabels() | ||
| 39 | + { | ||
| 40 | + return [ | ||
| 41 | + 'department_id' => Yii::t('app', 'Department ID'), | ||
| 42 | + 'name' => Yii::t('app', 'Name'), | ||
| 43 | + ]; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * @return \yii\db\ActiveQuery | ||
| 48 | + */ | ||
| 49 | + public function getTeams() | ||
| 50 | + { | ||
| 51 | + return $this->hasMany(Team::className(), ['department_id' => 'department_id']); | ||
| 52 | + } | ||
| 53 | +} |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace common\models; | ||
| 4 | + | ||
| 5 | +use Yii; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * This is the model class for table "employment". | ||
| 9 | + * | ||
| 10 | + * @property integer $employment_id | ||
| 11 | + * @property string $name | ||
| 12 | + * | ||
| 13 | + * @property VacancyEmployment[] $vacancyEmployments | ||
| 14 | + */ | ||
| 15 | +class Employment extends \yii\db\ActiveRecord | ||
| 16 | +{ | ||
| 17 | + /** | ||
| 18 | + * @inheritdoc | ||
| 19 | + */ | ||
| 20 | + public static function tableName() | ||
| 21 | + { | ||
| 22 | + return 'employment'; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * @inheritdoc | ||
| 27 | + */ | ||
| 28 | + public function rules() | ||
| 29 | + { | ||
| 30 | + return [ | ||
| 31 | + [['name'], 'string', 'max' => 255], | ||
| 32 | + ]; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * @inheritdoc | ||
| 37 | + */ | ||
| 38 | + public function attributeLabels() | ||
| 39 | + { | ||
| 40 | + return [ | ||
| 41 | + 'employment_id' => Yii::t('app', 'Employment ID'), | ||
| 42 | + 'name' => Yii::t('app', 'Name'), | ||
| 43 | + ]; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * @return \yii\db\ActiveQuery | ||
| 48 | + */ | ||
| 49 | + public function getVacancyEmployments() | ||
| 50 | + { | ||
| 51 | + return $this->hasMany(VacancyEmployment::className(), ['employment_id' => 'employment_id']); | ||
| 52 | + } | ||
| 53 | +} |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | + namespace common\models; | ||
| 4 | + | ||
| 5 | + use Yii; | ||
| 6 | + use yii\behaviors\BlameableBehavior; | ||
| 7 | + use yii\behaviors\TimestampBehavior; | ||
| 8 | + use yii\db\Expression; | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * This is the model class for table "team". | ||
| 12 | + * @property integer $team_id | ||
| 13 | + * @property integer $user_id | ||
| 14 | + * @property string $firstname | ||
| 15 | + * @property string $lastname | ||
| 16 | + * @property string $midlename | ||
| 17 | + * @property string $link | ||
| 18 | + * @property string $position | ||
| 19 | + * @property integer $department_id | ||
| 20 | + * @property string $experience_from | ||
| 21 | + * @property string $date_add | ||
| 22 | + * @property integer $user_add_id | ||
| 23 | + * @property string $photo | ||
| 24 | + * @property string $country_id | ||
| 25 | + */ | ||
| 26 | + class Team extends \yii\db\ActiveRecord | ||
| 27 | + { | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * @inheritdoc | ||
| 31 | + */ | ||
| 32 | + public static function tableName() | ||
| 33 | + { | ||
| 34 | + return 'team'; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * @inheritdoc | ||
| 39 | + */ | ||
| 40 | + public function behaviors() | ||
| 41 | + { | ||
| 42 | + return [ | ||
| 43 | + [ | ||
| 44 | + 'class' => BlameableBehavior::className(), | ||
| 45 | + 'createdByAttribute' => 'user_id', | ||
| 46 | + 'updatedByAttribute' => false, | ||
| 47 | + ], | ||
| 48 | + [ | ||
| 49 | + 'class' => TimestampBehavior::className(), | ||
| 50 | + 'createdAtAttribute' => 'date_add', | ||
| 51 | + 'updatedAtAttribute' => false, | ||
| 52 | + 'value' => new Expression('NOW()'), | ||
| 53 | + ], | ||
| 54 | + ]; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * @inheritdoc | ||
| 59 | + */ | ||
| 60 | + public function rules() | ||
| 61 | + { | ||
| 62 | + return [ | ||
| 63 | + [ | ||
| 64 | + [ | ||
| 65 | + 'firstname', | ||
| 66 | + 'lastname', | ||
| 67 | + 'position', | ||
| 68 | + 'country_id', | ||
| 69 | + ], | ||
| 70 | + 'required', | ||
| 71 | + ], | ||
| 72 | + [ | ||
| 73 | + [ | ||
| 74 | + 'department_id', | ||
| 75 | + ], | ||
| 76 | + 'integer', | ||
| 77 | + ], | ||
| 78 | + [ | ||
| 79 | + [ | ||
| 80 | + 'experience_from', | ||
| 81 | + ], | ||
| 82 | + 'safe', | ||
| 83 | + ], | ||
| 84 | + [ | ||
| 85 | + [ | ||
| 86 | + 'firstname', | ||
| 87 | + 'lastname', | ||
| 88 | + 'midlename', | ||
| 89 | + 'link', | ||
| 90 | + 'position', | ||
| 91 | + 'photo', | ||
| 92 | + 'country_id', | ||
| 93 | + ], | ||
| 94 | + 'string', | ||
| 95 | + 'max' => 255, | ||
| 96 | + ], | ||
| 97 | + ]; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * @inheritdoc | ||
| 102 | + */ | ||
| 103 | + public function attributeLabels() | ||
| 104 | + { | ||
| 105 | + return [ | ||
| 106 | + 'team_id' => Yii::t('app', 'Team ID'), | ||
| 107 | + 'user_id' => Yii::t('app', 'User ID'), | ||
| 108 | + 'firstname' => Yii::t('app', 'Имя'), | ||
| 109 | + 'lastname' => Yii::t('app', 'Фамилия'), | ||
| 110 | + 'midlename' => Yii::t('app', 'Отчество'), | ||
| 111 | + 'link' => Yii::t('app', 'Ссылка на профиль МФП'), | ||
| 112 | + 'position' => Yii::t('app', 'Должность'), | ||
| 113 | + 'department_id' => Yii::t('app', 'Отдел компании'), | ||
| 114 | + 'experience_from' => Yii::t('app', 'Опыт'), | ||
| 115 | + 'date_add' => Yii::t('app', 'дата добавления'), | ||
| 116 | + 'user_add_id' => Yii::t('app', 'User Add ID'), | ||
| 117 | + 'photo' => Yii::t('app', 'Фото'), | ||
| 118 | + 'country_id' => Yii::t('app', 'Страна'), | ||
| 119 | + ]; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public function getDepartment() | ||
| 123 | + { | ||
| 124 | + return $this->hasOne(Department::className(), [ 'department_id' => 'department_id' ]); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + } |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | + namespace common\models; | ||
| 4 | + | ||
| 5 | + use Yii; | ||
| 6 | + use yii\behaviors\BlameableBehavior; | ||
| 7 | + use yii\behaviors\TimestampBehavior; | ||
| 8 | + use yii\db\Expression; | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * This is the model class for table "vacancy". | ||
| 12 | + * @property integer $vacancy_id | ||
| 13 | + * @property integer $user_id | ||
| 14 | + * @property string $name | ||
| 15 | + * @property string $link | ||
| 16 | + * @property string $date_add | ||
| 17 | + * @property integer $user_add_id | ||
| 18 | + * @property integer $view_count | ||
| 19 | + * @property string $user_name | ||
| 20 | + * @property string $city | ||
| 21 | + * @property string $description | ||
| 22 | + * @property Employment[] $employments | ||
| 23 | + * @property VacancyEmployment[] $vacancyEmployments | ||
| 24 | + */ | ||
| 25 | + class Vacancy extends \yii\db\ActiveRecord | ||
| 26 | + { | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * @inheritdoc | ||
| 30 | + */ | ||
| 31 | + public static function tableName() | ||
| 32 | + { | ||
| 33 | + return 'vacancy'; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * @inheritdoc | ||
| 38 | + */ | ||
| 39 | + public function behaviors() | ||
| 40 | + { | ||
| 41 | + return [ | ||
| 42 | + [ | ||
| 43 | + 'class' => BlameableBehavior::className(), | ||
| 44 | + 'createdByAttribute' => 'user_id', | ||
| 45 | + 'updatedByAttribute' => false, | ||
| 46 | + ], | ||
| 47 | + [ | ||
| 48 | + 'class' => TimestampBehavior::className(), | ||
| 49 | + 'createdAtAttribute' => 'date_add', | ||
| 50 | + 'updatedAtAttribute' => false, | ||
| 51 | + 'value' => new Expression('NOW()'), | ||
| 52 | + ], | ||
| 53 | + ]; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * @inheritdoc | ||
| 58 | + */ | ||
| 59 | + public function rules() | ||
| 60 | + { | ||
| 61 | + return [ | ||
| 62 | + [ | ||
| 63 | + [ 'name' ], | ||
| 64 | + 'required', | ||
| 65 | + ], | ||
| 66 | + [ | ||
| 67 | + [ 'description' ], | ||
| 68 | + 'string', | ||
| 69 | + ], | ||
| 70 | + [ | ||
| 71 | + ['employmentInput'], | ||
| 72 | + 'safe', | ||
| 73 | + ], | ||
| 74 | + [ | ||
| 75 | + [ | ||
| 76 | + 'name', | ||
| 77 | + 'link', | ||
| 78 | + 'user_name', | ||
| 79 | + 'city', | ||
| 80 | + ], | ||
| 81 | + 'string', | ||
| 82 | + 'max' => 255, | ||
| 83 | + ], | ||
| 84 | + ]; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * @inheritdoc | ||
| 89 | + */ | ||
| 90 | + public function attributeLabels() | ||
| 91 | + { | ||
| 92 | + return [ | ||
| 93 | + 'vacancy_id' => Yii::t('app', 'Vacancy ID'), | ||
| 94 | + 'user_id' => Yii::t('app', 'User ID'), | ||
| 95 | + 'name' => Yii::t('app', 'Название'), | ||
| 96 | + 'link' => Yii::t('app', 'URL'), | ||
| 97 | + 'date_add' => Yii::t('app', 'Дата добавления'), | ||
| 98 | + 'user_add_id' => Yii::t('app', 'User Add ID'), | ||
| 99 | + 'view_count' => Yii::t('app', 'Количество просмотров'), | ||
| 100 | + 'user_name' => Yii::t('app', 'Контактное лицо'), | ||
| 101 | + 'city' => Yii::t('app', 'Город'), | ||
| 102 | + 'description' => Yii::t('app', 'Описание'), | ||
| 103 | + 'employmentInput' => Yii::t('app', 'Вид занятости'), | ||
| 104 | + ]; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + /** | ||
| 108 | + * @return \yii\db\ActiveQuery | ||
| 109 | + */ | ||
| 110 | + public function getVacancyEmployments() | ||
| 111 | + { | ||
| 112 | + return $this->hasMany(VacancyEmployment::className(), [ 'vacancy_id' => 'vacancy_id' ]); | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public function getEmployments() | ||
| 116 | + { | ||
| 117 | + return $this->hasMany(Employment::className(), [ 'employment_id' => 'employment_id' ]) | ||
| 118 | + ->viaTable('vacancy_employment', [ 'vacancy_id' => 'vacancy_id' ]); | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public function getEmploymentInput() | ||
| 122 | + { | ||
| 123 | + return $this->getEmployments() | ||
| 124 | + ->asArray() | ||
| 125 | + ->column(); | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public function setEmploymentInput($value) | ||
| 129 | + { | ||
| 130 | + $this->employmentInput = $value; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + } |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace common\models; | ||
| 4 | + | ||
| 5 | +use Yii; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * This is the model class for table "vacancy_employment". | ||
| 9 | + * | ||
| 10 | + * @property integer $vacancy_employment | ||
| 11 | + * @property integer $vacancy_id | ||
| 12 | + * @property integer $employment_id | ||
| 13 | + * | ||
| 14 | + * @property Employment $employment | ||
| 15 | + * @property Vacancy $vacancy | ||
| 16 | + */ | ||
| 17 | +class VacancyEmployment extends \yii\db\ActiveRecord | ||
| 18 | +{ | ||
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 22 | + public static function tableName() | ||
| 23 | + { | ||
| 24 | + return 'vacancy_employment'; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * @inheritdoc | ||
| 29 | + */ | ||
| 30 | + public function rules() | ||
| 31 | + { | ||
| 32 | + return [ | ||
| 33 | + [['vacancy_id', 'employment_id'], 'integer'], | ||
| 34 | + [['employment_id'], 'exist', 'skipOnError' => true, 'targetClass' => Employment::className(), 'targetAttribute' => ['employment_id' => 'employment_id']], | ||
| 35 | + [['vacancy_id'], 'exist', 'skipOnError' => true, 'targetClass' => Vacancy::className(), 'targetAttribute' => ['vacancy_id' => 'vacancy_id']], | ||
| 36 | + ]; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * @inheritdoc | ||
| 41 | + */ | ||
| 42 | + public function attributeLabels() | ||
| 43 | + { | ||
| 44 | + return [ | ||
| 45 | + 'vacancy_employment' => Yii::t('app', 'Vacancy Employment'), | ||
| 46 | + 'vacancy_id' => Yii::t('app', 'Vacancy ID'), | ||
| 47 | + 'employment_id' => Yii::t('app', 'Employment ID'), | ||
| 48 | + ]; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * @return \yii\db\ActiveQuery | ||
| 53 | + */ | ||
| 54 | + public function getEmployment() | ||
| 55 | + { | ||
| 56 | + return $this->hasOne(Employment::className(), ['employment_id' => 'employment_id']); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * @return \yii\db\ActiveQuery | ||
| 61 | + */ | ||
| 62 | + public function getVacancy() | ||
| 63 | + { | ||
| 64 | + return $this->hasOne(Vacancy::className(), ['vacancy_id' => 'vacancy_id']); | ||
| 65 | + } | ||
| 66 | +} |
common/widgets/views/image_sizer.php
| @@ -53,6 +53,7 @@ $id = $model::tableName().'_id'; | @@ -53,6 +53,7 @@ $id = $model::tableName().'_id'; | ||
| 53 | var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); | 53 | var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); |
| 54 | block.find('img').remove(); | 54 | block.find('img').remove(); |
| 55 | block.append(img); | 55 | block.append(img); |
| 56 | + block.parents('.file-uploader-block').parent().addClass('success_download'); | ||
| 56 | $("#<?=$field?>_picture_link").val(data.result.link); | 57 | $("#<?=$field?>_picture_link").val(data.result.link); |
| 57 | $("#<?=$field?>_new_img").val(data.result.link); | 58 | $("#<?=$field?>_new_img").val(data.result.link); |
| 58 | } | 59 | } |
| @@ -70,6 +71,8 @@ $id = $model::tableName().'_id'; | @@ -70,6 +71,8 @@ $id = $model::tableName().'_id'; | ||
| 70 | }); | 71 | }); |
| 71 | 72 | ||
| 72 | $('body').on('click', '#<?=$field?>_remove_img',function(){ | 73 | $('body').on('click', '#<?=$field?>_remove_img',function(){ |
| 74 | + $("#<?= $field?>_img_block").parent().parent().parent().removeClass('success_download') | ||
| 75 | + | ||
| 73 | $("#<?=$field?>_buttons_block").remove(); | 76 | $("#<?=$field?>_buttons_block").remove(); |
| 74 | var old_url = $('#<?=$field?>_old_img').val(); | 77 | var old_url = $('#<?=$field?>_old_img').val(); |
| 75 | var new_url = $('#<?=$field?>_new_img').val(); | 78 | var new_url = $('#<?=$field?>_new_img').val(); |
console/migrations/m160208_101449_team.php
| @@ -13,7 +13,7 @@ class m160208_101449_team extends Migration | @@ -13,7 +13,7 @@ class m160208_101449_team extends Migration | ||
| 13 | 'user_id' => $this->integer()->notNull(), | 13 | 'user_id' => $this->integer()->notNull(), |
| 14 | 'firstname' => $this->string(255)->notNull(), | 14 | 'firstname' => $this->string(255)->notNull(), |
| 15 | 'lastname' => $this->string(255)->notNull(), | 15 | 'lastname' => $this->string(255)->notNull(), |
| 16 | - 'midlename' => $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()->notNull(), |
console/migrations/m160209_151553_employment_data.php
0 → 100644
| 1 | +<?php | ||
| 2 | + | ||
| 3 | + use yii\db\Migration; | ||
| 4 | + | ||
| 5 | + class m160209_151553_employment_data extends Migration | ||
| 6 | + { | ||
| 7 | + | ||
| 8 | + public function up() | ||
| 9 | + { | ||
| 10 | + $this->batchInsert('{{%employment}}', [ 'name' ], [ | ||
| 11 | + [ 'Проектная' ], | ||
| 12 | + [ 'Полная' ], | ||
| 13 | + [ 'Не полная' ], | ||
| 14 | + [ 'Удаленная' ], | ||
| 15 | + ]); | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public function down() | ||
| 19 | + { | ||
| 20 | + $this->delete('employment'); | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + /* | ||
| 24 | + // Use safeUp/safeDown to run migration code within a transaction | ||
| 25 | + public function safeUp() | ||
| 26 | + { | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public function safeDown() | ||
| 30 | + { | ||
| 31 | + } | ||
| 32 | + */ | ||
| 33 | + } |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +use yii\db\Migration; | ||
| 4 | + | ||
| 5 | +class m160210_085744_department extends Migration | ||
| 6 | +{ | ||
| 7 | + public function up() | ||
| 8 | + { | ||
| 9 | + $this->createTable('{{%department}}', ['department_id' => $this->primaryKey(), 'name' => $this->string()]); | ||
| 10 | + $this->addForeignKey('team_department_key', '{{%team}}', 'department_id', '{{%department}}', 'department_id'); | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + public function down() | ||
| 14 | + { | ||
| 15 | + $this->dropForeignKey('team_department_key', '{{%team}}'); | ||
| 16 | + $this->dropTable('{{%department}}'); | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | +} |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +use yii\db\Migration; | ||
| 4 | + | ||
| 5 | +class m160210_101931_country extends Migration | ||
| 6 | +{ | ||
| 7 | + public function up() | ||
| 8 | + { | ||
| 9 | + $this->createTable('{{%country}}', [ | ||
| 10 | + 'country_id' => $this->primaryKey(), | ||
| 11 | + 'oid' => $this->integer(), | ||
| 12 | + 'country_name' => $this->string(), | ||
| 13 | + 'country_name_en' => $this->string(), | ||
| 14 | + ]); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + public function down() | ||
| 18 | + { | ||
| 19 | + $this->dropTable('{{%country}}'); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | +} |
frontend/controllers/AccountsController.php
| @@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
| 3 | 3 | ||
| 4 | use common\models\Blog; | 4 | use common\models\Blog; |
| 5 | use common\models\CompanyInfo; | 5 | use common\models\CompanyInfo; |
| 6 | + use common\models\Country; | ||
| 7 | + use common\models\Department; | ||
| 6 | use common\models\Employment; | 8 | use common\models\Employment; |
| 7 | use common\models\Fields; | 9 | use common\models\Fields; |
| 8 | use common\models\Gallery; | 10 | use common\models\Gallery; |
| @@ -13,6 +15,7 @@ | @@ -13,6 +15,7 @@ | ||
| 13 | use common\models\PortfolioSpecialization; | 15 | use common\models\PortfolioSpecialization; |
| 14 | use common\models\Project; | 16 | use common\models\Project; |
| 15 | use common\models\Specialization; | 17 | use common\models\Specialization; |
| 18 | + use common\models\Team; | ||
| 16 | use common\models\UserPayment; | 19 | use common\models\UserPayment; |
| 17 | use common\models\UserSpecialization; | 20 | use common\models\UserSpecialization; |
| 18 | use common\models\Vacancy; | 21 | use common\models\Vacancy; |
| @@ -531,7 +534,7 @@ | @@ -531,7 +534,7 @@ | ||
| 531 | $user = \Yii::$app->user->identity; | 534 | $user = \Yii::$app->user->identity; |
| 532 | $post = \Yii::$app->request->post(); | 535 | $post = \Yii::$app->request->post(); |
| 533 | if($gallery->load($post) && $gallery->save()) { | 536 | if($gallery->load($post) && $gallery->save()) { |
| 534 | - Fields::saveFieldData(Yii::$app->request->post('Fields'), \Yii::$app->user->identity->id, User::className(), 'ru'); | 537 | + Fields::saveFieldData(Yii::$app->request->post('Fields'), $gallery->gallery_id, Gallery::className(), 'ru'); |
| 535 | return $this->redirect([ | 538 | return $this->redirect([ |
| 536 | 'gallery-update', | 539 | 'gallery-update', |
| 537 | 'id' => $gallery->gallery_id, | 540 | 'id' => $gallery->gallery_id, |
| @@ -563,6 +566,73 @@ | @@ -563,6 +566,73 @@ | ||
| 563 | } | 566 | } |
| 564 | } | 567 | } |
| 565 | 568 | ||
| 569 | + public function actionTeam() | ||
| 570 | + { | ||
| 571 | + return $this->render('team'); | ||
| 572 | + } | ||
| 573 | + | ||
| 574 | + public function actionTeamCreate() | ||
| 575 | + { | ||
| 576 | + $team = new Team(); | ||
| 577 | + $department = Department::find() | ||
| 578 | + ->select([ | ||
| 579 | + 'name', | ||
| 580 | + 'department_id', | ||
| 581 | + ]) | ||
| 582 | + ->indexBy('department_id') | ||
| 583 | + ->asArray() | ||
| 584 | + ->column(); | ||
| 585 | + $country = Country::find() | ||
| 586 | + ->select([ 'country_name' ]) | ||
| 587 | + ->indexBy('country_name') | ||
| 588 | + ->asArray() | ||
| 589 | + ->column(); | ||
| 590 | + $post = \Yii::$app->request->post(); | ||
| 591 | + if($team->load($post) && $team->save()) { | ||
| 592 | + return $this->redirect([ | ||
| 593 | + 'team-update', | ||
| 594 | + 'id' => $team->team_id, | ||
| 595 | + ]); | ||
| 596 | + } else { | ||
| 597 | + return $this->render('_team_form', [ | ||
| 598 | + 'team' => $team, | ||
| 599 | + 'department' => $department, | ||
| 600 | + 'country' => $country, | ||
| 601 | + ]); | ||
| 602 | + } | ||
| 603 | + } | ||
| 604 | + | ||
| 605 | + public function actionTeamUpdate($id) | ||
| 606 | + { | ||
| 607 | + $team = Team::findOne($id); | ||
| 608 | + $department = Department::find() | ||
| 609 | + ->select([ | ||
| 610 | + 'name', | ||
| 611 | + 'department_id', | ||
| 612 | + ]) | ||
| 613 | + ->indexBy('department_id') | ||
| 614 | + ->asArray() | ||
| 615 | + ->column(); | ||
| 616 | + $country = Country::find() | ||
| 617 | + ->select([ 'country_name' ]) | ||
| 618 | + ->indexBy('country_name') | ||
| 619 | + ->asArray() | ||
| 620 | + ->column(); | ||
| 621 | + $post = \Yii::$app->request->post(); | ||
| 622 | + if($team->load($post) && $team->save()) { | ||
| 623 | + return $this->redirect([ | ||
| 624 | + 'team-update', | ||
| 625 | + 'id' => $team->team_id, | ||
| 626 | + ]); | ||
| 627 | + } else { | ||
| 628 | + return $this->render('_team_form', [ | ||
| 629 | + 'team' => $team, | ||
| 630 | + 'department' => $department, | ||
| 631 | + 'country' => $country, | ||
| 632 | + ]); | ||
| 633 | + } | ||
| 634 | + } | ||
| 635 | + | ||
| 566 | public function actionVacancy() | 636 | public function actionVacancy() |
| 567 | { | 637 | { |
| 568 | $this->render('vacancy'); | 638 | $this->render('vacancy'); |
| @@ -580,7 +650,7 @@ | @@ -580,7 +650,7 @@ | ||
| 580 | ->asArray() | 650 | ->asArray() |
| 581 | ->column(); | 651 | ->column(); |
| 582 | $post = \Yii::$app->request->post(); | 652 | $post = \Yii::$app->request->post(); |
| 583 | - if(!empty($post)) { | 653 | + if(!empty( $post )) { |
| 584 | $vacancy->load($post); | 654 | $vacancy->load($post); |
| 585 | $vacancy->validate(); | 655 | $vacancy->validate(); |
| 586 | if(!$vacancy->hasErrors()) { | 656 | if(!$vacancy->hasErrors()) { |
| @@ -590,11 +660,14 @@ | @@ -590,11 +660,14 @@ | ||
| 590 | foreach($vacancy->employmentInput as $one_employment) { | 660 | foreach($vacancy->employmentInput as $one_employment) { |
| 591 | $vacancy->link('employments', Employment::findOne($one_employment)); | 661 | $vacancy->link('employments', Employment::findOne($one_employment)); |
| 592 | } | 662 | } |
| 593 | - return $this->redirect(['vacancy-update', 'id' => $vacancy->vacancy_id]); | 663 | + return $this->redirect([ |
| 664 | + 'vacancy-update', | ||
| 665 | + 'id' => $vacancy->vacancy_id, | ||
| 666 | + ]); | ||
| 594 | } | 667 | } |
| 595 | } | 668 | } |
| 596 | return $this->render('_vacancy_form', [ | 669 | return $this->render('_vacancy_form', [ |
| 597 | - 'vacancy' => $vacancy, | 670 | + 'vacancy' => $vacancy, |
| 598 | 'employment' => $employment, | 671 | 'employment' => $employment, |
| 599 | ]); | 672 | ]); |
| 600 | } | 673 | } |
| @@ -611,7 +684,7 @@ | @@ -611,7 +684,7 @@ | ||
| 611 | ->asArray() | 684 | ->asArray() |
| 612 | ->column(); | 685 | ->column(); |
| 613 | $post = \Yii::$app->request->post(); | 686 | $post = \Yii::$app->request->post(); |
| 614 | - if(!empty($post)) { | 687 | + if(!empty( $post )) { |
| 615 | $vacancy->load($post); | 688 | $vacancy->load($post); |
| 616 | $vacancy->validate(); | 689 | $vacancy->validate(); |
| 617 | if(!$vacancy->hasErrors()) { | 690 | if(!$vacancy->hasErrors()) { |
| @@ -621,11 +694,14 @@ | @@ -621,11 +694,14 @@ | ||
| 621 | foreach($vacancy->employmentInput as $one_employment) { | 694 | foreach($vacancy->employmentInput as $one_employment) { |
| 622 | $vacancy->link('employments', Employment::findOne($one_employment)); | 695 | $vacancy->link('employments', Employment::findOne($one_employment)); |
| 623 | } | 696 | } |
| 624 | - return $this->redirect(['vacancy-update', 'id' => $vacancy->vacancy_id]); | 697 | + return $this->redirect([ |
| 698 | + 'vacancy-update', | ||
| 699 | + 'id' => $vacancy->vacancy_id, | ||
| 700 | + ]); | ||
| 625 | } | 701 | } |
| 626 | } | 702 | } |
| 627 | return $this->render('_vacancy_form', [ | 703 | return $this->render('_vacancy_form', [ |
| 628 | - 'vacancy' => $vacancy, | 704 | + 'vacancy' => $vacancy, |
| 629 | 'employment' => $employment, | 705 | 'employment' => $employment, |
| 630 | ]); | 706 | ]); |
| 631 | } | 707 | } |
frontend/views/accounts/_blog_form.php
| @@ -8,24 +8,40 @@ | @@ -8,24 +8,40 @@ | ||
| 8 | use yii\helpers\Html; | 8 | use yii\helpers\Html; |
| 9 | use yii\widgets\ActiveForm; | 9 | use yii\widgets\ActiveForm; |
| 10 | 10 | ||
| 11 | - $this->title = 'Мой профиль'; | 11 | + $this->title = 'Блог'; |
| 12 | $this->params[ 'breadcrumbs' ][] = $this->title; | 12 | $this->params[ 'breadcrumbs' ][] = $this->title; |
| 13 | ?> | 13 | ?> |
| 14 | -<h1><?= $this->title ?></h1> | 14 | +<div class="login-left-column-title"><?= $this->title ?></div> |
| 15 | 15 | ||
| 16 | <?php | 16 | <?php |
| 17 | $form = ActiveForm::begin(); | 17 | $form = ActiveForm::begin(); |
| 18 | ?> | 18 | ?> |
| 19 | 19 | ||
| 20 | -<?= $blog->date_add ?> | 20 | +<div class="input-blocks-wrapper full-blocks data-block"> |
| 21 | + <?= !empty($blog->date_add)? "Дата создания: $blog->date_add" :""?> | ||
| 22 | +</div> | ||
| 23 | +<div class="style"> | ||
| 24 | + <div class="input-blocks-wrapper full-blocks"> | ||
| 25 | + <div class="input-blocks"> | ||
| 26 | + <?= $form->field($blog, 'name') | ||
| 27 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
| 28 | + </div> | ||
| 29 | + </div> | ||
| 30 | + <div class="input-blocks-wrapper full-blocks"> | ||
| 31 | + <div class="input-blocks"> | ||
| 32 | + <?= $form->field($blog, 'link') | ||
| 33 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
| 34 | + </div> | ||
| 35 | + </div> | ||
| 21 | 36 | ||
| 22 | -<?= $form->field($blog, 'name') | ||
| 23 | - ->textInput() ?> | 37 | + <div class="input-blocks-wrapper full-blocks admin-editor-bl"> |
| 38 | + <div class="input-blocks"> | ||
| 39 | + <?= $form->field($blog, 'description')->widget(CKEditor::className()) ?> | ||
| 40 | + </div> | ||
| 41 | + </div> | ||
| 24 | 42 | ||
| 25 | -<?= $form->field($blog, 'link') | ||
| 26 | - ->textInput() ?> | 43 | +</div> |
| 27 | 44 | ||
| 28 | -<?= $form->field($blog, 'description')->widget(CKEditor::className()) ?> | ||
| 29 | 45 | ||
| 30 | <?php /* | 46 | <?php /* |
| 31 | <?= ImageUploader::widget([ | 47 | <?= ImageUploader::widget([ |
| @@ -39,8 +55,13 @@ | @@ -39,8 +55,13 @@ | ||
| 39 | ]); | 55 | ]); |
| 40 | ?> | 56 | ?> |
| 41 | */ ?> | 57 | */ ?> |
| 58 | +<div class="input-blocks-wrapper full-blocks"> | ||
| 59 | + <div class="admin-save-btn style"> | ||
| 60 | + <?= Html::submitButton('Добавить', ['class' => 'input-blocks-wrapper button']) ?> | ||
| 61 | + <?= Html::submitButton('Удалить', ['class' => ' remove input-blocks-wrapper button']) ?> | ||
| 62 | + </div> | ||
| 63 | +</div> | ||
| 42 | 64 | ||
| 43 | -<?= Html::submitButton('Добавить') ?> | ||
| 44 | 65 | ||
| 45 | <?php | 66 | <?php |
| 46 | $form->end(); | 67 | $form->end(); |
frontend/views/accounts/_gallery_form.php
| @@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
| 53 | 53 | ||
| 54 | <?= FieldEditor::widget ( | 54 | <?= FieldEditor::widget ( |
| 55 | [ | 55 | [ |
| 56 | - 'template' => 'youtube', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | 56 | + 'template' => 'youtube', 'item_id' => $gallery->gallery_id, 'model' => 'common\models\Gallery', 'language' => 'ru', |
| 57 | ] | 57 | ] |
| 58 | ); ?> | 58 | ); ?> |
| 59 | 59 |
frontend/views/accounts/_portfolio_form.php
| @@ -9,50 +9,117 @@ | @@ -9,50 +9,117 @@ | ||
| 9 | use yii\helpers\Html; | 9 | use yii\helpers\Html; |
| 10 | use yii\widgets\ActiveForm; | 10 | use yii\widgets\ActiveForm; |
| 11 | use \common\widgets\MultiLangForm; | 11 | use \common\widgets\MultiLangForm; |
| 12 | +use kartik\select2\Select2; | ||
| 13 | +use yii\web\JsExpression; | ||
| 12 | 14 | ||
| 13 | - $this->title = 'Мой профиль'; | 15 | + $this->title = 'Портфолио'; |
| 14 | $this->params[ 'breadcrumbs' ][] = $this->title; | 16 | $this->params[ 'breadcrumbs' ][] = $this->title; |
| 15 | ?> | 17 | ?> |
| 16 | -<h1><?= $this->title ?></h1> | 18 | +<div class="login-left-column-title"><?= $this->title ?></div> |
| 17 | 19 | ||
| 18 | <?php | 20 | <?php |
| 19 | $form = ActiveForm::begin(); | 21 | $form = ActiveForm::begin(); |
| 20 | ?> | 22 | ?> |
| 23 | +<div class="input-blocks-wrapper full-blocks data-block"> | ||
| 24 | + <?= !empty($portfolio->date_add) ? "Дата создания: $portfolio->date_add" :""?> | ||
| 21 | 25 | ||
| 22 | -<?= $form->field($portfolio, 'date_add') | ||
| 23 | - ->textInput([ 'disabled' => 'disabled' ]) ?> | ||
| 24 | - | ||
| 25 | -<?= $form->field($portfolio, 'name') | ||
| 26 | - ->textInput() ?> | 26 | +</div> |
| 27 | +<div class="style"> | ||
| 27 | 28 | ||
| 28 | -<?= $form->field($portfolio, 'link') | ||
| 29 | - ->textInput() ?> | 29 | + <div class="input-blocks-wrapper"> |
| 30 | + <div class="input-blocks"> | ||
| 31 | + <?= $form->field($portfolio, 'name') | ||
| 32 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
| 33 | + </div> | ||
| 34 | + </div> | ||
| 30 | 35 | ||
| 31 | -<?= $form->field($portfolio, 'specializationInput') | ||
| 32 | - ->checkboxList($specialization) ?> | 36 | + <div class="input-blocks-wrapper"> |
| 37 | + <div class="input-blocks"> | ||
| 38 | + <?= $form->field($portfolio, 'link') | ||
| 39 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
| 40 | + </div> | ||
| 41 | + </div> | ||
| 33 | 42 | ||
| 34 | -<?= ImageUploader::widget([ | ||
| 35 | - 'model'=> $portfolio, | ||
| 36 | - 'field'=>'cover', | ||
| 37 | - 'width'=>100, | ||
| 38 | - 'height'=>100, | ||
| 39 | - 'multi'=>false, | ||
| 40 | - 'gallery' =>$portfolio->cover, | ||
| 41 | - 'name' => 'Загрузить главное фото' | ||
| 42 | -]); | ||
| 43 | -?> | ||
| 44 | 43 | ||
| 45 | -<div class="form-inline"> | ||
| 46 | - Адрес: | ||
| 47 | - <?= $form->field($portfolio, 'city', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | ||
| 48 | - <?= $form->field($portfolio, 'street', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | ||
| 49 | - <?= $form->field($portfolio, 'house', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | 44 | +<div class="input-blocks-wrapper"> |
| 45 | + <?= $form->field($portfolio, 'specializationInput') | ||
| 46 | + ->checkboxList($specialization) ?> | ||
| 50 | </div> | 47 | </div> |
| 51 | 48 | ||
| 52 | -<?= $form->field($portfolio, 'description')->widget(CKEditor::className()) ?> | ||
| 53 | 49 | ||
| 54 | -<?= Html::submitButton('Добавить') ?> | ||
| 55 | 50 | ||
| 51 | + <div class="input-blocks-wrapper admin-avatar portfolio-foto-admin hidden-foto foto-portfolio-adm"> | ||
| 52 | + <div class="gen-admin-title">Фото главное</div> | ||
| 53 | + <div class="not-file-txt-adm">Файл не выбран</div> | ||
| 54 | + <?= ImageUploader::widget([ | ||
| 55 | + 'model'=> $portfolio, | ||
| 56 | + 'field'=>'cover', | ||
| 57 | + 'width'=>100, | ||
| 58 | + 'height'=>100, | ||
| 59 | + 'multi'=>false, | ||
| 60 | + 'gallery' =>$portfolio->cover, | ||
| 61 | + 'name' => 'Загрузить' | ||
| 62 | + ]); | ||
| 63 | + ?> | ||
| 64 | + <div class="not-file-mb-adm">До 3 Мб файл</div> | ||
| 65 | + </div> | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + | ||
| 70 | + <div class="input-blocks-wrapper"> | ||
| 71 | + <div class="input-blocks"> | ||
| 72 | + <?= | ||
| 73 | + $form->field($portfolio, 'city')->widget(Select2::classname(), [ | ||
| 74 | + 'options' => ['placeholder' => 'Выбор города ...'], | ||
| 75 | + 'pluginOptions' => [ | ||
| 76 | + 'allowClear' => true, | ||
| 77 | + 'minimumInputLength' => 3, | ||
| 78 | + 'ajax' => [ | ||
| 79 | + 'url' => \yii\helpers\Url::to(['site/city']), | ||
| 80 | + 'dataType' => 'json', | ||
| 81 | + 'data' => new JsExpression('function(params) { return {q:params.term}; }') | ||
| 82 | + ], | ||
| 83 | + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
| 84 | + 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
| 85 | + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
| 86 | + ], | ||
| 87 | + ]); | ||
| 88 | + ?> | ||
| 89 | + | ||
| 90 | + </div> | ||
| 91 | + | ||
| 92 | + <div class="input-blocks street-input"> | ||
| 93 | + <?= $form->field ($portfolio, 'street', ['options' => ['class' => 'form-group company_info']]) | ||
| 94 | + ->label ('Улица') | ||
| 95 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 96 | + ?> | ||
| 97 | + </div> | ||
| 98 | + | ||
| 99 | + <div class="input-blocks home-input"> | ||
| 100 | + <?= $form->field ($portfolio, 'house', ['options' => ['class' => 'form-group company_info']]) | ||
| 101 | + ->label ('Дом') | ||
| 102 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 103 | + ?> | ||
| 104 | + </div> | ||
| 105 | + </div> | ||
| 106 | + | ||
| 107 | + | ||
| 108 | + | ||
| 109 | + <div class="input-blocks-wrapper full-blocks admin-editor-bl"> | ||
| 110 | + <div class="input-blocks"> | ||
| 111 | + <?= $form->field($portfolio, 'description')->widget(CKEditor::className()) ?> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + | ||
| 115 | +</div> | ||
| 116 | + | ||
| 117 | +<div class="input-blocks-wrapper full-blocks"> | ||
| 118 | + <div class="admin-save-btn style"> | ||
| 119 | + <?= Html::submitButton('Добавить', ['class' => 'input-blocks-wrapper button']) ?> | ||
| 120 | + <?= Html::submitButton('Удалить', ['class' => ' remove input-blocks-wrapper button']) ?> | ||
| 121 | + </div> | ||
| 122 | +</div> | ||
| 56 | <?php | 123 | <?php |
| 57 | $form->end(); | 124 | $form->end(); |
| 58 | ?> | 125 | ?> |
| 1 | +<?php | ||
| 2 | + /** | ||
| 3 | + * @var Team $team | ||
| 4 | + * @var string[] $department | ||
| 5 | + * @var string[] $country | ||
| 6 | + */ | ||
| 7 | + use common\models\Team; | ||
| 8 | + use common\widgets\ImageUploader; | ||
| 9 | + use mihaildev\ckeditor\CKEditor; | ||
| 10 | + use yii\helpers\Html; | ||
| 11 | + use yii\jui\DatePicker; | ||
| 12 | + use yii\widgets\ActiveForm; | ||
| 13 | + | ||
| 14 | + $this->title = 'Мой профиль'; | ||
| 15 | + $this->params[ 'breadcrumbs' ][] = $this->title; | ||
| 16 | +?> | ||
| 17 | +<h1><?= $this->title ?></h1> | ||
| 18 | + | ||
| 19 | +<?php | ||
| 20 | + $form = ActiveForm::begin(); | ||
| 21 | +?> | ||
| 22 | + | ||
| 23 | +<?= $form->field($team, 'lastname') | ||
| 24 | + ->textInput() ?> | ||
| 25 | + | ||
| 26 | +<?= $form->field($team, 'firstname') | ||
| 27 | + ->textInput() ?> | ||
| 28 | + | ||
| 29 | +<?= $form->field($team, 'middlename') | ||
| 30 | + ->textInput() ?> | ||
| 31 | + | ||
| 32 | +<?= $form->field($team, 'link') | ||
| 33 | + ->textInput() ?> | ||
| 34 | + | ||
| 35 | +<?= $form->field($team, 'position') | ||
| 36 | + ->textInput() ?> | ||
| 37 | + | ||
| 38 | +<?= $form->field($team, 'department_id') | ||
| 39 | + ->dropDownList($department) ?> | ||
| 40 | + | ||
| 41 | +<?= $form->field($team, 'experience_from', [ 'template' => "{label}, с {input} года \n{hint}\n{error}" ]) | ||
| 42 | + ->input('number') ?> | ||
| 43 | + | ||
| 44 | +<?= $form->field($team, 'country_id') | ||
| 45 | + ->dropDownList($country) ?> | ||
| 46 | + | ||
| 47 | +<?= ImageUploader::widget([ | ||
| 48 | + 'model' => $team, | ||
| 49 | + 'field' => 'photo', | ||
| 50 | + 'width' => 100, | ||
| 51 | + 'height' => 100, | ||
| 52 | + 'multi' => false, | ||
| 53 | + 'gallery' => $team->photo, | ||
| 54 | + 'name' => 'Загрузить фото', | ||
| 55 | +]); ?> | ||
| 56 | + | ||
| 57 | +<?= Html::submitButton('Добавить') ?> | ||
| 58 | + | ||
| 59 | +<?php | ||
| 60 | + $form->end(); | ||
| 61 | +?> |
frontend/web/css/style.css
| @@ -4544,6 +4544,8 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4544,6 +4544,8 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
| 4544 | .input-blocks-wrapper { | 4544 | .input-blocks-wrapper { |
| 4545 | width: 100%;float: left;margin-top: 11px; position: relative; | 4545 | width: 100%;float: left;margin-top: 11px; position: relative; |
| 4546 | } | 4546 | } |
| 4547 | +.input-blocks-wrapper.full-blocks {} | ||
| 4548 | +.input-blocks-wrapper.full-blocks .input-blocks{width: 100%} | ||
| 4547 | .input-blocks-wrapper:first-child{margin-top: 0} | 4549 | .input-blocks-wrapper:first-child{margin-top: 0} |
| 4548 | .input-blocks { | 4550 | .input-blocks { |
| 4549 | width: 300px; | 4551 | width: 300px; |
| @@ -4562,7 +4564,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4562,7 +4564,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
| 4562 | padding-left: 8px; | 4564 | padding-left: 8px; |
| 4563 | margin-top: 5px; | 4565 | margin-top: 5px; |
| 4564 | } | 4566 | } |
| 4565 | - | 4567 | +.custom-input-2.fix-input-2 {width: 100%} |
| 4566 | .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} | 4568 | .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} |
| 4567 | 4569 | ||
| 4568 | .input-blocks label { | 4570 | .input-blocks label { |
| @@ -4922,6 +4924,11 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | @@ -4922,6 +4924,11 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | ||
| 4922 | padding: 15px 0; | 4924 | padding: 15px 0; |
| 4923 | display: none; | 4925 | display: none; |
| 4924 | } | 4926 | } |
| 4927 | +.input-blocks-wrapper.full-blocks .help-block{ | ||
| 4928 | + margin: 25px auto 0 auto; | ||
| 4929 | + width: 430px; | ||
| 4930 | +} | ||
| 4931 | + | ||
| 4925 | .input-blocks-wrapper.captcha-wr .help-block {float: left} | 4932 | .input-blocks-wrapper.captcha-wr .help-block {float: left} |
| 4926 | .has-error .help-block {display: block ;color: inherit} | 4933 | .has-error .help-block {display: block ;color: inherit} |
| 4927 | .help-block:before { | 4934 | .help-block:before { |
| @@ -5355,4 +5362,55 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5355,4 +5362,55 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
| 5355 | .header-cabinet-profile.not-login > div {width: 116px; float: right} | 5362 | .header-cabinet-profile.not-login > div {width: 116px; float: right} |
| 5356 | .admin-avatar .file-uploader-block {width: 180px; float: left} | 5363 | .admin-avatar .file-uploader-block {width: 180px; float: left} |
| 5357 | .admin-pattern.admin-avatar .file-uploader-block {width: 100%} | 5364 | .admin-pattern.admin-avatar .file-uploader-block {width: 100%} |
| 5358 | -.file-help-1 {width: 520px; float: right;height: 130px} | ||
| 5359 | \ No newline at end of file | 5365 | \ No newline at end of file |
| 5366 | +.file-help-1 {width: 520px; float: right;height: 130px} | ||
| 5367 | +.admin-editor-bl label{ | ||
| 5368 | + margin-bottom: 5px; | ||
| 5369 | +} | ||
| 5370 | +.admin-editor-bl .cke_top { | ||
| 5371 | + background-image: none; | ||
| 5372 | + background: #dcdcdc !important; | ||
| 5373 | + padding-top: 9px; | ||
| 5374 | +} | ||
| 5375 | +.admin-editor-bl .cke_bottom { | ||
| 5376 | + background-image: none; | ||
| 5377 | + background: #dcdcdc !important; | ||
| 5378 | +} | ||
| 5379 | +.remove.input-blocks-wrapper button {margin-left: 10px} | ||
| 5380 | +.data-block {font-size: 13px; color: #b7b7b7; text-align: right} | ||
| 5381 | +.hidden-foto .file-uploader-block, .hidden-foto .tst, .hidden-foto .admin-avatar-pattern-wr {width: 100%} | ||
| 5382 | +.hidden-foto .tst {height: auto} | ||
| 5383 | +.hidden-foto .admin-avatar-pattern {width: 100%; height: auto; background: none} | ||
| 5384 | +.hidden-foto .tst .admin-ava-wr{display: none} | ||
| 5385 | + | ||
| 5386 | +.not-file-txt-adm { | ||
| 5387 | + width: 100px; | ||
| 5388 | + float: left; | ||
| 5389 | + height: 29px; | ||
| 5390 | + line-height: 29px; | ||
| 5391 | + font-size: 13px; | ||
| 5392 | + overflow: hidden; | ||
| 5393 | + white-space: nowrap; | ||
| 5394 | +} | ||
| 5395 | + | ||
| 5396 | +.foto-portfolio-adm {position: relative} | ||
| 5397 | +.foto-portfolio-adm .file-uploader-block { | ||
| 5398 | + width: 620px; | ||
| 5399 | + height: 29px; | ||
| 5400 | +} | ||
| 5401 | +.foto-portfolio-adm .btn {margin-top: 0; margin-left: 8px} | ||
| 5402 | +.foto-portfolio-adm .tst { | ||
| 5403 | + float: right; | ||
| 5404 | + width: 452px; | ||
| 5405 | + height: 29px; | ||
| 5406 | +} | ||
| 5407 | +.not-file-mb-adm { | ||
| 5408 | + font-size: 13px; | ||
| 5409 | + color: #b7b7b7; | ||
| 5410 | + float: left; | ||
| 5411 | + height: 29px; | ||
| 5412 | + line-height: 29px; | ||
| 5413 | + position: absolute; | ||
| 5414 | + top: 25px; | ||
| 5415 | + left: 288px; | ||
| 5416 | +} | ||
| 5417 | +.success_download .not-file-mb-adm{display: none} | ||
| 5360 | \ No newline at end of file | 5418 | \ No newline at end of file |