diff --git a/application/helpers/SurveyRuntimeHelper.php b/application/helpers/SurveyRuntimeHelper.php index e3174ff28cd..a0449fc9546 100644 --- a/application/helpers/SurveyRuntimeHelper.php +++ b/application/helpers/SurveyRuntimeHelper.php @@ -303,6 +303,7 @@ public function run($surveyid,$args) } //READ TEMPLATES, INSERT DATA AND PRESENT PAGE + /** * create question index only in SurveyRuntime, not needed elsewhere, add it to GlobalVar : must be always set even if empty * @@ -310,8 +311,10 @@ public function run($surveyid,$args) if(!$previewquestion && !$previewgrp){ $questionindex = ls\helpers\questionIndexHelper::getInstance()->getIndexButton(); $questionindexmenu = ls\helpers\questionIndexHelper::getInstance()->getIndexLink(); + $thissurvey['indexItems'] = ls\helpers\questionIndexHelper::getInstance()->getIndexItems(); } + sendCacheHeaders(); doHeader(); @@ -321,7 +324,7 @@ public function run($surveyid,$args) echo ""; $thissurvey['upload_file'] = (isset($upload_file) && $upload_file)?true:false; - $thissurvey['surveyUrl'] = App()->createUrl("/survey/index",array("sid"=>$surveyid)); + $thissurvey['surveyUrl'] = App()->createUrl("/survey/index",array("sid"=>$surveyid)); $hiddenfieldnames = $thissurvey['hiddenfieldnames'] = implode("|", $inputnames); diff --git a/templates/default/views/startpage.twig b/templates/default/views/startpage.twig index b595461287c..147ca653037 100644 --- a/templates/default/views/startpage.twig +++ b/templates/default/views/startpage.twig @@ -36,7 +36,8 @@ diff --git a/templates/default/views/subviews/question_index.twig b/templates/default/views/subviews/question_index.twig new file mode 100644 index 00000000000..fb6bad84e9d --- /dev/null +++ b/templates/default/views/subviews/question_index.twig @@ -0,0 +1,41 @@ +{# + Shows the question index +#} + +{% if aSurveyInfo.oSurvey.questionindex > 1 %} + {% set indexType = 'full' %} +{% else %} + {% set indexType = 'incremental' %} +{% endif %} + +{% if aSurveyInfo.format == 'G' %} + + +{% endif %}