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