Skip to content

Commit

Permalink
Fixed issue #10939: Public Survey List (root of app) includes a diffe…
Browse files Browse the repository at this point in the history
…rent set of CSS files from the Survey itself, and in the wrong order
  • Loading branch information
LouisGac committed Apr 22, 2016
1 parent bb4475a commit 8892401
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion application/controllers/SurveysController.php
Expand Up @@ -19,10 +19,17 @@ public function actionPublicList($lang = null)
App()->setLanguage(App()->getConfig('defaultlang'));
}
$oTemplate = Template::model()->getInstance(Yii::app()->getConfig("defaulttemplate"));


if($oTemplate->cssFramework == 'bootstrap')
{
App()->bootstrap->register();
// We now use the bootstrap package isntead of the Yiistrap TbApi::register() method
// Then instead of using the composer dependency system for templates
// We can use the package dependency system
Yii::app()->getClientScript()->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport');
App()->bootstrap->registerAllScripts();
}

$this->render('publicSurveyList', array(
'publicSurveys' => Survey::model()->active()->open()->public()->with('languagesettings')->findAll(),
'futureSurveys' => Survey::model()->active()->registration()->public()->with('languagesettings')->findAll(),
Expand Down

0 comments on commit 8892401

Please sign in to comment.