Skip to content

Commit cde1ace

Browse files
author
phpNT
authored
0.0.2
1 parent b1edf6b commit cde1ace

File tree

1 file changed

+35
-48
lines changed

1 file changed

+35
-48
lines changed

views/view.php

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,91 +8,78 @@
88
/* @var $widget phpnt\exportFile\ExportFile */
99
use yii\bootstrap\Html;
1010
?>
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
1414
echo Html::beginForm(['/export/excel'], 'post');
1515
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);
1917
echo Html::hiddenInput('getAll', $widget->getAll);
2018
echo Html::hiddenInput('title', $widget->title);
2119
echo Html::submitButton($widget->xlsButtonName,
2220
['class' => $widget->buttonClass,]
2321
);
2422
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
3129
echo Html::beginForm(['/export/csv'], 'post');
3230
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);
3632
echo Html::hiddenInput('getAll', $widget->getAll);
3733
echo Html::hiddenInput('title', $widget->title);
38-
echo Html::hiddenInput('csvCharset', $widget->csvCharset);
3934
echo Html::submitButton($widget->csvButtonName,
4035
['class' => $widget->buttonClass,]
4136
);
4237
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
4944
echo Html::beginForm(['/export/word'], 'post');
5045
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);
5447
echo Html::hiddenInput('getAll', $widget->getAll);
5548
echo Html::hiddenInput('title', $widget->title);
5649
echo Html::submitButton($widget->wordButtonName,
5750
['class' => $widget->buttonClass,]
5851
);
5952
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
6659
echo Html::beginForm(['/export/html'], 'post');
6760
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);
7162
echo Html::hiddenInput('getAll', $widget->getAll);
7263
echo Html::hiddenInput('title', $widget->title);
7364
echo Html::submitButton($widget->htmlButtonName,
7465
['class' => $widget->buttonClass,]
7566
);
7667
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
8474
echo Html::beginForm(['/export/pdf'], 'post');
8575
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);
8977
echo Html::hiddenInput('getAll', $widget->getAll);
9078
echo Html::hiddenInput('title', $widget->title);
9179
echo Html::submitButton($widget->pdfButtonName,
9280
['class' => $widget->buttonClass,]
9381
);
9482
echo Html::endForm();
95-
}
96-
?>
97-
</div>
98-
83+
?>
84+
</div>
85+
<?php endif; ?>

0 commit comments

Comments
 (0)