D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
epaji.com
/
public_html
/
hindiusa
/
views
/
blogs
/
Filename :
index.php
back
Copy
<?php use yii\helpers\Html; use yii\grid\GridView; use yii\widgets\Pjax; /* @var $this yii\web\View */ /* @var $searchModel app\models\BlogsSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Blogs'); $this->params['breadcrumbs'][] = $this->title; ?> <?= $this->render('@app/views/common/_dashboard-sidebar') ?> <div class="blogs-index product-content"> <h1><?= Html::encode($this->title) ?></h1> <p> <?= Html::a(Yii::t('app', 'Create Blogs'), ['create'], ['class' => 'btn btn-success']) ?> </p> <p><strong>NOTE:</strong> For filter by status 0 => Inactive, 1 => Active</p> <?php Pjax::begin(); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'id', [ 'attribute' => 'school_id', 'value' => 'school.name', ], [ 'attribute' => 'user_id', 'value' => 'user.firstname', ], [ 'attribute' => 'blog_category_id', 'value' => 'blogCategory.name', ], 'title', [ 'attribute' => 'status', 'value'=>function($model){ return Yii::$app->params['status'][$model->status]; }, ], [ 'attribute' => 'display_status', 'value'=>function($model){ return Yii::$app->params['display-status'][$model->display_status]; }, ], //'description:ntext', //'thumb_image', //'meta_title', //'meta_description', //'status', //'created', ['class' => 'yii\grid\ActionColumn'], ], ]); ?> <?php Pjax::end(); ?> </div>