예제 #1
0
 * @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']]]]);
?>
    </div>
</div>
예제 #2
0
<?php

/**
 * @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', 'Currency rate providers');
$this->params['breadcrumbs'][] = $this->title;
?>

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

<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', 'class_name', ['class' => \app\backend\components\ActionColumn::className()]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => $this->render('@app/modules/shop/views/backend-currencies/_tabs', ['currencies' => false]), 'after' => \app\backend\widgets\helpers\AddRemoveAllPanel::widget(['baseRoute' => '/shop/backend-currency-rate-provider/'])]]]);
?>
    </div>
</div>
예제 #3
0
파일: index.php 프로젝트: lzpfmh/dotplant2
<?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')]]]]]);
?>

예제 #4
0
<?php

/**
 * @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', 'Dynamic content');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
$this->beginBlock('bottom-buttons');
echo \yii\helpers\Html::a(\kartik\icons\Icon::show('plus') . ' ' . Yii::t('app', 'Add'), ['/backend/dynamic-content/edit', 'returnUrl' => \app\backend\components\Helper::getReturnUrl()], ['class' => 'btn btn-success']);
echo \app\backend\widgets\RemoveAllButton::widget(['url' => '/backend/dynamic-content/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' => 'dynamic-content-grid'], 'columns' => [['class' => \app\backend\columns\CheckboxColumn::className()], 'id', 'route', 'name', 'content_block_name', 'title', 'h1', 'meta_description', ['class' => app\backend\components\ActionColumn::className()]], 'theme' => 'panel-default', 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'panel' => ['heading' => Html::tag('h3', $this->title, ['class' => 'panel-title']), 'after' => $this->blocks['bottom-buttons']]]]);
?>
    </div>
</div>