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