From 6caa2581225be2deee4f1e445d2e079e7c2b4cf6 Mon Sep 17 00:00:00 2001 From: Karnovsky A Date: Wed, 6 Apr 2016 14:02:52 +0300 Subject: [PATCH] Some fixes --- common/modules/rubrication/models/TaxOptionSearch.php | 15 +++------------ common/modules/rubrication/views/tax-option/index.php | 37 ------------------------------------- 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/common/modules/rubrication/models/TaxOptionSearch.php b/common/modules/rubrication/models/TaxOptionSearch.php index adfb6bc..e31f86b 100644 --- a/common/modules/rubrication/models/TaxOptionSearch.php +++ b/common/modules/rubrication/models/TaxOptionSearch.php @@ -45,26 +45,17 @@ class TaxOptionSearch extends TaxOption // add conditions that should always apply here if (!empty($params['group'])) { $this->tax_group_id = intval($params['group']); -// $group = TaxGroup::findOne($this->tax_group_id); unset($params['group']); } -// if (!empty($params['value_render_flat'])) { -// $this->value_render_flat = trim($params['value_render_flat']); -// } + $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); - if (!$this->validate()) { - // uncomment the following line if you do not want to return any records when validation fails - // $query->where('0=1'); - return $dataProvider; - } - -// if (!empty($group)) { -// $query->joinWith('Value'); +// if (!$this->validate()) { +// return $dataProvider; // } // grid filtering conditions diff --git a/common/modules/rubrication/views/tax-option/index.php b/common/modules/rubrication/views/tax-option/index.php index 986b02e..c4c3ffa 100644 --- a/common/modules/rubrication/views/tax-option/index.php +++ b/common/modules/rubrication/views/tax-option/index.php @@ -63,43 +63,6 @@ $this->params['breadcrumbs'][] = $this->title; ], ], ]);?> - $dataProvider, - 'keyNameId' => 'tax_option_id', - 'keyNameParentId' => 'parent_id', - 'rootParentId' => 0, - 'columns' => [ - [ - 'attribute' => 'valueRenderHTML', - 'label' => Yii::t('rubrication', 'Value'), - 'format' => 'html' - ], - 'alias', - [ - 'class' => 'yii\grid\ActionColumn', - 'template' => '{update} {delete} {synonim}', - 'buttons' => [ - 'synonim' => function ($url, $model) { - return Html::a('', $url, [ - 'title' => Yii::t('rubrication', 'Synonims'), - ]); - }, - ], - 'urlCreator' => function ($action, $model, $key, $index) { - if ($action === 'update') { - $url ='/admin/rubrication/tax-option/update?id='.$model->tax_option_id; - return $url; - } elseif ($action === 'delete') { - $url ='/admin/rubrication/tax-option/delete?id='.$model->tax_option_id; - return $url; - } elseif ($action === 'synonim') { - $url ='/admin/rubrication/tax-synonim/delete?id='.$model->tax_option_id; - return $url; - } - } - ], - ] - ]); */?> $dataProvider, -- libgit2 0.21.4