fix project
This commit is contained in:
parent
25e922cd37
commit
553e3b885e
@ -58,14 +58,18 @@ class ProjectController extends Controller
|
||||
public function actionView($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([
|
||||
'query' => HhJob::find()->where(['employer_id' => $hh->hh_id]),
|
||||
'pagination' => [
|
||||
'pageSize' => 200,
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
$dataProvider = new ActiveDataProvider([
|
||||
'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>
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $jobsProvider,
|
||||
@ -101,4 +102,5 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user