Beispiel #1
0
<?php

use app\backend\components\Helper;
use app\backend\widgets\RemoveAllButton;
use kartik\dynagrid\DynaGrid;
use kartik\grid\CheckboxColumn;
use kartik\icons\Icon;
use yii\helpers\Html;
/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var \app\models\Form $searchModel
 */
$this->title = Yii::t('app', 'Thumbnail size');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
$this->beginBlock('add-button');
echo Html::a(Icon::show('plus') . ' ' . Yii::t('app', 'Add'), ['edit', 'returnUrl' => Helper::getReturnUrl()], ['class' => 'btn btn-success']);
echo RemoveAllButton::widget(['url' => '/image/backend-thumbnail-size/remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
$this->endBlock();
?>

<?php 
echo DynaGrid::widget(['options' => ['id' => 'form-grid'], 'columns' => [['class' => CheckboxColumn::className(), 'options' => ['width' => '10px']], 'id', 'width', 'height', 'quality', ['class' => 'app\\backend\\components\\ActionColumn', 'buttons' => [['url' => 'edit', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'delete', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete')]], 'options' => ['width' => '85px']]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => '<h3 class="panel-title">' . $this->title . '</h3>', 'after' => $this->blocks['add-button']]]]);
<?php

/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var \app\models\Form $searchModel
 */
use app\backend\components\ActionColumn;
use kartik\dynagrid\DynaGrid;
use kartik\grid\BooleanColumn;
use kartik\helpers\Html;
use kartik\icons\Icon;
$this->title = Yii::t('app', 'Content Blocks');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
echo DynaGrid::widget(['options' => ['id' => 'backend-chunk-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], 'name', 'key', ['class' => BooleanColumn::className(), 'attribute' => 'preload'], ['class' => ActionColumn::className(), 'options' => ['width' => '95px'], 'buttons' => [['url' => 'edit', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'delete', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete')]]]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/core/backend-chunk/edit', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => '/core/backend-chunk/remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]]]);
Beispiel #3
0
<?php

/**
 * @var $dataProvider \yii\data\ActiveDataProvider
 * @var $searchModel \app\components\SearchModel
 * @var $this \yii\web\View
 */
use app\backend\components\ActionColumn;
use kartik\dynagrid\DynaGrid;
use kartik\helpers\Html;
use kartik\icons\Icon;
$this->title = Yii::t('app', 'Users');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">
    <?php 
echo DynaGrid::widget(['options' => ['id' => 'users-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], 'id', 'username', 'email:email', ['attribute' => 'status', 'filter' => \app\modules\user\models\User::getStatuses()], 'create_time:datetime', ['class' => ActionColumn::className(), 'options' => ['width' => '95px'], 'buttons' => [['url' => 'update', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'delete', 'icon' => 'trash-o', 'class' => 'btn-danger', 'options' => ['data-action' => 'delete'], 'label' => Yii::t('app', 'Delete')]]]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/user/backend-user/update'], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => '/user/backend-user/remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]]]);
?>
</div>
Beispiel #4
0
/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var \app\models\Form $searchModel
 */
use kartik\dynagrid\DynaGrid;
use kartik\helpers\Html;
$this->title = Yii::t('app', 'Currencies');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
$this->beginBlock('add-button');
echo \yii\helpers\Html::a(\kartik\icons\Icon::show('plus') . ' ' . Yii::t('app', 'Add'), ['edit', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']);
echo \app\backend\widgets\RemoveAllButton::widget(['url' => 'remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
$this->endBlock();
?>



<div class="row">
    <div class="col-md-12">
        <?php 
echo DynaGrid::widget(['options' => ['id' => 'currencies-grid'], 'columns' => [['class' => \app\backend\columns\CheckboxColumn::className()], 'id', 'name', 'iso_code', 'convert_nominal', 'convert_rate', ['attribute' => 'currency_rate_provider_id', 'class' => \kartik\grid\EditableColumn::className(), 'editableOptions' => ['data' => [0 => '-'] + \app\components\Helper::getModelMap(\app\modules\shop\models\CurrencyRateProvider::className(), 'id', 'name'), 'inputType' => 'dropDownList', 'placement' => 'left', 'formOptions' => ['action' => 'update-editable']], 'filter' => \app\components\Helper::getModelMap(\app\modules\shop\models\CurrencyRateProvider::className(), 'id', 'name'), 'format' => 'raw', 'value' => function ($model, $key, $index, $column) {
    if ($model === null || $model->rateProvider === null) {
        return null;
    }
    return Html::tag('div', $model->rateProvider->name, ['class' => $model->rateProvider->name]);
}], ['class' => \app\backend\components\ActionColumn::className()]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => $this->render('_tabs', ['currencies' => true]), 'after' => $this->blocks['add-button']]]]);
?>
Beispiel #5
0
echo \app\backend\widgets\CategoryMovementsButtons::widget(['url' => Url::toRoute(['categoryMovements']), 'gridSelector' => '.grid-view']);
?>
<a href="<?php 
echo Url::toRoute(['edit', 'parent_id' => $parent_id, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()]);
?>
" class="btn btn-success">
    <?php 
echo Icon::show('plus');
?>
    <?php 
echo Yii::t('app', 'Add');
?>
</a>
<?php 
echo \app\backend\widgets\PublishSwitchButtons::widget(['url' => Url::toRoute(['publish-switch']), 'gridSelector' => '.grid-view']);
echo \app\backend\widgets\RemoveAllButton::widget(['url' => Url::toRoute(['remove-all', 'parent_id' => $parent_id]), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
$this->endBlock();
?>

<div class="row">
    <div class="col-md-4">
        <?php 
echo TreeWidget::widget(['treeDataRoute' => ['getTree'], 'doubleClickAction' => ContextMenuHelper::actionUrl(['index', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id']), 'contextMenuItems' => ['show' => ['label' => 'Show products in category', 'icon' => 'fa fa-folder-open', 'action' => ContextMenuHelper::actionUrl(['index'], ['parent_id' => 'id'])], 'createProduct' => ['label' => 'Create product in this category', 'icon' => 'fa fa-plus-circle', 'action' => ContextMenuHelper::actionUrl(['edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id'])], 'edit' => ['label' => 'Edit category', 'icon' => 'fa fa-pencil', 'action' => ContextMenuHelper::actionUrl(['/shop/backend-category/edit', 'returnUrl' => Helper::getReturnUrl()])], 'create' => ['label' => 'Create category', 'icon' => 'fa fa-plus-circle', 'action' => ContextMenuHelper::actionUrl(['/shop/backend-category/edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id'])], 'delete' => ['label' => 'Delete', 'icon' => 'fa fa-trash-o', 'action' => new \yii\web\JsExpression("function(node) {\n                            jQuery('#delete-category-confirmation')\n                                .attr('data-url', '/backend/category/delete?id=' + jQuery(node.reference[0]).data('id'))\n                                .attr('data-items', '')\n                                .modal('show');\n                            return true;\n                        }")]]]);
?>
    </div>
    <div class="col-md-8" id="jstree-more">
        <?php 
echo DynaGrid::widget(['options' => ['id' => 'Product-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'name'], 'slug', ['class' => \kartik\grid\EditableColumn::className(), 'attribute' => 'active', 'editableOptions' => ['data' => [0 => Yii::t('app', 'Inactive'), 1 => Yii::t('app', 'Active')], 'inputType' => 'dropDownList', 'placement' => 'left', 'formOptions' => ['action' => 'update-editable']], 'filter' => [0 => Yii::t('app', 'Inactive'), 1 => Yii::t('app', 'Active')], 'format' => 'raw', 'value' => function (Product $model) {
    if ($model === null || $model->active === null) {
        return null;
    }
Beispiel #6
0
<div class="row">
    <div class="col-md-4">
        <?php 
echo TreeWidget::widget(['treeDataRoute' => ['getTree', 'selected_id' => $parent_id], 'changeParentAction' => 'move', 'reorderAction' => 'reorder', 'doubleClickAction' => ContextMenuHelper::actionUrl(['/page/backend/edit']), 'contextMenuItems' => ['edit' => ['label' => 'Edit', 'icon' => 'fa fa-pencil', 'action' => ContextMenuHelper::actionUrl(['/page/backend/edit'])], 'show' => ['label' => 'Show pages inside this page', 'icon' => 'fa fa-folder-o', 'action' => ContextMenuHelper::actionUrl(['/page/backend/index'], ['parent_id' => 'id'])], 'create' => ['label' => 'Create', 'icon' => 'fa fa-plus-circle', 'action' => ContextMenuHelper::actionUrl(['/page/backend/edit'], ['parent_id' => 'id'])], 'delete' => ['label' => 'Delete', 'icon' => 'fa fa-trash-o', 'action' => new \yii\web\JsExpression("function(node) {\n                            jQuery('#delete-confirmation')\n                                .attr('data-url', '/page/backend/delete?id=' + jQuery(node.reference[0]).data('id'))\n                                .attr('data-items', '')\n                                .modal('show');\n                            return true;\n                        }")]]]);
?>
    </div>
    <div class="col-md-8" id="jstree-more">

        <?php 
$this->beginBlock('buttonGroup');
?>
        <div class="btn-toolbar" role="toolbar">
            <div class="btn-group">
                <?php 
echo \yii\helpers\Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/page/backend/edit', 'parent_id' => is_object($model) ? $model->id : 0, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']);
?>
            </div>
            <?php 
echo \app\backend\widgets\RemoveAllButton::widget(['url' => \yii\helpers\Url::toRoute(['/page/backend/remove-all', 'parent_id' => is_object($model) ? $model->id : 0]), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
?>
        </div>
        <?php 
$this->endBlock();
?>

        <?php 
echo DynaGrid::widget(['options' => ['id' => 'page-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'title'], 'slug', ['class' => 'app\\backend\\columns\\BooleanStatus', 'attribute' => 'published'], ['class' => 'app\\backend\\components\\ActionColumn', 'buttons' => [['url' => 'edit', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'clone', 'icon' => 'copy', 'class' => 'btn-success', 'label' => Yii::t('app', 'Clone')], ['url' => 'delete', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete'), 'options' => ['data-action' => 'delete']]], 'url_append' => '&parent_id=' . (is_object($model) ? $model->id : 0)]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => '<h3 class="panel-title">' . $this->title . '</h3>', 'after' => $this->blocks['buttonGroup']]]]);
?>
    </div>
</div>
Beispiel #7
0
<?php

use app\backend\components\ActionColumn;
use kartik\dynagrid\DynaGrid;
use kartik\helpers\Html;
use kartik\icons\Icon;
/**
 * @var $this yii\web\View
 * @var $searchModel app\components\SearchModel
 * @var $dataProvider yii\data\ActiveDataProvider
 */
$this->title = Yii::t('app', 'Warehouse');
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="order-status-index">
    <?php 
echo DynaGrid::widget(['options' => ['id' => 'order-statuses-grid'], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['edit', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => '/backend/order-status/remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], 'id', 'name', 'address', ['class' => ActionColumn::className()]]]);
?>
</div>
Beispiel #8
0
<?php

use kartik\dynagrid\DynaGrid;
use yii\helpers\Html;
use app\backend\components\ActionColumn;
/*
 * @var $dataProvider yii\data\ActiveDataProvider
 * @var $searchModel app\modules\models\AddonCategory
 * @var $this yii\web\View
 */
$this->title = Yii::t('app', 'Addons categories');
$this->params['breadcrumbs'][] = $this->title;
echo DynaGrid::widget(['options' => ['id' => 'addons-categories-grid'], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => Html::a(\kartik\icons\Icon::show('plus') . Yii::t('app', 'Add'), ['edit-category'], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => 'remove-all-categories', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]], 'columns' => [['class' => \app\backend\columns\CheckboxColumn::className()], 'id', 'name', ['class' => ActionColumn::className(), 'buttons' => [['url' => 'edit-category', 'icon' => 'pencil', 'class' => 'btn-default', 'label' => Yii::t('app', 'Edit')], ['url' => 'view-category', 'icon' => 'list', 'class' => 'btn-primary', 'label' => Yii::t('app', 'View')], ['url' => 'delete-category', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete')]]]]]);
?>

Beispiel #9
0
        <?php 
echo TreeWidget::widget(['treeDataRoute' => ['getTree', 'selected_id' => $parent_id], 'changeParentAction' => 'move', 'reorderAction' => 'reorder', 'doubleClickAction' => ContextMenuHelper::actionUrl(['edit', 'returnUrl' => Helper::getReturnUrl()]), 'contextMenuItems' => ['edit' => ['label' => 'Edit', 'icon' => 'fa fa-pencil', 'action' => ContextMenuHelper::actionUrl(['edit', 'returnUrl' => Helper::getReturnUrl()])], 'open' => ['label' => 'Open', 'icon' => 'fa fa-folder-open', 'action' => ContextMenuHelper::actionUrl(['index'], ['parent_id' => 'id'])], 'create' => ['label' => 'Create', 'icon' => 'fa fa-plus-circle', 'action' => ContextMenuHelper::actionUrl(['edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id'])], 'delete' => ['label' => 'Delete', 'icon' => 'fa fa-trash-o', 'action' => new \yii\web\JsExpression("function(node) {\n                                jQuery('#delete-category-confirmation')\n                                    .attr('data-url', '/shop/backend-category/delete?id=' + jQuery(node.reference[0]).data('id'))\n                                    .attr('data-items', '')\n                                    .modal('show');\n                                return true;\n                            }")]]]);
?>
    </div>
    <div class="col-md-8" id="jstree-more">
        <?php 
$this->beginBlock('add-button');
?>
                <a href="<?php 
echo Url::to(['edit', 'parent_id' => is_object($model) ? $model->id : 0, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()]);
?>
" class="btn btn-success">
                    <?php 
echo Icon::show('plus');
?>
                    <?php 
echo Yii::t('app', 'Add');
?>
                </a>
                <?php 
echo \app\backend\widgets\RemoveAllButton::widget(['url' => Url::to(['remove-all', 'parent_id' => is_object($model) ? $model->id : 0]), 'gridSelector' => '.grid-view', 'modalSelector' => '#delete-category-confirmation', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
?>
        <?php 
$this->endBlock();
?>
        <?php 
echo DynaGrid::widget(['options' => ['id' => 'category-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'name'], 'title', 'slug', 'date_modified', ['class' => 'app\\backend\\components\\ActionColumn', 'buttons' => [['url' => '@category', 'icon' => 'eye', 'class' => 'btn-info', 'label' => Yii::t('app', 'Preview'), 'appendReturnUrl' => false, 'url_append' => '', 'keyParam' => 'category_id', 'attrs' => ['category_group_id']], ['url' => 'edit', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'delete', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete'), 'options' => ['data-action' => 'delete-category']]], 'url_append' => '&parent_id=' . (is_object($model) ? $model->id : 0)]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => '<h3 class="panel-title">' . $this->title . '</h3>', 'after' => $this->blocks['add-button']]]]);
?>
    </div>
</div>
 /**
  * @inheritdoc
  */
 public function run()
 {
     return Html::a(Icon::show('plus') . Yii::t('app', 'Add'), [$this->baseRoute . 'edit'], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => $this->baseRoute . 'remove-all', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
 }
Beispiel #11
0
use kartik\grid\GridView;
use app\modules\review\models\Review;
$this->title = Yii::t('app', 'Reviews');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
$this->beginBlock('add-button');
?>
<div class="clearfix"></div>
    <div class="btn-group pull-right">
    <?php 
echo \yii\helpers\Html::a(Yii::t('app', 'Add'), Url::toRoute(['create', 'parent_id' => 0]), ['class' => 'btn btn-success']);
?>
    <?php 
echo \app\backend\widgets\RemoveAllButton::widget(['url' => Url::toRoute(['remove-all', 'returnUrl' => Yii::$app->request->url]), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger']]);
?>
    </div>
<div class="clearfix"></div>
<?php 
$this->endBlock();
?>

<div class="reviews-index">
    <?php 
echo DynaGrid::widget(['options' => ['id' => 'reviews-grid'], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => $this->blocks['add-button']]], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], 'id', 'author_email', ['attribute' => 'submission.form.name', 'label' => Yii::t('app', 'Form name')], ['attribute' => 'object_id', 'filter' => \app\components\Helper::getModelMap(\app\models\Object::className(), 'id', 'name'), 'label' => Yii::t('app', 'Object'), 'value' => function ($data) {
    $obj = \app\models\Object::findById($data->object_id);
    return is_null($obj) ? Yii::t('yii', '(not set)') : $obj->name;
}], ['class' => yii\grid\DataColumn::className(), 'attribute' => 'object_model_id', 'value' => function ($data) {
    /** @var $object \app\models\Object*/
    if (null !== ($object = \app\models\Object::findById($data->object_id))) {
<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<div class="row">
    <div class="col-md-12" id="jstree-more">

        <?php 
$this->beginBlock('buttonGroup');
?>
        <div class="btn-toolbar" role="toolbar">
            <div class="btn-group">
                <?php 
echo \yii\helpers\Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/shop/backend-discount/edit', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']);
?>
            </div>
            <?php 
echo \app\backend\widgets\RemoveAllButton::widget(['url' => \yii\helpers\Url::toRoute(['/shop/backend-discount/remove-all']), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
?>
        </div>
        <?php 
$this->endBlock();
?>

        <?php 
echo DynaGrid::widget(['options' => ['id' => 'page-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'name'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'value'], ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'value_in_percent'], ['class' => 'app\\backend\\components\\ActionColumn']], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => '<h3 class="panel-title">' . $this->title . '</h3>', 'after' => $this->blocks['buttonGroup']]]]);
?>
    </div>
</div>
Beispiel #13
0
                    <?php 
echo $form->field($model, 'name');
?>
                    <?php 
echo $form->field($model, 'object_id')->dropDownList(app\models\Object::getSelectArray());
?>
                    <?php 
echo $form->field($model, 'is_internal')->checkbox();
?>
                    <?php 
echo $form->field($model, 'hidden_group_title')->checkbox();
?>
                    <?php 
echo $form->field($model, 'sort_order');
?>
                <?php 
BackendWidget::end();
?>
            </article>
        </div>
    </section>
<?php 
ActiveForm::end();
if (!$model->isNewRecord) {
    ?>
    <?php 
    echo DynaGrid::widget(['options' => ['id' => 'group-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => \kartik\grid\DataColumn::className(), 'attribute' => 'id'], ['attribute' => 'property_handler_id', 'filter' => app\models\PropertyHandler::getSelectArray(), 'value' => function ($model, $key, $index, $widget) {
        $array = app\models\PropertyHandler::getSelectArray();
        return $array[$model->property_handler_id];
    }], 'name', 'key', ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'has_static_values'], ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'has_slugs_in_values'], ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'is_eav'], ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'is_column_type_stored'], ['class' => \kartik\grid\BooleanColumn::className(), 'attribute' => 'multiple'], ['class' => ActionColumn::className(), 'buttons' => [['url' => 'edit-property', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => 'Edit'], ['url' => 'delete-property', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => 'Delete', 'options' => ['data-action' => 'delete']]], 'url_append' => '&property_group_id=' . $model->id]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', Yii::t('app', 'Properties'), ['class' => 'panel-title']), 'after' => Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/backend/properties/edit-property', 'property_group_id' => $model->id, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => \yii\helpers\Url::to(['/backend/properties/remove-all-properties', 'group_id' => $model->id]), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]]]);
}
Beispiel #14
0
<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<div class="row">
    <div class="col-md-4">
        <?php 
echo TreeWidget::widget(['treeDataRoute' => ['getTree', 'selected_id' => $parent_id], 'changeParentAction' => 'move', 'reorderAction' => 'reorder', 'doubleClickAction' => ContextMenuHelper::actionUrl(['edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id', 'id' => 'id']), 'contextMenuItems' => ['edit' => ['label' => 'Edit', 'icon' => 'fa fa-pencil', 'action' => ContextMenuHelper::actionUrl(['/backend/navigation/edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'parent_id', 'id' => 'id'])], 'open' => ['label' => 'Open', 'icon' => 'fa fa-folder-open', 'action' => ContextMenuHelper::actionUrl(['/backend/navigation/index'], ['parent_id' => 'id'])], 'create' => ['label' => 'Create', 'icon' => 'fa fa-plus-circle', 'action' => ContextMenuHelper::actionUrl(['/backend/navigation/edit', 'returnUrl' => Helper::getReturnUrl()], ['parent_id' => 'id'])], 'delete' => ['label' => 'Delete', 'icon' => 'fa fa-trash-o', 'action' => new \yii\web\JsExpression("function(node) {\n                                jQuery('#delete-confirmation')\n                                    .attr('data-url', '/backend/navigation/delete?id=' + jQuery(node.reference[0]).data('id'))\n                                    .attr('data-items', '')\n                                    .modal('show');\n                                return true;\n                            }")]]]);
?>

    </div>
    <div class="col-md-8">
        <?php 
$this->beginBlock('add-button');
?>
                <?php 
echo \yii\helpers\Html::a(Icon::show('plus') . " " . Yii::t('app', 'Add'), ['/backend/navigation/edit', 'parent_id' => is_object($model) ? $model->id : 0, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']);
?>
                <?php 
echo \app\backend\widgets\RemoveAllButton::widget(['url' => \yii\helpers\Url::to(['/backend/navigation/remove-all', 'parent_id' => $parent_id]), 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']]);
?>
        <?php 
$this->endBlock();
?>
        <?php 
echo DynaGrid::widget(['options' => ['id' => 'nav-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], 'name', 'url', 'route', 'route_params', ['class' => 'app\\backend\\components\\ActionColumn', 'url_append' => "&parent_id={$parent_id}"]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => '<h3 class="panel-title">' . $this->title . '</h3>', 'after' => $this->blocks['add-button']]]]);
?>
    </div>
</div>
Beispiel #15
0
<?php

/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var \app\models\Form $searchModel
 */
use app\backend\components\ActionColumn;
use kartik\dynagrid\DynaGrid;
use kartik\grid\BooleanColumn;
use kartik\helpers\Html;
use kartik\icons\Icon;
$this->title = Yii::t('app', 'Property groups');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
echo DynaGrid::widget(['options' => ['id' => 'properties-grid'], 'columns' => [['class' => \kartik\grid\CheckboxColumn::className(), 'options' => ['width' => '10px']], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'object_id', 'filter' => app\models\Object::getSelectArray(), 'value' => function ($model, $key, $index, $widget) {
    $array = app\models\Object::getSelectArray();
    return $array[$model->object_id];
}], 'name', ['class' => BooleanColumn::className(), 'attribute' => 'is_internal'], ['class' => BooleanColumn::className(), 'attribute' => 'hidden_group_title'], ['class' => ActionColumn::className(), 'options' => ['width' => '95px'], 'buttons' => [['url' => 'group', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')], ['url' => 'delete-group', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete'), 'options' => ['data-action' => 'delete']]]]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => Html::a(Icon::show('plus') . Yii::t('app', 'Add'), ['/backend/properties/group', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']) . \app\backend\widgets\RemoveAllButton::widget(['url' => '/backend/properties/remove-all-groups', 'gridSelector' => '.grid-view', 'htmlOptions' => ['class' => 'btn btn-danger pull-right']])]]]);