Exemplo n.º 1
0
?>

        <?php 
echo \yii\widgets\DetailView::widget(['model' => $model, 'template' => "<tr><th style='width: 50%; text-align: right;'>{label}</th><td>{value}</td></tr>", 'attributes' => [['label' => \skeeks\cms\shop\Module::t('app', 'Delivery service'), 'format' => 'raw', 'value' => $model->delivery->name], ['label' => 'Разрешить доставку', 'format' => 'raw', 'value' => $form->fieldRadioListBoolean($model, 'allow_delivery')->label(false)]]]);
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => 'Комментарий']);
?>
    <?php 
echo \yii\widgets\DetailView::widget(['model' => $model, 'template' => "<tr><th style='width: 50%; text-align: right;'>{label}</th><td>{value}</td></tr>", 'attributes' => [['label' => \skeeks\cms\shop\Module::t('app', 'Comment'), 'format' => 'raw', 'value' => $form->field($model, 'comments')->textarea(['rows' => 5])->hint(\skeeks\cms\shop\Module::t('app', 'Internal comment, the customer (buyer) does not see'))->label(false)]]]);
?>


    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'The composition of the order')]);
?>

        <?php 
echo \skeeks\cms\modules\admin\widgets\GridView::widget(['dataProvider' => new \yii\data\ArrayDataProvider(['models' => $model->shopBaskets]), 'layout' => "{items}\n{pager}", 'columns' => [['class' => \yii\grid\SerialColumn::className()], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'name', 'format' => 'raw', 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) {
    $widget = new \skeeks\cms\modules\admin\widgets\AdminImagePreviewWidget(['image' => $shopBasket->product->cmsContentElement->image]);
    return $widget->run();
}], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'name', 'format' => 'raw', 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) {
    if ($shopBasket->product) {
        return Html::a($shopBasket->name, $shopBasket->product->cmsContentElement->url, ['target' => '_blank', 'titla' => "Смотреть на сайте", 'data-pjax' => 0]);
    } else {
        return $shopBasket->name;
    }
}], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'quantity', 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) {
    return $shopBasket->quantity . " " . $shopBasket->measure_name;
}], ['class' => \yii\grid\DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Price'), 'attribute' => 'price', 'format' => 'raw', 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) {
Exemplo n.º 2
0
    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'code')->textInput();
?>


    <?php 
echo $form->field($model, 'component')->listBox(array_merge(['' => ' — '], \Yii::$app->cms->relatedHandlersDataForSelect), ['size' => 1, 'data-form-reload' => 'true'])->label(\Yii::t('skeeks/cms', "Property type"));
?>

    <? if ($handler) : ?>
        <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/cms', 'Settings')]);
?>
            <? if($handler instanceof \skeeks\cms\relatedProperties\propertyTypes\PropertyTypeList) : ?>
                <? $handler->enumRoute = 'cms/admin-cms-tree-type-property-enum'; ?>
            <? endif; ?>
            <?php 
echo $handler->renderConfigForm($form);
?>
    <? endif; ?>


<?php 
echo $form->fieldSetEnd();
?>

<?php 
Exemplo n.º 3
0
            <?php 
echo $form->field($model, 'phone')->textInput(['placeholder' => '+7 903 722-28-73']);
?>
            <? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
                <?php 
echo $form->field($model, 'phone_is_approved')->checkbox(\Yii::$app->formatter->booleanFormat);
?>
            <? endif; ?>
        </div>
    </div>


    <? if ($model->relatedProperties) : ?>
        <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/cms', 'Additional properties')]);
?>
        <? if ($properties = $model->relatedProperties) : ?>
            <? foreach ($properties as $property) : ?>
                <?php 
echo $property->renderActiveForm($form, $model);
?>
            <? endforeach; ?>
        <? endif; ?>

    <? else : ?>
        <?/*= \Yii::t('skeeks/cms','Additional properties are not set')*/?>
    <? endif; ?>


<?php 
Exemplo n.º 4
0
        <div class="col-md-2">
            <label>&nbsp;</label>
            <p>
                <?php 
echo \skeeks\cms\shop\widgets\admin\PropductPriceChangeAdminWidget::widget(['productPrice' => $model->baseProductPrice]);
?>
            </p>
        </div>
    </div>

    <?php 
if ($productPrices) {
    ?>
        <?php 
    echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'Additional costs')]);
    ?>

        <?php 
    foreach ($productPrices as $productPrice) {
        ?>

            <div class="row">
                <div class="col-md-3">
                    <label><?php 
        echo $productPrice->typePrice->name;
        ?>
</label>
                    <?php 
        echo Html::textInput("prices[" . $productPrice->typePrice->id . "][price]", $productPrice->price, ['class' => 'form-control']);
        ?>
Exemplo n.º 5
0
?>
    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'description')->textarea();
?>
    <?php 
echo $form->fieldInputInt($model, 'priority');
?>

    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'Affordable prices')]);
    ?>

            <?php 
    \yii\bootstrap\Alert::begin(['options' => ['class' => 'alert-warning']]);
    ?>
            <?php 
    echo \skeeks\cms\shop\Module::t('app', '<b> Warning! </b> Permissions are stored in real time. Thus, these settings are independent of site or user.');
    ?>
            <?php 
    \yii\bootstrap\Alert::end();
    ?>

            <?php 
    echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => $model->viewPermissionName, 'permissionDescription' => \skeeks\cms\shop\Module::t('app', 'Rights to see the prices') . " '{$model->name}'", 'label' => \skeeks\cms\shop\Module::t('app', 'User Groups that have permission to view this type of price')]);
    ?>
Exemplo n.º 6
0
    <?php 
echo $form->fieldRadioListBoolean($model, 'active');
?>
    <?php 
echo $form->fieldInputInt($model, 'priority');
?>



    <?php 
echo $form->fieldRadioListBoolean($model, 'index_for_search');
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('app', 'Link to section')]);
?>

    <?php 
echo $form->fieldSelect($model, 'default_tree_id', \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), ['allowDeselect' => true]);
?>
    <?php 
echo $form->fieldRadioListBoolean($model, 'is_allow_change_tree');
?>


    <?php 
echo $form->fieldSelect($model, 'root_tree_id', \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), ['allowDeselect' => true])->hint(\Yii::t('app', 'If it is set to the root partition, the elements can be tied to him and his sub.'));
echo $form->fieldSetEnd();
?>
Exemplo n.º 7
0
                <?php 
echo $form->fieldSelect($shopProduct, 'vat_id', \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopVat::find()->all(), 'id', 'name'));
?>
            </div>
            <div class="col-md-3">
                <?php 
echo $form->fieldRadioListBoolean($shopProduct, 'vat_included');
?>
            </div>
        </div>




        <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/shop/app', 'Options')]);
?>

            <?php 
echo $form->fieldRadioListBoolean($shopProduct, 'quantity_trace');
?>
            <?php 
echo $form->fieldRadioListBoolean($shopProduct, 'can_buy_zero');
?>
            <?php 
echo $form->fieldRadioListBoolean($shopProduct, 'negative_amount_trace');
?>
            <?php 
echo $form->fieldRadioListBoolean($shopProduct, 'subscribe');
?>
        </div>
Exemplo n.º 8
0
    <?php 
echo $form->fieldSelect($model, 'default_tree_id', \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), ['allowDeselect' => true]);
?>
    <?php 
echo $form->fieldRadioListBoolean($model, 'is_allow_change_tree');
?>


    <?php 
echo $form->fieldSelect($model, 'root_tree_id', \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), ['allowDeselect' => true])->hint(\Yii::t('app', 'If it is set to the root partition, the elements can be tied to him and his sub.'));
?>


    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('app', 'Additionally')]);
?>

    <?php 
echo $form->fieldRadioListBoolean($model, 'access_check_element');
?>

<?php 
echo $form->fieldSetEnd();
?>


<?php 
if (!$model->isNewRecord) {
    ?>
    <?php 
Exemplo n.º 9
0

<?php 
echo $form->fieldSet('Доступ');
?>

     <?php 
\yii\bootstrap\Alert::begin(['options' => ['class' => 'alert-warning']]);
?>
    <b>Внимание!</b> Права доступа сохраняются в режиме реального времени. Так же эти настройки не зависят от сайта или пользователя.
    <?php 
\yii\bootstrap\Alert::end();
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => "Файлы"]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ELFINDER_USER_FILES, 'label' => 'Доступ к личным файлам']);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ELFINDER_COMMON_PUBLIC_FILES, 'label' => 'Доступ к общим файлам']);
?>


    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ELFINDER_ADDITIONAL_FILES, 'label' => 'Доступ ко всем файлам']);
?>
Exemplo n.º 10
0


    <?php 
echo Html::checkbox("isLink", (bool) ($model->redirect || $model->redirect_tree_id), ['value' => '1', 'label' => \Yii::t('app', 'This section is a link'), 'class' => 'smartCheck', 'id' => 'isLink']);
?>

    <div data-listen="isLink" data-show="0" class="sx-hide">
        <?php 
echo $form->field($model, 'tree_type_id')->widget(\skeeks\widget\chosen\Chosen::className(), ['items' => \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->active()->all(), "id", "name")])->label('Тип раздела')->hint(\Yii::t('app', 'On selected type of partition can depend how it will be displayed.'));
?>
    </div>

    <div data-listen="isLink" data-show="1" class="sx-hide">
        <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('app', 'Redirect')]);
?>
        <?php 
echo $form->field($model, 'redirect_code', [])->radioList([301 => 'Постоянное перенаправление [301]', 302 => 'Временное перенаправление [302]'])->label(\Yii::t('app', 'Redirect Code'));
?>
        <div class="row">
            <div class="col-md-5">
                <?php 
echo $form->field($model, 'redirect', [])->textInput(['maxlength' => 500])->label(\Yii::t('app', 'Redirect'))->hint(\Yii::t('app', 'Specify an absolute or relative URL for redirection, in the free form.'));
?>
            </div>
            <div class="col-md-7">
                <?php 
echo $form->field($model, 'redirect_tree_id')->widget(\skeeks\cms\widgets\formInputs\selectTree\SelectTree::className(), ["attributeSingle" => "redirect_tree_id", "mode" => \skeeks\cms\widgets\formInputs\selectTree\SelectTree::MOD_SINGLE]);
?>
            </div>
Exemplo n.º 11
0
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_UPDATE, 'label' => \Yii::t('app', 'The ability to update records')]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_UPDATE_ADVANCED, 'label' => \Yii::t('app', 'The ability to update service information at records')]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_DELETE, 'label' => \Yii::t('app', 'Ability to delete records')]);
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('app', 'Control only own records')]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_UPDATE_OWN, 'label' => \Yii::t('app', 'The ability to update their records')]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_UPDATE_ADVANCED_OWN, 'label' => \Yii::t('app', 'The ability to update service information at records')]);
?>

    <?php 
echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => \skeeks\cms\rbac\CmsManager::PERMISSION_ALLOW_MODEL_DELETE_OWN, 'label' => \Yii::t('app', 'Ability to delete own records')]);
?>

Exemplo n.º 12
0
}], ['class' => \skeeks\cms\grid\CreatedAtColumn::className()]]]);
echo $form->fieldSetEnd();
?>



<?php 
$fuser = \skeeks\cms\shop\models\ShopFuser::find()->where(['user_id' => $model->id])->one();
?>

<?php 
echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Basket') . ' (' . \skeeks\cms\shop\models\ShopBasket::find()->where(['fuser_id' => $fuser->id])->count() . ")");
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'At the moment the user in a basket')]);
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => \skeeks\cms\shop\models\ShopBasket::find()->where(['fuser_id' => $fuser->id])]), 'columns' => [['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'created_at'], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'name'], ['class' => \yii\grid\DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Price'), 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) {
    return \Yii::$app->money->intlFormatter()->format($shopBasket->money);
}], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'quantity'], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'site_id']]]);
?>

<?php 
echo $form->fieldSetEnd();
?>


<?php 
echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Viewed products') . " (" . \skeeks\cms\shop\models\ShopViewedProduct::find()->where(['shop_fuser_id' => $fuser->id])->count() . ")");