fix project
This commit is contained in:
parent
25e922cd37
commit
553e3b885e
@ -58,14 +58,18 @@ class ProjectController extends Controller
|
|||||||
public function actionView($id)
|
public function actionView($id)
|
||||||
{
|
{
|
||||||
$model = $this->findModel($id);
|
$model = $this->findModel($id);
|
||||||
$hh = Hh::findOne($model->hh_id);
|
|
||||||
|
|
||||||
|
$jobsProvider = null;
|
||||||
|
if($model->hh_id){
|
||||||
|
$hh = Hh::findOne($model->hh_id);
|
||||||
$jobsProvider = new ActiveDataProvider([
|
$jobsProvider = new ActiveDataProvider([
|
||||||
'query' => HhJob::find()->where(['employer_id' => $hh->hh_id]),
|
'query' => HhJob::find()->where(['employer_id' => $hh->hh_id]),
|
||||||
'pagination' => [
|
'pagination' => [
|
||||||
'pageSize' => 200,
|
'pageSize' => 200,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$dataProvider = new ActiveDataProvider([
|
$dataProvider = new ActiveDataProvider([
|
||||||
'query' => FieldsValue::find()->where(['project_id' => $id])->orderBy('order'),
|
'query' => FieldsValue::find()->where(['project_id' => $id])->orderBy('order'),
|
||||||
|
@ -81,6 +81,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
],
|
],
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
|
<?php if ($jobsProvider): ?>
|
||||||
<h2>Вакансии hh.ru</h2>
|
<h2>Вакансии hh.ru</h2>
|
||||||
<?= GridView::widget([
|
<?= GridView::widget([
|
||||||
'dataProvider' => $jobsProvider,
|
'dataProvider' => $jobsProvider,
|
||||||
@ -101,4 +102,5 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
]); ?>
|
]); ?>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user