/
statistics_view.php
157 lines (138 loc) · 7.98 KB
/
statistics_view.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/**
* Statistic main view
* @var AdminController $this
* @var Survey $oSurvey
*/
// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('statisticsIndex');
?>
<!-- Javascript variables -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_statistics_view_scripts', array('sStatisticsLanguage' => $sStatisticsLanguage, 'surveyid' => $surveyid, 'showtextinline' => $showtextinline)); ?>
<?php echo CHtml::form(array("admin/statistics/sa/index/surveyid/{$surveyid}/"), 'post', array('name' => 'generate-statistics', 'class' => '', 'id' => 'generate-statistics')); ?>
<div id='statisticsview' class='side-body <?php echo getSideBodyClass(false); ?>'>
<div class="h1 visible-print-block text-center"><?php echo flattenText($oSurvey->defaultlanguage->surveyls_title,1); ?></div>
<div class="row hidden-print">
<div class="col-md-12">
<div class="col-md-3 text-left">
<h4 class="hidden-print">
<span class="fa fa-bar-chart"></span>
<?php eT("Statistics"); ?>
</h4>
</div>
</div>
</div>
<!-- General filters -->
<div class="row hidden-print">
<div class="col-sm-12 content-right">
<!-- Header -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_header', array()); ?>
<!-- AUTOSCROLLING DIV CONTAINING GENERAL FILTERS -->
<div id='statisticsgeneralfilters' class='statisticsfilters' <?php if ($filterchoice_state != '' || !empty($summary)) {
echo " style='display:none' ";
} ?>>
<div id='statistics_general_filter'>
<div class="col-sm-6">
<!-- Data Selection -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_dataselection', array('surveyid' => $surveyid, 'selectshow' => $selectshow, 'selecthide' => $selecthide, 'selectinc' => $selectinc, 'survlangs' => $survlangs, 'sStatisticsLanguage' => $sStatisticsLanguage)); ?>
<!-- Response ID -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_responseid', array()); ?>
<!-- Output format -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_outputformat', array()); ?>
</div>
<div class="col-sm-6">
<!-- Output options -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_outputoptions', array('error' => $error, 'showtextinline' => $showtextinline, 'usegraph' => $usegraph, 'showtextinline' => $showtextinline)); ?>
<!-- Submission date -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_submissiondate', array('datestamp' => $datestamp, 'dateformatdetails' => $dateformatdetails)); ?>
</div>
</div>
<p>
<input type='hidden' name='summary[]' value='idG' />
<input type='hidden' name='summary[]' value='idL' />
<input class="hidden" type='submit' value='<?php eT("View statistics"); ?>' />
<input class="hidden" type='button' value='<?php eT("Clear"); ?>' onclick="window.open('<?php echo Yii::app()->getController()->createUrl("admin/statistics/sa/index/surveyid/$surveyid"); ?>', '_top')" />
</p>
</div>
</div>
</div>
<!-- Response filter -->
<div class="row hidden-print">
<div class="col-lg-12 content-right">
<div style='clear: both'></div>
<!-- Response filter header -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_response_filter_header', array()); ?>
<!-- AUTOSCROLLING DIV CONTAINING QUESTION FILTERS -->
<div id='statisticsresponsefilters' class='statisticsfilters scrollheight_400'>
<input type='hidden' id='filterchoice_state' name='filterchoice_state' value='<?php echo $filterchoice_state; ?>' />
<?php
$dshresults = (isset($dshresults)) ? $dshresults : '';
$dshresults2 = (isset($dshresults2)) ? $dshresults2 : '';
?>
<!-- Filter choice -->
<?php $this->renderPartial(
'/admin/export/statistics_subviews/_response_filter_choice',
array(
'filterchoice_state' => $filterchoice_state,
'filters' => $filters,
'aGroups' => $aGroups,
'surveyid' => $surveyid,
'result' => $result,
'fresults' => $fresults,
'summary' => $summary,
'dateformatdetails'=>$dateformatdetails,
'oStatisticsHelper' => $oStatisticsHelper,
'language' => $language,
'dshresults' => $dshresults,
'dshresults2' => $dshresults2,
)
);
?>
</div>
<p id='vertical_slide2'>
<input type='submit' class="hidden" value='<?php eT("View statistics"); ?>' />
<input type='button' class="hidden" value='<?php eT("Clear"); ?>' onclick="window.open('<?php echo Yii::app()->getController()->createUrl("admin/statistics/sa/index/surveyid/$surveyid"); ?>', '_top')" />
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>' />
<input type='hidden' name='display' value='stats' />
</p>
</div><!-- END OF AUTOSCROLLING DIV CONTAINING QUESTION FILTERS -->
</div>
</form>
<div class="row">
<div class="col-lg-12 content-right">
<!-- Statistics header -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_statistics_header', array()); ?>
<div id='statisticsoutput' class='statisticsfilters'>
<?php if ($output == "") : ?>
<div class="alert alert-info" role="alert" id="view-stats-alert-info">
<?php eT('Please select filters and click on the "View statistics" button to generate the statistics.'); ?>
</div>
<?php else : ?>
<?php echo $output; ?>
<?php endif; ?>
<div id="statsContainerLoading">
<p><?php eT('Please wait, loading data...'); ?></p>
<div class="preloader loading">
<span class="slice"></span>
<span class="slice"></span>
<span class="slice"></span>
<span class="slice"></span>
<span class="slice"></span>
<span class="slice"></span>
</div>
</div>
</div>
</div>
</div>
<div class="row hidden-print">
<div class="col-lg-12 content-left">
<button id="statisticsExportImages" class="btn btn-info" style="margin: auto;"><?= gT('Export images') ?></button>
<p><?php eT('Make sure all images on this screen are loaded before clicking on the button.'); ?></p>
</div>
</div>
</div>
<?php
App()->getClientScript()->registerScript('StatisticsViewBSSwitcher', "
LS.renderBootstrapSwitch();
", LSYii_ClientScript::POS_POSTSCRIPT);
?>