diff --git a/application/views/admin/survey/surveySummary_view.php b/application/views/admin/survey/surveySummary_view.php index dd0d2b0fe88..60994f53b47 100644 --- a/application/views/admin/survey/surveySummary_view.php +++ b/application/views/admin/survey/surveySummary_view.php @@ -198,20 +198,30 @@
hasGlobalPermission('templates','read')) - { - $sTemplateOptionsUrl = $this->createUrl("admin/themeoptions/sa/updatesurvey",array('surveyid'=>$oSurvey->sid, "gsid"=>$oSurvey->gsid)); - $sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('templatename' => $oSurvey->template)); - //$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('editfile'=>'layout_first_page.twig', "screenname"=>'welcome', 'template' => $oSurvey->template)); - ?> - templateModel->title; ?> (templateModel->name; ?>) - " class="btn btn-default btn-xs pull-right"> - " target="_blank" class="btn btn-default btn-xs pull-right"> - templateModel) { + if (Permission::model()->hasGlobalPermission('templates','read')) { + $sTemplateOptionsUrl = $this->createUrl("admin/themeoptions/sa/updatesurvey",array('surveyid'=>$oSurvey->sid, "gsid"=>$oSurvey->gsid)); + $sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('templatename' => $oSurvey->template)); + //$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('editfile'=>'layout_first_page.twig', "screenname"=>'welcome', 'template' => $oSurvey->template)); + ?> + templateModel->title; ?> (templateModel->name; ?>) + " class="btn btn-default btn-xs pull-right"> + " target="_blank" class="btn btn-default btn-xs pull-right"> + template + ); + Yii::app()->user->setFlash( + 'error', + $errorMessage + ); + echo $errorMessage; } ?>