<h4><?php echo Html::encode($this->title); ?> </h4> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <!-- <p> <//?= Html::a('Create Morder', ['create'], ['class' => 'btn btn-success']) ?> </p> --> <p> <?php echo Html::a('下载 <i class="glyphicon glyphicon-arrow-down"></i>', U::current(['download' => 1]), ['class' => 'btn btn-success', 'data-pjax' => '0']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'showOnEmpty' => false, 'tableOptions' => ['class' => 'table table-striped'], 'columns' => ['oid', 'title', ['visible' => $isAdmin, 'attribute' => 'username'], ['visible' => $isAdmin, 'attribute' => 'usermobile'], 'create_time', ['attribute' => 'status', 'label' => '订单状态', 'value' => function ($model, $key, $index, $column) { return MOrder::getStatusOption($model->status); }, 'filter' => MOrder::getStatusOption(), 'headerOptions' => array('style' => 'width:90px;')], ['class' => 'yii\\grid\\ActionColumn', 'headerOptions' => array('style' => 'width:90px;'), 'template' => $opt, 'buttons' => ['update' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']); }, 'delete' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', '确认要删除?'), 'data-method' => 'post', 'data-pjax' => '0']); }]]]]); ?> </div>