-
Notifications
You must be signed in to change notification settings - Fork 986
/
statistics_view.php
142 lines (123 loc) · 7.9 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
<?php
/**
* Statistic main view
*
*/
?>
<!-- Javascript variables -->
<?php $this->renderPartial('/admin/export/statistics_subviews/_statistics_view_scripts', array('sStatisticsLanguage'=>$sStatisticsLanguage, 'surveyid'=>$surveyid, 'showtextinline'=>$showtextinline)) ; ?>
<div class="container-center">
<div class="row">
<div class="col-sm-3 col-sm-offset-3 col-xs-6"><button id="action_js_export_to_pdf" class="btn btn-primary btn-block"><?php eT("Export to PDF");?></button></div>
<div class="col-sm-3 col-xs-6"><button id="action_js_preview_to_print" class="btn btn-primary btn-block"><?php eT("Printable View");?></button></div>
</div>
</div>
<div id='statisticsview' class='side-body <?php echo getSideBodyClass(false); ?>'>
<h3>
<span class="glyphicon glyphicon-stats"></span>
<?php eT("Statistics"); ?>
</h3>
<?php echo CHtml::form(array("admin/statistics/sa/index/surveyid/{$surveyid}/"), 'post', array('name'=>'formbuilder','#'=>'start', 'class'=>'form-horizontal', 'id'=>'generate-statistics'));?>
<!-- General filters -->
<div class="row">
<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('selectshow'=>$selectshow, 'selecthide'=>$selecthide, 'selectinc'=>$selectinc, 'survlangs'=>$survlangs, 'sStatisticsLanguage'=>$sStatisticsLanguage, 'surveyinfo'=>$surveyinfo)) ; ?>
<!-- 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">
<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,
'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">
<?php
// TODO : show the css loader
flush(); //Let's give the user something to look at while they wait for the pretty pictures
?>
<!-- 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>
<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>
<?php else:?>
<?php echo $output; ?>
<?php endif;?>
</div>
</div>
</div>
</div>