Merge branch 'master' of https://github.com/apuc/guild
This commit is contained in:
		| @@ -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' => '<h3>Ваши личные данные не заненсены в базу.</h3>']); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Finds the Product model based on its primary key value. |      * Finds the Product model based on its primary key value. | ||||||
|      * If the model is not found, a 404 HTTP exception will be thrown. |      * If the model is not found, a 404 HTTP exception will be thrown. | ||||||
|   | |||||||
							
								
								
									
										27
									
								
								frontend/modules/card/views/user-card/resume.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								frontend/modules/card/views/user-card/resume.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | |||||||
|  | <?php | ||||||
|  |  | ||||||
|  | use asmoday74\ckeditor5\EditorClassic; | ||||||
|  | use yii\helpers\Html; | ||||||
|  | use yii\widgets\ActiveForm; | ||||||
|  | use yii\helpers\Url; | ||||||
|  |  | ||||||
|  | /* @var $this yii\web\View */ | ||||||
|  | /* @var $model */ | ||||||
|  |  | ||||||
|  | $this->title = 'Резюме'; | ||||||
|  | ?> | ||||||
|  | <div class="user-card-view"> | ||||||
|  |     <h1>Резюме</h1> | ||||||
|  |  | ||||||
|  |     <?php $form = ActiveForm::begin(['action' => Url::base(true)]); ?> | ||||||
|  |     <?= $form->field($model, 'vc_text')->widget(EditorClassic::className(), [ | ||||||
|  |         'clientOptions' => [ | ||||||
|  |             'language' => 'ru', | ||||||
|  |         ] | ||||||
|  |     ]); ?> | ||||||
|  |     <div class="form-group"> | ||||||
|  |         <?= Html::submitButton('<i class="fas fa-save"></i> Save', ['class' => 'btn btn-success']) ?> | ||||||
|  |         <?= Html::a('<i class="fas fa-long-arrow-alt-left"></i> Back', Url::base(true), ['class' => 'btn btn-primary', 'style' => 'float: right']) ?> | ||||||
|  |     </div> | ||||||
|  |     <?php $form = ActiveForm::end(); ?> | ||||||
|  | </div> | ||||||
| @@ -19,7 +19,8 @@ $this->title = 'Профиль'; | |||||||
|     <h3>Личная информация</h3> |     <h3>Личная информация</h3> | ||||||
|     <?php |     <?php | ||||||
|     echo Html::a('Изменить профиль', ['/card/user-card/update'], ['class' => 'btn btn-success']) |     echo Html::a('Изменить профиль', ['/card/user-card/update'], ['class' => 'btn btn-success']) | ||||||
|     . ' ' . Html::a('Изменить пароль', ['/card/user-card/password'], ['class' => 'btn btn-success']) . '<br><br>'; |     . ' ' . Html::a('Изменить пароль', ['/card/user-card/password'], ['class' => 'btn btn-success']) | ||||||
|  |     . ' ' . Html::a('Изменить резюме', ['/card/user-card/resume'], ['class' => 'btn btn-success']). '<br><br>'; | ||||||
|  |  | ||||||
|     echo  DetailView::widget([ |     echo  DetailView::widget([ | ||||||
|         'model' => $model, |         'model' => $model, | ||||||
| @@ -70,14 +71,4 @@ $this->title = 'Профиль'; | |||||||
|         ], |         ], | ||||||
|     ]); ?> |     ]); ?> | ||||||
|  |  | ||||||
|     <?php $form = ActiveForm::begin(); ?> |  | ||||||
|     <?= $form->field($model, 'vc_text')->widget(EditorClassic::className(), [ |  | ||||||
|         'clientOptions' => [ |  | ||||||
|             'language' => 'ru', |  | ||||||
|         ] |  | ||||||
|     ]); ?> |  | ||||||
|     <div class="form-group"> |  | ||||||
|         <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?> |  | ||||||
|     </div> |  | ||||||
|     <?php $form = ActiveForm::end(); ?> |  | ||||||
| </div> | </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 andrey
					andrey