1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Server module for HiPanel. |
4
|
|
|
* |
5
|
|
|
* @link https://github.com/hiqdev/hipanel-module-server |
6
|
|
|
* @package hipanel-module-server |
7
|
|
|
* @license BSD-3-Clause |
8
|
|
|
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/) |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace hipanel\modules\server\grid; |
12
|
|
|
|
13
|
|
|
use hipanel\grid\ActionColumn; |
14
|
|
|
use hipanel\modules\server\helpers\ServerHelper; |
15
|
|
|
use hipanel\modules\server\widgets\OSFormatter; |
16
|
|
|
use Yii; |
17
|
|
|
|
18
|
|
|
class PreOrderGridView extends \hipanel\grid\BoxedGridView |
19
|
|
|
{ |
20
|
|
|
protected function columns() |
21
|
|
|
{ |
22
|
|
|
return array_merge(parent::columns(), [ |
|
|
|
|
23
|
|
|
'tech_details' => [ |
24
|
|
|
'format' => 'raw', |
25
|
|
|
'label' => Yii::t('hipanel:finance:change', 'Operation details'), |
26
|
|
|
'value' => function ($model) { |
27
|
|
|
$params = $model->params; |
28
|
|
|
return OSFormatter::widget([ |
29
|
|
|
'osimages' => ServerHelper::getOsimages($params['tariff_type']), |
30
|
|
|
'imageName' => $params['osimage'], |
31
|
|
|
'infoCircle' => false, |
32
|
|
|
]); |
33
|
|
|
}, |
34
|
|
|
], |
35
|
|
|
'user_comment' => [ |
36
|
|
|
'filterAttribute' => 'user_comment_like', |
37
|
|
|
'value' => function ($model) { |
38
|
|
|
return $model->user_comment; |
39
|
|
|
}, |
40
|
|
|
], |
41
|
|
|
'tech_comment' => [ |
42
|
|
|
'attribute' => 'tech_comment', |
43
|
|
|
], |
44
|
|
|
'time' => [ |
45
|
|
|
'value' => function ($model) { |
46
|
|
|
return Yii::$app->formatter->asDatetime($model->time); |
47
|
|
|
}, |
48
|
|
|
], |
49
|
|
|
'actions' => [ |
50
|
|
|
'class' => ActionColumn::class, |
51
|
|
|
'template' => '{view}', |
52
|
|
|
'header' => Yii::t('hipanel', 'Actions'), |
53
|
|
|
], |
54
|
|
|
]); |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.