From eb780746965b2839ae33e928d4a664fd301d0f50 Mon Sep 17 00:00:00 2001 From: Yarik Date: Mon, 25 Apr 2016 16:04:05 +0300 Subject: [PATCH] test --- common/models/Job.php | 2 ++ console/migrations/m160425_121151_add_achievement_to_job.php | 25 +++++++++++++++++++++++++ console/migrations/m160425_130026_create_feedback.php | 35 +++++++++++++++++++++++++++++++++++ frontend/messages/ru/app.php | 1 + frontend/views/accounts/employment.php | 15 +++++++++++++++ 5 files changed, 78 insertions(+), 0 deletions(-) create mode 100644 console/migrations/m160425_121151_add_achievement_to_job.php create mode 100644 console/migrations/m160425_130026_create_feedback.php diff --git a/common/models/Job.php b/common/models/Job.php index a7b8814..9161796 100755 --- a/common/models/Job.php +++ b/common/models/Job.php @@ -78,6 +78,7 @@ 'name', 'link', 'position', + 'achievement', ], 'string', 'max' => 255, @@ -201,6 +202,7 @@ 'total_count' => Yii::t('app', 'total_count'), 'complete_count' => Yii::t('app', 'complete_count'), 'current' => Yii::t('app', 'current'), + 'achievement' => Yii::t('app', 'achievement'), ]; } } diff --git a/console/migrations/m160425_121151_add_achievement_to_job.php b/console/migrations/m160425_121151_add_achievement_to_job.php new file mode 100644 index 0000000..5b744d1 --- /dev/null +++ b/console/migrations/m160425_121151_add_achievement_to_job.php @@ -0,0 +1,25 @@ +addColumn('job', 'achievement', $this->string()); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropColumn('job', 'achievement'); + } +} diff --git a/console/migrations/m160425_130026_create_feedback.php b/console/migrations/m160425_130026_create_feedback.php new file mode 100644 index 0000000..12e9819 --- /dev/null +++ b/console/migrations/m160425_130026_create_feedback.php @@ -0,0 +1,35 @@ +createTable('feedback', [ + 'feedback_id' => $this->primaryKey(), + 'name' => $this->string() + ->notNull(), + 'phone' => $this->string(), + 'email' => $this->string(), + 'answer' => $this->string() + ->notNull(), + 'file' => $this->string(), + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('feedback'); + } + } diff --git a/frontend/messages/ru/app.php b/frontend/messages/ru/app.php index 97ff0b6..a4f98e8 100644 --- a/frontend/messages/ru/app.php +++ b/frontend/messages/ru/app.php @@ -171,4 +171,5 @@ 'Main project' => 'Основной заказ', 'Not found' => 'Ничего не найдено', 'Registration success' => 'Спасибо за Регистрацию! Будучи некоммерческой организацией, мы свободны в своём развитии и нам не нужно идти на компромиссы. Вам понравится это отличие.', + 'achievement' => 'Достижения', ]; \ No newline at end of file diff --git a/frontend/views/accounts/employment.php b/frontend/views/accounts/employment.php index 9e8f27f..720c2db 100755 --- a/frontend/views/accounts/employment.php +++ b/frontend/views/accounts/employment.php @@ -5,6 +5,7 @@ */ use common\models\Job; use common\models\UserInfo; + use mihaildev\ckeditor\CKEditor; use yii\helpers\Html; use yii\jui\DatePicker; use yii\widgets\ActiveForm; @@ -47,6 +48,13 @@
+ field($current, '[0]achievement') + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?> +
+
+ +
+
field($current, '[0]date_start', [ 'options' => [ 'class' => 'test2class' ] ]) ->label('Дата начала работы') ->widget(DatePicker::className(), [ @@ -164,6 +172,13 @@
+
+
+ field($job_model, '[' . ( $index + 1 ) . ']achievement') + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?> +
+
+
field($job_model, '[' . ( $index + 1 ) . ']total_count') -- libgit2 0.21.4