Commit 03183eb3 by Скуратович Александр

страница списка свободных доменов

1 parent c1a617cb
<?php
namespace app\controllers;
use Yii;
use app\models\Host;
use app\models\HostSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* HostController implements the CRUD actions for Host model.
*/
class HostFreeController extends Controller
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Host models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new HostSearch(['wis_status' => 1]);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
}
<?php
use yii\jui\DatePicker;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel app\models\HostSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'List of domains';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="host-index">
<h1><?= Html::encode($this->title) ?></h1>
<!--p>
<?= Html::a('Create Host', ['create'], ['class' => 'btn btn-success']) ?>
</p-->
<?php Pjax::begin(); ?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'domain',
'wis_date',
'domain_expire',
],
]); ?>
<?php Pjax::end(); ?>
</div>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!