/
surveySummary_view.php
67 lines (60 loc) · 2.32 KB
/
surveySummary_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
<?php
/**
* Survey default view
*
* @var SurveyAdministrationController $this
* @var Survey $oSurvey
*/
$count= 0;
if (!isset($iSurveyID)) {
$iSurveyID = $oSurvey->sid;
}
// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('surveySummary');
$count = 0;
$surveyid = $oSurvey->sid;
$templateModel = Template::model()->findByPk($oSurvey->oOptions->template);
$surveylocale = Permission::model()->hasSurveyPermission($iSurveyID, 'surveylocale', 'read');
// EDIT SURVEY SETTINGS BUTTON
$surveysettings = Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'read');
$respstatsread = Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'read')
|| Permission::model()->hasSurveyPermission($iSurveyID, 'statistics', 'read')
|| Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'export');
?>
<!-- START surveySummary -->
<div class="row">
<div class="col-sm-12 h3 pagetitle">
<?php eT('Survey summary'); ?> :
<?php echo flattenText($oSurvey->currentLanguageSettings->surveyls_title)." (".gT("ID")." ".$oSurvey->sid.")";?>
</div>
</div>
<?php /*
/// Survey quick actions have been removed -> deprecated
<div class="row">
<div class="col-sm-12">
<?php echo $this->renderPartial('/admin/survey/subview/_survey_quickaction', $subviewData); ?>
</div>
</div>
*/ ?>
<div class="row ls-space margin top-10">
<?php
$possiblePanelFolder = realpath(Yii::app()->getConfig('rootdir').'/application/views/admin/survey/subview/surveydashboard/');
$possiblePanels = scandir($possiblePanelFolder);
foreach ($possiblePanels as $i => $panel) {
// If it's no twig file => ignore
if(!preg_match('/^.*\.twig$/',$panel)){
continue;
}
//every two entries close it up
if($i%2 === 0 ) { ?>
</div>
<div class="row ls-space margin top-10">
<?php } ?>
<div class="col-md-12 col-lg-6">
<?php $surveyTextContent = $oSurvey->currentLanguageSettings->attributes; ?>
<?=App()->twigRenderer->renderViewFromFile('/application/views/admin/survey/subview/surveydashboard/'.$panel, get_defined_vars(), true)?>
</div>
<?php }
?>
</div>
<!-- END surveySummary -->