Conditions | 2 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function run() |
||
12 | { |
||
13 | return Html::tag('div', Html::a(Yii::t('hipanel.finance.price', 'Create prices') . |
||
14 | ' ' . |
||
15 | Html::tag('span', null, ['class' => 'caret']), '#', [ |
||
16 | 'data-toggle' => 'dropdown', 'class' => 'dropdown-toggle btn btn-success btn-sm', |
||
17 | ]) . Dropdown::widget([ |
||
18 | 'options' => ['class' => 'pull-right'], |
||
19 | 'items' => array_filter([ |
||
20 | $this->model->supportsSharedPrices() ? [ |
||
21 | 'encode' => false, |
||
22 | 'url' => '#', |
||
23 | 'label' => Yii::t('hipanel.finance.price', 'Create shared prices'), |
||
24 | 'linkOptions' => [ |
||
25 | 'data' => [ |
||
26 | 'toggle' => 'modal', |
||
27 | 'target' => '#create-shared-prices-modal', |
||
28 | ], |
||
29 | ], |
||
30 | ] : null, |
||
31 | ]), |
||
32 | ]), ['class' => 'dropdown']); |
||
33 | } |
||
34 | } |
||
35 |