hh
This commit is contained in:
12
backend/modules/hh/views/default/index.php
Normal file
12
backend/modules/hh/views/default/index.php
Normal file
@ -0,0 +1,12 @@
|
||||
<div class="hh-default-index">
|
||||
<h1><?= $this->context->action->uniqueId ?></h1>
|
||||
<p>
|
||||
This is the view content for action "<?= $this->context->action->id ?>".
|
||||
The action belongs to the controller "<?= get_class($this->context) ?>"
|
||||
in the "<?= $this->context->module->id ?>" module.
|
||||
</p>
|
||||
<p>
|
||||
You may customize this page by editing the following file:<br>
|
||||
<code><?= __FILE__ ?></code>
|
||||
</p>
|
||||
</div>
|
39
backend/modules/hh/views/hh-job/_form.php
Normal file
39
backend/modules/hh/views/hh-job/_form.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhJob */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="hh-job-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'employer_id')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'hh_id')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'salary_from')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'salary_to')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'salary_currency')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'address')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'dt_add')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
45
backend/modules/hh/views/hh-job/_search.php
Normal file
45
backend/modules/hh/views/hh-job/_search.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhJobSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="hh-job-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id') ?>
|
||||
|
||||
<?= $form->field($model, 'employer_id') ?>
|
||||
|
||||
<?= $form->field($model, 'hh_id') ?>
|
||||
|
||||
<?= $form->field($model, 'title') ?>
|
||||
|
||||
<?= $form->field($model, 'url') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'salary_from') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'salary_to') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'salary_currency') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'address') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'dt_add') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
21
backend/modules/hh/views/hh-job/create.php
Normal file
21
backend/modules/hh/views/hh-job/create.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhJob */
|
||||
|
||||
$this->title = 'Create Hh Job';
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Hh Jobs', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="hh-job-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
55
backend/modules/hh/views/hh-job/index.php
Normal file
55
backend/modules/hh/views/hh-job/index.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\modules\hh\models\HhJobSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
/* @var $hhCompanies array */
|
||||
|
||||
$this->title = 'Вакансии';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="hh-job-index">
|
||||
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
//'id',
|
||||
[
|
||||
'attribute' => 'employer_id',
|
||||
'value' => function ($model) {
|
||||
return isset($model->hhcompany->title) ? $model->hhcompany->title : '';
|
||||
},
|
||||
'filter' => kartik\select2\Select2::widget([
|
||||
'model' => $searchModel,
|
||||
'attribute' => 'employer_id',
|
||||
'data' => $hhCompanies,
|
||||
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
|
||||
'pluginOptions' => [
|
||||
'allowClear' => true
|
||||
],
|
||||
]),
|
||||
],
|
||||
//'hh_id',
|
||||
'title',
|
||||
'url:url',
|
||||
'salary_from',
|
||||
'salary_to',
|
||||
'salary_currency',
|
||||
'address',
|
||||
'dt_add:date',
|
||||
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {delete}'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
</div>
|
21
backend/modules/hh/views/hh-job/update.php
Normal file
21
backend/modules/hh/views/hh-job/update.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhJob */
|
||||
|
||||
$this->title = 'Update Hh Job: ' . $model->title;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Hh Jobs', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
|
||||
$this->params['breadcrumbs'][] = 'Update';
|
||||
?>
|
||||
<div class="hh-job-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
44
backend/modules/hh/views/hh-job/view.php
Normal file
44
backend/modules/hh/views/hh-job/view.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhJob */
|
||||
|
||||
$this->title = $model->title;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Hh Jobs', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="hh-job-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => 'Are you sure you want to delete this item?',
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id',
|
||||
'employer_id',
|
||||
'hh_id',
|
||||
'title',
|
||||
'url:url',
|
||||
'salary_from',
|
||||
'salary_to',
|
||||
'salary_currency',
|
||||
'address',
|
||||
'dt_add',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
23
backend/modules/hh/views/hh/_form.php
Normal file
23
backend/modules/hh/views/hh/_form.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\Hh */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="hh-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
37
backend/modules/hh/views/hh/_search.php
Normal file
37
backend/modules/hh/views/hh/_search.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\HhSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="hh-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id') ?>
|
||||
|
||||
<?= $form->field($model, 'hh_id') ?>
|
||||
|
||||
<?= $form->field($model, 'url') ?>
|
||||
|
||||
<?= $form->field($model, 'title') ?>
|
||||
|
||||
<?= $form->field($model, 'dt_add') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'photo') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
19
backend/modules/hh/views/hh/create.php
Normal file
19
backend/modules/hh/views/hh/create.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\Hh */
|
||||
|
||||
$this->title = 'Добавить';
|
||||
$this->params['breadcrumbs'][] = ['label' => 'hh.ru', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="hh-create">
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
52
backend/modules/hh/views/hh/index.php
Normal file
52
backend/modules/hh/views/hh/index.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\modules\hh\models\HhSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = 'hh.ru';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="hh-index">
|
||||
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
//'id',
|
||||
//'hh_id',
|
||||
'url:url',
|
||||
'title',
|
||||
'dt_add:date',
|
||||
'photo:image',
|
||||
[
|
||||
'class' => 'yii\grid\DataColumn',
|
||||
'format' => 'raw',
|
||||
'value' => function ($model) {
|
||||
return Html::a('Получить вакансии', \yii\helpers\Url::to([
|
||||
'/hh/hh/get-jobs',
|
||||
'id' => $model->id
|
||||
]), [
|
||||
'class' => 'btn btn-success'
|
||||
]);
|
||||
},
|
||||
],
|
||||
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {delete}'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
</div>
|
21
backend/modules/hh/views/hh/update.php
Normal file
21
backend/modules/hh/views/hh/update.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\Hh */
|
||||
|
||||
$this->title = 'Редактировать: ' . $model->title;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'hh.ru', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
|
||||
$this->params['breadcrumbs'][] = 'Редактировать';
|
||||
?>
|
||||
<div class="hh-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
39
backend/modules/hh/views/hh/view.php
Normal file
39
backend/modules/hh/views/hh/view.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\hh\models\Hh */
|
||||
|
||||
$this->title = $model->title;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'hh.ru', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
//\common\classes\Debug::dd(\common\hhapi\core\service\HHService::run()->company($model->hh_id)->get())
|
||||
?>
|
||||
<div class="hh-view">
|
||||
|
||||
<p>
|
||||
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => 'Are you sure you want to delete this item?',
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'title',
|
||||
'hh_id',
|
||||
'url:url',
|
||||
'dt_add:date',
|
||||
'photo:image',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user