hh fix, profile fix
This commit is contained in:
@ -8,6 +8,7 @@ use common\models\HhJob;
|
||||
use Yii;
|
||||
use backend\modules\hh\models\Hh;
|
||||
use backend\modules\hh\models\HhSearch;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
@ -55,8 +56,17 @@ class HhController extends Controller
|
||||
*/
|
||||
public function actionView($id)
|
||||
{
|
||||
$model = $this->findModel($id);
|
||||
$jobs = new ActiveDataProvider([
|
||||
'query' => HhJob::find()->where(['employer_id' => $model->hh_id]),
|
||||
'pagination' => [
|
||||
'pageSize' => 200,
|
||||
],
|
||||
]);
|
||||
|
||||
return $this->render('view', [
|
||||
'model' => $this->findModel($id),
|
||||
'model' => $model,
|
||||
'jobs' => $jobs,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
@ -36,5 +37,26 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'photo:image',
|
||||
],
|
||||
]) ?>
|
||||
<br>
|
||||
<h2>Вакансии</h2>
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $jobs,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
'title',
|
||||
'url:url',
|
||||
'salary_from',
|
||||
'salary_to',
|
||||
'salary_currency',
|
||||
'address',
|
||||
'dt_add:date',
|
||||
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {delete}'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user