|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @var \yii\web\View |
|
5
|
|
|
* @var $manager \hipanel\modules\finance\logic\AbstractTariffManager |
|
6
|
|
|
*/ |
|
7
|
|
|
use hipanel\modules\finance\menus\TariffDetailMenu; |
|
8
|
|
|
use hipanel\widgets\Box; |
|
9
|
|
|
use hipanel\widgets\ClientSellerLink; |
|
10
|
|
|
use yii\helpers\Html; |
|
11
|
|
|
|
|
12
|
|
|
$model = $manager->form; |
|
13
|
|
|
$type = $manager->getType(); |
|
14
|
|
|
|
|
15
|
|
|
$this->title = Html::encode($model->name); |
|
16
|
|
|
$this->params['subtitle'] = Yii::t('hipanel:finance:tariff', 'tariff detailed information'); |
|
17
|
|
|
$this->params['subtitle'] .= ' ' . Html::a( |
|
18
|
|
|
Yii::t('hipanel:finance:tariff', 'View as plan'), |
|
19
|
|
|
['@plan/view', 'id' => $model->id], |
|
20
|
|
|
['class' => 'btn btn-xs btn-info'] |
|
21
|
|
|
); |
|
22
|
|
|
|
|
23
|
|
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('hipanel', 'Tariffs'), 'url' => ['index']]; |
|
24
|
|
|
$this->params['breadcrumbs'][] = $this->title; |
|
25
|
|
|
|
|
26
|
|
|
?> |
|
27
|
|
|
|
|
28
|
|
|
<div class="row"> |
|
29
|
|
|
<div class="col-md-3"> |
|
30
|
|
|
<?php Box::begin([ |
|
31
|
|
|
'options' => [ |
|
32
|
|
|
'class' => 'box-solid', |
|
33
|
|
|
], |
|
34
|
|
|
'bodyOptions' => [ |
|
35
|
|
|
'class' => 'no-padding', |
|
36
|
|
|
], |
|
37
|
|
|
]) ?> |
|
38
|
|
|
<div class="profile-user-img text-center"> |
|
39
|
|
|
<i class="fa fa-dollar fa-5x"></i> |
|
40
|
|
|
</div> |
|
41
|
|
|
<p class="text-center"> |
|
42
|
|
|
<span class="profile-user-name"> |
|
43
|
|
|
<?= Html::encode($model->name) ?> |
|
44
|
|
|
<br/> |
|
45
|
|
|
<?= ClientSellerLink::widget(['model' => $model->tariff]) ?> |
|
|
|
|
|
|
46
|
|
|
</span> |
|
47
|
|
|
<br> |
|
48
|
|
|
<span class="profile-user-role"></span> |
|
49
|
|
|
</p> |
|
50
|
|
|
<div class="profile-usermenu"> |
|
51
|
|
|
<?php if ($model->tariff->note) : ?> |
|
|
|
|
|
|
52
|
|
|
<p style="padding: 10px 15px; border-bottom: 1px solid #f0f4f7;"> |
|
53
|
|
|
<?php if (Yii::$app->user->can('manage')) : ?> |
|
54
|
|
|
<?= Yii::t('hipanel:finance:tariff', '{0}:', [Html::tag('b', $model->tariff->getAttributeLabel('note'))]) ?> |
|
|
|
|
|
|
55
|
|
|
<?= \hipanel\widgets\XEditable::widget([ |
|
56
|
|
|
'model' => $model->tariff, |
|
|
|
|
|
|
57
|
|
|
'attribute' => 'note', |
|
58
|
|
|
'scenario' => 'set-note', |
|
59
|
|
|
]) ?> |
|
60
|
|
|
<?php else : ?> |
|
61
|
|
|
<?= Yii::t('hipanel:finance:tariff', '{0}: {1}', [Html::tag('b', $model->tariff->getAttributeLabel('note')), Html::encode($model->tariff->note)]) ?> |
|
|
|
|
|
|
62
|
|
|
<?php endif; ?> |
|
63
|
|
|
</p> |
|
64
|
|
|
<?php endif; ?> |
|
65
|
|
|
<?php if (Yii::$app->user->can('manage')) : ?> |
|
66
|
|
|
<?= TariffDetailMenu::widget(['model' => $model]) ?> |
|
67
|
|
|
<?php endif ?> |
|
68
|
|
|
</div> |
|
69
|
|
|
<?php Box::end() ?> |
|
70
|
|
|
</div> |
|
71
|
|
|
<div class="col-md-9"> |
|
72
|
|
|
<?= $this->render($type . '/view', ['model' => $model, 'manager' => $manager]) ?> |
|
73
|
|
|
</div> |
|
74
|
|
|
</div> |
|
75
|
|
|
|
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.