/
layout_global.twig
98 lines (84 loc) · 4.5 KB
/
layout_global.twig
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Global Layout ·._.·´¯)·._.·´¯)
This is the global layout that will be used to displayed most pages (less the error page)
Other layout extend it, and will replace/extends the block "content".
#}
{% if( not ( aSurveyInfo.options.ajaxmode == "on" and getPost('ajax')=="on" )) %}
<!DOCTYPE html>
<html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}" class="{{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} {{ aSurveyInfo.class.html }}" {{ aSurveyInfo.attr.html }}>
{# Headers, metadata, etc #}
{{ include('./subviews/head.twig') }}
<body class=" {{ aSurveyInfo.class.body }} lang-{{aSurveyInfo.languagecode}} {{aSurveyInfo.surveyformat}} {% if( aSurveyInfo.options.brandlogo == "on") %}brand-logo{%endif%}" {{ aSurveyInfo.attr.body }} >
{% if (aSurveyInfo.options.ajaxmode == "on" and aSurveyInfo.printPdf != 1) %}
<div class="progress ajax_loading_indicator" id="ajax_loading_indicator">
<div class="progress-bar progress-bar-info ajax_loading_indicator_bar" id="ajax_loading_indicator_bar" role="progressbar">
</div>
</div>
{% endif %}
{% if (aSurveyInfo.options.backgroundimage == "on") %}
{{ registerTemplateCssFile("css/background-image.css") }}
{% endif %}
{% if (aSurveyInfo.options.boxcontainer == "off") %}
{{ registerTemplateCssFile("css/no-container.css") }}
{% endif %}
{% else %}
{{ unregisterScriptForAjax()}}
<body>
{% endif %}
<div id="beginScripts">
<###begin###>
</div>
{# Ajaxify cannot handle an element that is a direct child of body, so => create simple wrapper section #}
<article>
<div id="{{ aSurveyInfo.id.dynamicreload }}">
{% block body %}
{# Bootstrap Navigation Bar: the top menu #}
{% block nav_bar %}
{{ include('./subviews/nav_bar.twig') }}
{% endblock %}
{# Top Container: in this template, it contains only #}
{% block progress %}
{{ include('./subviews/progess_bar.twig') }}
{% endblock %}
<!-- Outer Frame Container -->
<div class="{{ aSurveyInfo.class.outerframe }} container {% if (aSurveyInfo.options.animatebody == "on") %} animated {{ aSurveyInfo.options.bodyanimation }} {%endif%}" id="{{ aSurveyInfo.id.outerframe }}" {{ aSurveyInfo.attr.outerframe }} >
<!-- Main Row -->
<div id="{{ aSurveyInfo.id.mainrow }}" {{ aSurveyInfo.attr.mainrow }} >
<!-- Main Col -->
<div class="{{ aSurveyInfo.class.maincol }} col-centered " id="{{ aSurveyInfo.id.maincol }}" {{ aSurveyInfo.attr.maincol }}>
{# This is the main block that will be replaced/extended by other layouts#}
{% block content %}
{# Include the various Warnings (preview mode, unanswered mandatory questions, etc) #}
{{ include('./subviews/warnings.twig') }}
{% endblock %}
</div> <!-- main col -->
</div> <!-- main row -->
</div> <!-- outer frame container -->
{# Bootstrap alert modal #}
{{ include('./subviews/bootstrap_alert_modal.twig') }}
<!-- some template.js function launched before ready -->
<script type="text/javascript">
/*<![CDATA[*/
if(template === undefined){
var template = new Template();
}
template.initGlobal();
/*]]>*/
</script>
{% endblock %}
</div>
</article>
<div id="bottomScripts">
<###end###>
</div>
</body>
</html>