application/modules/shop/controllers/BackendCurrenciesController.php 1 location
|
@@ 52-57 (lines=6) @@
|
| 49 |
|
'class' => UpdateEditable::className(), |
| 50 |
|
'modelName' => Currency::className(), |
| 51 |
|
'allowedAttributes' => [ |
| 52 |
|
'currency_rate_provider_id' => function(Currency $model, $attribute) { |
| 53 |
|
if ($model === null || $model->rateProvider === null || $model->currency_rate_provider_id===0) { |
| 54 |
|
return null; |
| 55 |
|
} |
| 56 |
|
return \yii\helpers\Html::tag('div', $model->rateProvider->name, ['class' => $model->rateProvider->name]); |
| 57 |
|
}, |
| 58 |
|
], |
| 59 |
|
], |
| 60 |
|
]; |
application/modules/shop/views/backend-product/index.php 1 location
|
@@ 222-231 (lines=10) @@
|
| 219 |
|
'name' |
| 220 |
|
), |
| 221 |
|
'format' => 'raw', |
| 222 |
|
'value' => function ($model) { |
| 223 |
|
if ($model === null || $model->currency === null || $model->currency_id === 0) { |
| 224 |
|
return null; |
| 225 |
|
} |
| 226 |
|
return \yii\helpers\Html::tag( |
| 227 |
|
'div', |
| 228 |
|
$model->currency->name, |
| 229 |
|
['class' => $model->currency->name] |
| 230 |
|
); |
| 231 |
|
}, |
| 232 |
|
], |
| 233 |
|
[ |
| 234 |
|
'class' => 'kartik\grid\EditableColumn', |
application/modules/shop/controllers/BackendProductController.php 1 location
|
@@ 100-109 (lines=10) @@
|
| 97 |
|
'class' => UpdateEditable::className(), |
| 98 |
|
'modelName' => get_class($product), |
| 99 |
|
'allowedAttributes' => [ |
| 100 |
|
'currency_id' => function (Product $model, $attribute) { |
| 101 |
|
if ($model === null || $model->currency === null || $model->currency_id === 0) { |
| 102 |
|
return null; |
| 103 |
|
} |
| 104 |
|
return \yii\helpers\Html::tag( |
| 105 |
|
'div', |
| 106 |
|
$model->currency->name, |
| 107 |
|
['class' => $model->currency->name] |
| 108 |
|
); |
| 109 |
|
}, |
| 110 |
|
'price', |
| 111 |
|
'old_price', |
| 112 |
|
'active' => function (Product $model) { |