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)]); ?>
+ = $form->field($model, 'vc_text')->widget(EditorClassic::className(), [
+ 'clientOptions' => [
+ 'language' => 'ru',
+ ]
+ ]); ?>
+
+ = Html::submitButton(' Save', ['class' => 'btn btn-success']) ?>
+ = Html::a(' 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 = 'Профиль';
],
]); ?>
-
- = $form->field($model, 'vc_text')->widget(EditorClassic::className(), [
- 'clientOptions' => [
- 'language' => 'ru',
- ]
- ]); ?>
-
- = Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
-
-