hh fix, profile fix
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace backend\modules\project\controllers;
|
||||
|
||||
use common\models\FieldsValue;
|
||||
use common\models\Hh;
|
||||
use common\models\HhJob;
|
||||
use common\models\ProjectUser;
|
||||
use Yii;
|
||||
use backend\modules\project\models\Project;
|
||||
@ -55,6 +57,16 @@ class ProjectController extends Controller
|
||||
*/
|
||||
public function actionView($id)
|
||||
{
|
||||
$model = $this->findModel($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'),
|
||||
'pagination' => [
|
||||
@ -70,9 +82,10 @@ class ProjectController extends Controller
|
||||
]);
|
||||
|
||||
return $this->render('view', [
|
||||
'model' => $this->findModel($id),
|
||||
'model' => $model,
|
||||
'modelFildValue' => $dataProvider,
|
||||
'modelUser' => $dataProviderUser,
|
||||
'jobsProvider' => $jobsProvider,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attributes' => [
|
||||
'id',
|
||||
'name',
|
||||
[
|
||||
'label' => 'Сраница на hh.ru',
|
||||
'attribute' => 'hh.url'
|
||||
],
|
||||
'description:ntext',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
@ -76,4 +80,25 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
<h2>Вакансии hh.ru</h2>
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $jobsProvider,
|
||||
'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