Example #1
0
File: index.php Project: arsik/xfit
/* @var $searchModel app\models\OrderSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Заказы';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="order-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('Создать заказ', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'clubID', 'label' => 'Клуб', 'format' => 'text', 'content' => function ($data) {
    return $data->getClubsName();
}, 'filter' => \app\models\Order::getClubsList()], ['attribute' => 'managerID', 'label' => 'Менеджер', 'format' => 'text', 'content' => function ($data) {
    return $data->getManagersName();
}, 'filter' => \app\models\Order::getManagersList()], 'payTime', 'deliveryTime', 'createTime', 'fullCost', 'fio', 'senderPhone', 'geterPhone', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>