From 5c80f72ee55f88f048fdad1cbad5c6e2919ff947 Mon Sep 17 00:00:00 2001 From: anatolidew Date: Fri, 10 Dec 2021 15:29:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BB=20=D1=80=D0=B5=D0=B7=D1=8E=D0=BC=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../card/controllers/UserCardController.php | 15 +++++++++++ .../modules/card/views/user-card/resume.php | 27 +++++++++++++++++++ .../modules/card/views/user-card/view.php | 13 ++------- 3 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 frontend/modules/card/views/user-card/resume.php diff --git a/frontend/modules/card/controllers/UserCardController.php b/frontend/modules/card/controllers/UserCardController.php index b22cf28..b031ba9 100755 --- a/frontend/modules/card/controllers/UserCardController.php +++ b/frontend/modules/card/controllers/UserCardController.php @@ -112,6 +112,21 @@ class UserCardController extends Controller ]); } + public function actionResume() + { + $id_user = Yii::$app->user->id; + $result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all(); + if ($result) { + $id = $result[0]['id']; + $model = $this->findModel($id); + return $this->render('resume', [ + 'model' => $model + ]); + } else { + return $this->render('index', ['info' => '

Ваши личные данные не заненсены в базу.

']); + } + } + /** * Finds the Product model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. diff --git a/frontend/modules/card/views/user-card/resume.php b/frontend/modules/card/views/user-card/resume.php new file mode 100644 index 0000000..8fa4a07 --- /dev/null +++ b/frontend/modules/card/views/user-card/resume.php @@ -0,0 +1,27 @@ +title = 'Резюме'; +?> +
+

Резюме

+ + Url::base(true)]); ?> + field($model, 'vc_text')->widget(EditorClassic::className(), [ + 'clientOptions' => [ + 'language' => 'ru', + ] + ]); ?> +
+ Save', ['class' => 'btn btn-success']) ?> + Back', Url::base(true), ['class' => 'btn btn-primary', 'style' => 'float: right']) ?> +
+ +
\ No newline at end of file diff --git a/frontend/modules/card/views/user-card/view.php b/frontend/modules/card/views/user-card/view.php index 80bb663..da695f0 100755 --- a/frontend/modules/card/views/user-card/view.php +++ b/frontend/modules/card/views/user-card/view.php @@ -19,7 +19,8 @@ $this->title = 'Профиль';

Личная информация

'btn btn-success']) - . ' ' . Html::a('Изменить пароль', ['/card/user-card/password'], ['class' => 'btn btn-success']) . '

'; + . ' ' . Html::a('Изменить пароль', ['/card/user-card/password'], ['class' => 'btn btn-success']) + . ' ' . Html::a('Изменить резюме', ['/card/user-card/resume'], ['class' => 'btn btn-success']). '

'; echo DetailView::widget([ 'model' => $model, @@ -70,14 +71,4 @@ $this->title = 'Профиль'; ], ]); ?> - - field($model, 'vc_text')->widget(EditorClassic::className(), [ - 'clientOptions' => [ - 'language' => 'ru', - ] - ]); ?> -
- 'btn btn-success']) ?> -
-