D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
epaji.com
/
public_html
/
hindiusa
/
views
/
events
/
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\EventsSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Events'); $this->params['breadcrumbs'][] = $this->title; ?> <?= $this->render('@app/views/common/_dashboard-sidebar') ?> <div class="events-index product-content"> <h1><?= Html::encode($this->title) ?></h1> <p> <?= Html::a(Yii::t('app', 'Create Events'), ['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' => 'event_type_id', 'value' => 'eventType.name', ], 'title', // 'summary', //'description:ntext', //'start_date', //'start_time', //'end_date', //'end_time', //'seat', //'venue', [ '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]; }, ], //'created', ['class' => 'yii\grid\ActionColumn'], ], ]); ?> <?php Pjax::end(); ?> </div>