Beispiel #1
0
</h1>

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

    <p>
        <?php 
echo Html::a('增加套餐', ['itemcreate'], ['class' => 'btn btn-primary']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'options' => ['class' => 'table-responsive'], 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['attribute' => 'cid', 'value' => function ($model, $key, $index, $column) {
    return MItem::getItemCatName($model->cid);
}, 'filter' => MItem::getItemCatName()], 'pkg3g4g', 'monthprice', 'period', 'plan', 'pkg_price', 'prom_price', 'yck', 'income_return', 'month_return', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{pkgupdate} {pkgdelete}', 'buttons' => ['pkgupdate' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
}, 'pkgdelete' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this package?'), 'data-method' => 'post', 'data-pjax' => '0']);
}]]]]);
?>

</div>

<?php 
/*
//            'openid',    
//			'nickname',
//			'title',

    <p>
Beispiel #2
0
</h1>

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

    <p>
        <?php 
echo Html::a('增加商品', ['itemcreate'], ['class' => 'btn btn-primary']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'options' => ['class' => 'table-responsive'], 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['attribute' => 'cid', 'value' => function ($model, $key, $index, $column) {
    return MItem::getItemCatName($model->cid);
}, 'filter' => MItem::getItemCatName(), 'headerOptions' => array('style' => 'width:15%;')], 'quantity', 'old_price', 'price', ['attribute' => 'title'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{itemupdate} {itemdelete}', 'buttons' => ['itemupdate' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
}, 'itemdelete' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}]]]]);
?>

</div>

<?php 
/*
//            'openid',    
//			'nickname',
//			'title',

    <p>