Exemplo n.º 1
0
    <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>
Exemplo n.º 2
0
    <//?= $form->field($model, 'oid')->textInput(['maxlength' => true]) ?>
    -->

    <!--
    <//?= $form->field($model, 'feesum')->textInput() ?>

    <//?= $form->field($model, 'create_time')->textInput() ?>
    -->

    <!--
    <//?= $form->field($model, 'status')->textInput() ?>
    -->


    <?php 
echo $form->field($model, 'status')->dropDownList(MOrder::getStatusOption());
?>

    <!--
    <//?= $form->field($model, 'goods_id')->textInput() ?>

    <//?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <//?= $form->field($model, 'userid')->textInput() ?>

    <//?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?>

    <//?= $form->field($model, 'usermobile')->textInput(['maxlength' => true]) ?>

    <//?= $form->field($model, 'address')->textInput(['maxlength' => true]) ?>