/
_selector.php
123 lines (106 loc) · 4.89 KB
/
_selector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/** @var ListSurveysWidget $this */
/**
* Render the selector for surveys massive actions.
*
*/
?>
<!-- Rendering massive action widget -->
<?php
$this->widget('ext.admin.grid.MassiveActionsWidget.MassiveActionsWidget', array(
'pk' => 'sid',
'gridid' => 'survey-grid',
'dropupId' => 'surveyListActions',
'dropUpText' => gT('Selected survey(s)...'),
'aActions' => array(
// Delete
array(
// li element
'type' => 'action',
'action' => 'delete',
'url' => App()->createUrl('/admin/survey/sa/deleteMultiple/'),
'iconClasses' => 'text-danger glyphicon glyphicon-trash',
'text' => gT('Delete'),
'grid-reload' => 'yes',
// modal
'actionType' => 'modal',
'modalType' => 'yes-no',
'keepopen' => 'yes',
'sModalTitle' => gT('Delete surveys'),
'htmlModalBody' => gT('Are you sure you want to delete all those surveys?'),
),
// Separator
array(
// li element
'type' => 'separator',
),
// Download header
array(
// li element
'type' => 'dropdown-header',
'text' => gT("Export as..."),
),
// Export multiple survey archive
array(
// li element
'type' => 'action',
'action' => 'export',
'url' => App()->createUrl('/admin/export/sa/exportMultipleArchiveSurveys/'),
'iconClasses' => 'icon-export',
'text' => gT("Survey archive (*.lsa)"),
// modal
'actionType' => 'modal',
'modalType' => 'yes-no',
'keepopen' => 'yes',
'sModalTitle' => gT('Export survey archive'),
'htmlModalBody' => gT('This will export the survey archive (.lsa) for all selected active surveys. They will be provided in a single ZIP archive.').' '.gT('Continue?'),
),
// Export multiple survey archive
array(
// li element
'type' => 'action',
'action' => 'export',
'url' => App()->createUrl('/admin/export/sa/exportMultipleStructureSurveys/'),
'iconClasses' => 'icon-export',
'text' => gT("Survey structure (*.lss)"),
// modal
'actionType' => 'modal',
'modalType' => 'yes-no',
'keepopen' => 'yes',
'sModalTitle' => gT('Export survey structure'),
'htmlModalBody' => gT('This will export the survey structure (.lss) for all selected active surveys. They will be provided in a single ZIP archive.').' '.gT('Continue?'),
),
// Export multiple printable
array(
// li element
'type' => 'action',
'action' => 'export',
'url' => App()->createUrl('/admin/export/sa/exportMultiplePrintableSurveys/'),
'iconClasses' => 'icon-export',
'text' => gT("Printable survey (*.html)"),
// modal
'actionType' => 'modal',
'modalType' => 'yes-no',
'keepopen' => 'yes',
'sModalTitle' => gT('Export printable survey'),
'htmlModalBody' => gT('This will export a printable version of your survey.').' '.gT('Continue?'),
),
// Publication multiple
array(
// li element
'type' => 'action',
'action' => 'expire',
'url' => App()->createUrl('/admin/survey/sa/expireMultipleSurveys/'),
'iconClasses' => 'icon-expired',
'text' => gT("Set expiry date"),
'grid-reload' => 'yes',
// modal
'actionType' => 'modal',
'modalType' => 'yes-no',
'keepopen' => 'yes',
'sModalTitle' => gT('Set expiry date'),
'htmlModalBody' => $this->controller->renderFile(__DIR__.'/_expiry_dialog.php',array(),true),
),
),
));
?>