Commit 3117c2e0 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавили manage

parent 4e22b63f
<?php
/**
* Created by PhpStorm.
* User: PHOENIX
* Date: 25.04.16
* Time: 21:26
*/
namespace common\modules\blog\controllers;
use common\components\AdminController;
use common\modules\blog\models\BlogBids;
use yii\data\ActiveDataProvider;
class BidAdminController extends AdminController {
public static function actionsTitles(){
return [
'Manage' => 'Управление подписками',
'Create' => 'Добавление подписки',
'Update' => 'Редактирование подписки',
'View' => 'Просмотр подписки',
'Delete' => 'Удаление подписки',
];
}
/**
* Lists all Bid models.
* @return mixed
*/
public function actionManage()
{
$dataProvider = new ActiveDataProvider([
'query' => BlogBids::find()
]);
return $this->render(
'manage',
[
'dataProvider' => $dataProvider
]
);
}
}
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
?>
<div class="blog-bid-index">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Добавить подписку', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'email',
'date:datetime',
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}{update}{delete}',
],
],
]); ?>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment