示例#1
0
文件: index.php 项目: v3toys/skeeks
 * @link http://skeeks.com/
 * @copyright 2010 SkeekS (СкикС)
 * @date 02.06.2015
 */
/* @var $this yii\web\View */
/* @var $searchModel \skeeks\cms\models\Search */
/* @var $dataProvider yii\data\ActiveDataProvider */
$pjax = \skeeks\cms\modules\admin\widgets\Pjax::begin();
?>

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

    <?php 
echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'autoColumns' => false, 'pjax' => $pjax, 'adminController' => $controller, 'columns' => ['id', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['attribute' => 'user_id', 'class' => \skeeks\cms\grid\UserColumnData::className()], 'name', 'phone', 'email', ['attribute' => 'shipping_method', 'filter' => \v3toys\skeeks\models\V3toysOrder::getShippingMethods(), 'value' => function (\v3toys\skeeks\models\V3toysOrder $v3toysOrder) {
    return $v3toysOrder->deliveryName;
}], 'v3toys_order_id', ['attribute' => 'v3toys_status_id', 'filter' => \yii\helpers\ArrayHelper::map(\v3toys\skeeks\models\V3toysOrderStatus::find()->all(), 'v3toys_id', 'name'), 'value' => function (\v3toys\skeeks\models\V3toysOrder $v3toysOrder) {
    return $v3toysOrder->v3toys_status_id ? $v3toysOrder->status->name : null;
}], ['label' => 'К оплате', 'value' => function (\v3toys\skeeks\models\V3toysOrder $v3toysOrder) {
    return \Yii::$app->money->convertAndFormat($v3toysOrder->money);
}], ['label' => 'Скидка', 'value' => function (\v3toys\skeeks\models\V3toysOrder $v3toysOrder) {
    return \Yii::$app->money->convertAndFormat($v3toysOrder->moneyDiscount);
}], ['label' => 'Доставка', 'value' => function (\v3toys\skeeks\models\V3toysOrder $v3toysOrder) {
    return \Yii::$app->money->convertAndFormat($v3toysOrder->moneyDelivery);
}]]]);
?>

    <?php 
if ($dataProvider->query->count()) {
    ?>
示例#2
0
文件: _form.php 项目: v3toys/skeeks
<?php

use yii\helpers\Html;
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm;
use skeeks\cms\models\Tree;
/* @var $this yii\web\View */
/* @var $model \skeeks\cms\models\CmsLang */
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'shipping_type')->listBox(\v3toys\skeeks\models\V3toysOrder::getShippingMethods(), ['size' => 1]);
?>

    <?php 
echo $form->field($model, 'name')->textInput();
?>
    <?php 
echo $form->field($model, 'price');
?>

    <?php 
echo $form->field($model, 'description')->textarea();
?>

    <?php 
echo $form->buttonsStandart($model);
?>

<?php 
ActiveForm::end();
示例#3
0
文件: index.php 项目: v3toys/skeeks
/* @var $searchModel \skeeks\cms\models\Search */
/* @var $dataProvider yii\data\ActiveDataProvider */
$pjax = \yii\widgets\Pjax::begin();
?>

    <?php 
/*echo $this->render('@skeeks/cms/views/admin-cms-content-element/_search', [
      'searchModel' => $searchModel,
      'dataProvider' => $dataProvider,
      'content_id' => $content_id,
      'cmsContent' => $cmsContent,
  ]); */
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'autoColumns' => false, 'pjax' => $pjax, 'adminController' => $controller, 'columns' => ['id', 'name', 'price', ['filter' => \v3toys\skeeks\models\V3toysOrder::getShippingMethods(), 'attribute' => 'shipping_type', 'value' => function (\v3toys\skeeks\models\V3toysShippingCity $v3toysShippingCity) {
    return $v3toysShippingCity->shippingTypeName;
}]]]);
?>

<?php 
$pjax::end();
?>

<?php 
\yii\bootstrap\Alert::begin(['options' => ['class' => 'alert-info']]);
?>
    <b>php yii v3toys/init/shipping-city</b> - используйте эту комманду для импорта статусов из api
<?php 
\yii\bootstrap\Alert::end();
?>