Commit 6caa2581225be2deee4f1e445d2e079e7c2b4cf6
1 parent
9db1f47f
Some fixes
Showing
2 changed files
with
3 additions
and
49 deletions
Show diff stats
common/modules/rubrication/models/TaxOptionSearch.php
| ... | ... | @@ -45,26 +45,17 @@ class TaxOptionSearch extends TaxOption |
| 45 | 45 | // add conditions that should always apply here |
| 46 | 46 | if (!empty($params['group'])) { |
| 47 | 47 | $this->tax_group_id = intval($params['group']); |
| 48 | -// $group = TaxGroup::findOne($this->tax_group_id); | |
| 49 | 48 | unset($params['group']); |
| 50 | 49 | } |
| 51 | -// if (!empty($params['value_render_flat'])) { | |
| 52 | -// $this->value_render_flat = trim($params['value_render_flat']); | |
| 53 | -// } | |
| 50 | + | |
| 54 | 51 | $dataProvider = new ActiveDataProvider([ |
| 55 | 52 | 'query' => $query, |
| 56 | 53 | ]); |
| 57 | 54 | |
| 58 | 55 | $this->load($params); |
| 59 | 56 | |
| 60 | - if (!$this->validate()) { | |
| 61 | - // uncomment the following line if you do not want to return any records when validation fails | |
| 62 | - // $query->where('0=1'); | |
| 63 | - return $dataProvider; | |
| 64 | - } | |
| 65 | - | |
| 66 | -// if (!empty($group)) { | |
| 67 | -// $query->joinWith('Value'); | |
| 57 | +// if (!$this->validate()) { | |
| 58 | +// return $dataProvider; | |
| 68 | 59 | // } |
| 69 | 60 | |
| 70 | 61 | // grid filtering conditions | ... | ... |
common/modules/rubrication/views/tax-option/index.php
| ... | ... | @@ -63,43 +63,6 @@ $this->params['breadcrumbs'][] = $this->title; |
| 63 | 63 | ], |
| 64 | 64 | ], |
| 65 | 65 | ]);?> |
| 66 | - <?php /* echo TreeGridWidget::widget([ | |
| 67 | - 'dataProvider' => $dataProvider, | |
| 68 | - 'keyNameId' => 'tax_option_id', | |
| 69 | - 'keyNameParentId' => 'parent_id', | |
| 70 | - 'rootParentId' => 0, | |
| 71 | - 'columns' => [ | |
| 72 | - [ | |
| 73 | - 'attribute' => 'valueRenderHTML', | |
| 74 | - 'label' => Yii::t('rubrication', 'Value'), | |
| 75 | - 'format' => 'html' | |
| 76 | - ], | |
| 77 | - 'alias', | |
| 78 | - [ | |
| 79 | - 'class' => 'yii\grid\ActionColumn', | |
| 80 | - 'template' => '{update} {delete} {synonim}', | |
| 81 | - 'buttons' => [ | |
| 82 | - 'synonim' => function ($url, $model) { | |
| 83 | - return Html::a('<span class="glyphicon glyphicon-tasks"></span>', $url, [ | |
| 84 | - 'title' => Yii::t('rubrication', 'Synonims'), | |
| 85 | - ]); | |
| 86 | - }, | |
| 87 | - ], | |
| 88 | - 'urlCreator' => function ($action, $model, $key, $index) { | |
| 89 | - if ($action === 'update') { | |
| 90 | - $url ='/admin/rubrication/tax-option/update?id='.$model->tax_option_id; | |
| 91 | - return $url; | |
| 92 | - } elseif ($action === 'delete') { | |
| 93 | - $url ='/admin/rubrication/tax-option/delete?id='.$model->tax_option_id; | |
| 94 | - return $url; | |
| 95 | - } elseif ($action === 'synonim') { | |
| 96 | - $url ='/admin/rubrication/tax-synonim/delete?id='.$model->tax_option_id; | |
| 97 | - return $url; | |
| 98 | - } | |
| 99 | - } | |
| 100 | - ], | |
| 101 | - ] | |
| 102 | - ]); */?> | |
| 103 | 66 | <?php else :?> |
| 104 | 67 | <?php echo GridView::widget([ |
| 105 | 68 | 'dataProvider' => $dataProvider, | ... | ... |