Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: survey layout include public layout
- Loading branch information
Showing
3 changed files
with
8 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,7 @@ | ||
<?php | ||
/** | ||
* @todo : remove this one : move to public MUST BE DONE ! | ||
* @see : public.php | ||
* | ||
* @var string sTemplate : the template to be used | ||
* @var array aData : the global var for templatereplace | ||
* @var array aReplacementData : the array of replacement for templatereplace | ||
* @var startsurvey boolean start surevy (mean add survey.pstpl page) | ||
**/ | ||
/* send the header : @see common_helper sendCacheHeaders */ | ||
//~ sendCacheHeaders(); // Send the header | ||
if (!headers_sent()) | ||
{ | ||
if (Yii::app()->getConfig('x_frame_options','allow')=='sameorigin') | ||
{ | ||
header('X-Frame-Options: SAMEORIGIN'); | ||
} | ||
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'); // this line lets IE7 run LimeSurvey in an iframe | ||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past | ||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified | ||
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 | ||
header("Cache-Control: post-check=0, pre-check=0", false); | ||
header("Pragma: no-cache"); | ||
header('Content-Type: text/html; charset=utf-8'); | ||
} | ||
?><!DOCTYPE html> | ||
<?php | ||
Yii::app()->loadHelper('surveytranslator'); | ||
$lang=App()->getLanguage(); | ||
$langDir= (getLanguageRTL(App()->getLanguage())) ? "rtl": "ltr"; | ||
?><html lang="<?php echo $lang ?>" class="no-js <?php echo $lang ?> dir-<?php echo $langDir ?>"> | ||
<head> | ||
<?php | ||
App()->clientScript->registerScript("nojsReplace","(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);",CClientScript::POS_HEAD); | ||
$oTemplate = Template::model()->getInstance($this->sTemplate); | ||
App()->getClientScript()->registerPackage('fontawesome'); | ||
if($oTemplate->cssFramework == 'bootstrap') | ||
{ | ||
Yii::app()->getClientScript()->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport'); | ||
App()->bootstrap->registerAllScripts(); | ||
} | ||
Yii::app()->clientScript->registerPackage('survey-template'); | ||
// Maybe can add language changer here | ||
/* Add head by template + star body (if template start body here ....) */ | ||
echo templatereplace(file_get_contents($oTemplate->viewPath."startpage.pstpl"),$this->aReplacementData,$this->aGlobalData); | ||
if(!empty($this->bStartSurvey)){ | ||
echo templatereplace(file_get_contents($oTemplate->viewPath."survey.pstpl"),$this->aReplacementData,$this->aGlobalData); | ||
} | ||
echo $content; | ||
echo templatereplace(file_get_contents($oTemplate->viewPath."endpage.pstpl"),$this->aReplacementData,$this->aGlobalData); | ||
?> | ||
</body> | ||
</html> | ||
Yii::import('views.layout.public', true) | ||
//~ require_once('public.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<div class="completed-wrapper"> | ||
<div class='completed-text'>{COMPLETED}</div> | ||
<div class='end-url'>"+{URL}+"</div> | ||
<div class='completed-text'>{COMPLETED} | ||
{URL} | ||
</div> | ||
|
||
</div> |