This commit is contained in:
2018-11-21 17:02:14 +03:00
parent 1e728726d0
commit 5a8b88b225
40 changed files with 1500 additions and 8 deletions

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>