Commit eb780746965b2839ae33e928d4a664fd301d0f50
1 parent
8f5d4d0f
test
Showing
5 changed files
with
78 additions
and
0 deletions
Show diff stats
common/models/Job.php
@@ -78,6 +78,7 @@ | @@ -78,6 +78,7 @@ | ||
78 | 'name', | 78 | 'name', |
79 | 'link', | 79 | 'link', |
80 | 'position', | 80 | 'position', |
81 | + 'achievement', | ||
81 | ], | 82 | ], |
82 | 'string', | 83 | 'string', |
83 | 'max' => 255, | 84 | 'max' => 255, |
@@ -201,6 +202,7 @@ | @@ -201,6 +202,7 @@ | ||
201 | 'total_count' => Yii::t('app', 'total_count'), | 202 | 'total_count' => Yii::t('app', 'total_count'), |
202 | 'complete_count' => Yii::t('app', 'complete_count'), | 203 | 'complete_count' => Yii::t('app', 'complete_count'), |
203 | 'current' => Yii::t('app', 'current'), | 204 | 'current' => Yii::t('app', 'current'), |
205 | + 'achievement' => Yii::t('app', 'achievement'), | ||
204 | ]; | 206 | ]; |
205 | } | 207 | } |
206 | } | 208 | } |
console/migrations/m160425_121151_add_achievement_to_job.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +/** | ||
6 | + * Handles adding achievement to table `job`. | ||
7 | + */ | ||
8 | +class m160425_121151_add_achievement_to_job extends Migration | ||
9 | +{ | ||
10 | + /** | ||
11 | + * @inheritdoc | ||
12 | + */ | ||
13 | + public function up() | ||
14 | + { | ||
15 | + $this->addColumn('job', 'achievement', $this->string()); | ||
16 | + } | ||
17 | + | ||
18 | + /** | ||
19 | + * @inheritdoc | ||
20 | + */ | ||
21 | + public function down() | ||
22 | + { | ||
23 | + $this->dropColumn('job', 'achievement'); | ||
24 | + } | ||
25 | +} |
console/migrations/m160425_130026_create_feedback.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + use yii\db\Migration; | ||
4 | + | ||
5 | + /** | ||
6 | + * Handles the creation for table `feedback`. | ||
7 | + */ | ||
8 | + class m160425_130026_create_feedback extends Migration | ||
9 | + { | ||
10 | + | ||
11 | + /** | ||
12 | + * @inheritdoc | ||
13 | + */ | ||
14 | + public function up() | ||
15 | + { | ||
16 | + $this->createTable('feedback', [ | ||
17 | + 'feedback_id' => $this->primaryKey(), | ||
18 | + 'name' => $this->string() | ||
19 | + ->notNull(), | ||
20 | + 'phone' => $this->string(), | ||
21 | + 'email' => $this->string(), | ||
22 | + 'answer' => $this->string() | ||
23 | + ->notNull(), | ||
24 | + 'file' => $this->string(), | ||
25 | + ]); | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * @inheritdoc | ||
30 | + */ | ||
31 | + public function down() | ||
32 | + { | ||
33 | + $this->dropTable('feedback'); | ||
34 | + } | ||
35 | + } |
frontend/messages/ru/app.php
@@ -171,4 +171,5 @@ | @@ -171,4 +171,5 @@ | ||
171 | 'Main project' => 'Основной заказ', | 171 | 'Main project' => 'Основной заказ', |
172 | 'Not found' => 'Ничего не найдено', | 172 | 'Not found' => 'Ничего не найдено', |
173 | 'Registration success' => 'Спасибо за Регистрацию! Будучи некоммерческой организацией, мы свободны в своём развитии и нам не нужно идти на компромиссы. Вам понравится это отличие.', | 173 | 'Registration success' => 'Спасибо за Регистрацию! Будучи некоммерческой организацией, мы свободны в своём развитии и нам не нужно идти на компромиссы. Вам понравится это отличие.', |
174 | + 'achievement' => 'Достижения', | ||
174 | ]; | 175 | ]; |
175 | \ No newline at end of file | 176 | \ No newline at end of file |
frontend/views/accounts/employment.php
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | */ | 5 | */ |
6 | use common\models\Job; | 6 | use common\models\Job; |
7 | use common\models\UserInfo; | 7 | use common\models\UserInfo; |
8 | + use mihaildev\ckeditor\CKEditor; | ||
8 | use yii\helpers\Html; | 9 | use yii\helpers\Html; |
9 | use yii\jui\DatePicker; | 10 | use yii\jui\DatePicker; |
10 | use yii\widgets\ActiveForm; | 11 | use yii\widgets\ActiveForm; |
@@ -47,6 +48,13 @@ | @@ -47,6 +48,13 @@ | ||
47 | 48 | ||
48 | <div class="input-blocks-wrapper"> | 49 | <div class="input-blocks-wrapper"> |
49 | <div class="input-blocks"> | 50 | <div class="input-blocks"> |
51 | + <?= $form->field($current, '[0]achievement') | ||
52 | + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?> | ||
53 | + </div> | ||
54 | + </div> | ||
55 | + | ||
56 | + <div class="input-blocks-wrapper"> | ||
57 | + <div class="input-blocks"> | ||
50 | <?= $form->field($current, '[0]date_start', [ 'options' => [ 'class' => 'test2class' ] ]) | 58 | <?= $form->field($current, '[0]date_start', [ 'options' => [ 'class' => 'test2class' ] ]) |
51 | ->label('Дата начала работы') | 59 | ->label('Дата начала работы') |
52 | ->widget(DatePicker::className(), [ | 60 | ->widget(DatePicker::className(), [ |
@@ -164,6 +172,13 @@ | @@ -164,6 +172,13 @@ | ||
164 | </div> | 172 | </div> |
165 | </div> | 173 | </div> |
166 | 174 | ||
175 | + <div class="input-blocks-wrapper"> | ||
176 | + <div class="input-blocks"> | ||
177 | + <?= $form->field($job_model, '[' . ( $index + 1 ) . ']achievement') | ||
178 | + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?> | ||
179 | + </div> | ||
180 | + </div> | ||
181 | + | ||
167 | <div class="input-blocks-wrapper admin-quantity-project"> | 182 | <div class="input-blocks-wrapper admin-quantity-project"> |
168 | <div class="input-blocks"> | 183 | <div class="input-blocks"> |
169 | <?= $form->field($job_model, '[' . ( $index + 1 ) . ']total_count') | 184 | <?= $form->field($job_model, '[' . ( $index + 1 ) . ']total_count') |