|
8 | 8 | /* @var $widget phpnt\exportFile\ExportFile */ |
9 | 9 | use yii\bootstrap\Html; |
10 | 10 | ?> |
11 | | -<div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
12 | | - <?php |
13 | | - if ($widget->xls) { |
| 11 | +<?php if ($widget->xls): ?> |
| 12 | + <div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
| 13 | + <?php |
14 | 14 | echo Html::beginForm(['/export/excel'], 'post'); |
15 | 15 | echo Html::hiddenInput('model', $widget->model); |
16 | | - echo Html::hiddenInput('searchAttributes', $widget->searchAttributes); |
17 | | - echo Html::hiddenInput('sort', $widget->sort); |
18 | | - echo Html::hiddenInput('page', $widget->page); |
| 16 | + echo Html::hiddenInput('queryParams', $widget->queryParams); |
19 | 17 | echo Html::hiddenInput('getAll', $widget->getAll); |
20 | 18 | echo Html::hiddenInput('title', $widget->title); |
21 | 19 | echo Html::submitButton($widget->xlsButtonName, |
22 | 20 | ['class' => $widget->buttonClass,] |
23 | 21 | ); |
24 | 22 | echo Html::endForm(); |
25 | | - } |
26 | | - ?> |
27 | | -</div> |
28 | | -<div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
29 | | - <?php |
30 | | - if ($widget->csv) { |
| 23 | + ?> |
| 24 | + </div> |
| 25 | +<?php endif; ?> |
| 26 | +<?php if ($widget->csv): ?> |
| 27 | + <div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
| 28 | + <?php |
31 | 29 | echo Html::beginForm(['/export/csv'], 'post'); |
32 | 30 | echo Html::hiddenInput('model', $widget->model); |
33 | | - echo Html::hiddenInput('searchAttributes', $widget->searchAttributes); |
34 | | - echo Html::hiddenInput('sort', $widget->sort); |
35 | | - echo Html::hiddenInput('page', $widget->page); |
| 31 | + echo Html::hiddenInput('queryParams', $widget->queryParams); |
36 | 32 | echo Html::hiddenInput('getAll', $widget->getAll); |
37 | 33 | echo Html::hiddenInput('title', $widget->title); |
38 | | - echo Html::hiddenInput('csvCharset', $widget->csvCharset); |
39 | 34 | echo Html::submitButton($widget->csvButtonName, |
40 | 35 | ['class' => $widget->buttonClass,] |
41 | 36 | ); |
42 | 37 | echo Html::endForm(); |
43 | | - } |
44 | | - ?> |
45 | | -</div> |
46 | | -<div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
47 | | - <?php |
48 | | - if ($widget->word) { |
| 38 | + ?> |
| 39 | + </div> |
| 40 | +<?php endif; ?> |
| 41 | +<?php if ($widget->word): ?> |
| 42 | + <div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
| 43 | + <?php |
49 | 44 | echo Html::beginForm(['/export/word'], 'post'); |
50 | 45 | echo Html::hiddenInput('model', $widget->model); |
51 | | - echo Html::hiddenInput('searchAttributes', $widget->searchAttributes); |
52 | | - echo Html::hiddenInput('sort', $widget->sort); |
53 | | - echo Html::hiddenInput('page', $widget->page); |
| 46 | + echo Html::hiddenInput('queryParams', $widget->queryParams); |
54 | 47 | echo Html::hiddenInput('getAll', $widget->getAll); |
55 | 48 | echo Html::hiddenInput('title', $widget->title); |
56 | 49 | echo Html::submitButton($widget->wordButtonName, |
57 | 50 | ['class' => $widget->buttonClass,] |
58 | 51 | ); |
59 | 52 | echo Html::endForm(); |
60 | | - } |
61 | | - ?> |
62 | | -</div> |
63 | | -<div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
64 | | - <?php |
65 | | - if ($widget->html) { |
| 53 | + ?> |
| 54 | + </div> |
| 55 | +<?php endif; ?> |
| 56 | +<?php if ($widget->html): ?> |
| 57 | + <div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
| 58 | + <?php |
66 | 59 | echo Html::beginForm(['/export/html'], 'post'); |
67 | 60 | echo Html::hiddenInput('model', $widget->model); |
68 | | - echo Html::hiddenInput('searchAttributes', $widget->searchAttributes); |
69 | | - echo Html::hiddenInput('sort', $widget->sort); |
70 | | - echo Html::hiddenInput('page', $widget->page); |
| 61 | + echo Html::hiddenInput('queryParams', $widget->queryParams); |
71 | 62 | echo Html::hiddenInput('getAll', $widget->getAll); |
72 | 63 | echo Html::hiddenInput('title', $widget->title); |
73 | 64 | echo Html::submitButton($widget->htmlButtonName, |
74 | 65 | ['class' => $widget->buttonClass,] |
75 | 66 | ); |
76 | 67 | echo Html::endForm(); |
77 | | - } |
78 | | - ?> |
79 | | -</div> |
80 | | -<div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
81 | | - <?php |
82 | | - //if ($widget->html) { |
83 | | - if ($widget->pdf) { |
| 68 | + ?> |
| 69 | + </div> |
| 70 | +<?php endif; ?> |
| 71 | +<?php if ($widget->pdf): ?> |
| 72 | + <div class="<?= $widget->blockClass ?>" style="<?= $widget->blockStyle ?>"> |
| 73 | + <?php |
84 | 74 | echo Html::beginForm(['/export/pdf'], 'post'); |
85 | 75 | echo Html::hiddenInput('model', $widget->model); |
86 | | - echo Html::hiddenInput('searchAttributes', $widget->searchAttributes); |
87 | | - echo Html::hiddenInput('sort', $widget->sort); |
88 | | - echo Html::hiddenInput('page', $widget->page); |
| 76 | + echo Html::hiddenInput('queryParams', $widget->queryParams); |
89 | 77 | echo Html::hiddenInput('getAll', $widget->getAll); |
90 | 78 | echo Html::hiddenInput('title', $widget->title); |
91 | 79 | echo Html::submitButton($widget->pdfButtonName, |
92 | 80 | ['class' => $widget->buttonClass,] |
93 | 81 | ); |
94 | 82 | echo Html::endForm(); |
95 | | - } |
96 | | - ?> |
97 | | -</div> |
98 | | - |
| 83 | + ?> |
| 84 | + </div> |
| 85 | +<?php endif; ?> |
0 commit comments