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 | 78 | 'name', |
| 79 | 79 | 'link', |
| 80 | 80 | 'position', |
| 81 | + 'achievement', | |
| 81 | 82 | ], |
| 82 | 83 | 'string', |
| 83 | 84 | 'max' => 255, |
| ... | ... | @@ -201,6 +202,7 @@ |
| 201 | 202 | 'total_count' => Yii::t('app', 'total_count'), |
| 202 | 203 | 'complete_count' => Yii::t('app', 'complete_count'), |
| 203 | 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 | 171 | 'Main project' => 'Основной заказ', |
| 172 | 172 | 'Not found' => 'Ничего не найдено', |
| 173 | 173 | 'Registration success' => 'Спасибо за Регистрацию! Будучи некоммерческой организацией, мы свободны в своём развитии и нам не нужно идти на компромиссы. Вам понравится это отличие.', |
| 174 | + 'achievement' => 'Достижения', | |
| 174 | 175 | ]; |
| 175 | 176 | \ No newline at end of file | ... | ... |
frontend/views/accounts/employment.php
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | */ |
| 6 | 6 | use common\models\Job; |
| 7 | 7 | use common\models\UserInfo; |
| 8 | + use mihaildev\ckeditor\CKEditor; | |
| 8 | 9 | use yii\helpers\Html; |
| 9 | 10 | use yii\jui\DatePicker; |
| 10 | 11 | use yii\widgets\ActiveForm; |
| ... | ... | @@ -47,6 +48,13 @@ |
| 47 | 48 | |
| 48 | 49 | <div class="input-blocks-wrapper"> |
| 49 | 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 | 58 | <?= $form->field($current, '[0]date_start', [ 'options' => [ 'class' => 'test2class' ] ]) |
| 51 | 59 | ->label('Дата начала работы') |
| 52 | 60 | ->widget(DatePicker::className(), [ |
| ... | ... | @@ -164,6 +172,13 @@ |
| 164 | 172 | </div> |
| 165 | 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 | 182 | <div class="input-blocks-wrapper admin-quantity-project"> |
| 168 | 183 | <div class="input-blocks"> |
| 169 | 184 | <?= $form->field($job_model, '[' . ( $index + 1 ) . ']total_count') | ... | ... |