]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/base.html
moved the google analytics code to the head of the base.html file.
[osqa.git] / forum / skins / default / templates / base.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <!-- template base.html -->
3 {% load extra_filters %}
4 {% load extra_tags %}
5 {% load i18n %}
6 <html xmlns="http://www.w3.org/1999/xhtml">
7     <head>
8         <title>{% block fulltitle %}{% block title %}{% endblock %} - {{ settings.APP_SHORT_NAME }}{% endblock %}</title>
9         {% spaceless %}
10         {% block meta %}{% endblock %}
11         {% endspaceless %}
12         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
13         {% if settings.GOOGLE_SITEMAP_CODE %}
14         <meta name="google-site-verification" content="{{settings.GOOGLE_SITEMAP_CODE}}" />
15         {% endif %}
16         <link rel="shortcut icon" href="{{ settings.APP_FAVICON }}" />
17         <link href="{% media  "/media/style/style.css" %}" rel="stylesheet" type="text/css" />
18         <script src="http://www.google.com/jsapi" type="text/javascript"></script>
19         <script type="text/javascript">google.load("jquery", "1.4.2");</script>
20         <script type="text/javascript">
21         /* <![CDATA[ */
22             var i18nLang = '{{settings.LANGUAGE_CODE}}';
23             var scriptUrl = '/{{settings.FORUM_SCRIPT_ALIAS}}'
24             var osqaSkin = '{{settings.OSQA_SKIN}}';
25         /* ]] */
26         </script>
27         <script type='text/javascript' src='{% media  "/media/js/osqa.main.js" %}'></script>
28         {% if user_messages %}
29         <style type="text/css">
30             body { margin-top:2.4em; }
31         </style>
32         <script type="text/javascript">
33             $(document).ready(function() {
34                 $('#validate_email_alert').click(function(){notify.close(true)})
35                 notify.show();
36             });
37         </script>
38         {% endif %}
39         {% block forejs %}{% endblock %}
40
41         <link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch %}" title="{{ settings.APP_SHORT_NAME }} Search" />
42         
43         {% if settings.GOOGLE_ANALYTICS_KEY %}
44             <script type="text/javascript">
45                 var _gaq = _gaq || [];
46                 _gaq.push(['_setAccount', '{{ settings.GOOGLE_ANALYTICS_KEY }}']);
47                 _gaq.push(['_trackPageview']);
48
49                 (function() {
50                     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
51                     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
52                     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
53                 })();
54             </script>
55         {% endif %}
56     </head>
57     <body>
58         <div class="notify" style="display:none">
59             {% autoescape off %}
60                 {% if user_messages %}
61                     {% for message in user_messages %}
62                           <p class="darkred">{{ message }}</p>
63                     {% endfor %}
64                 {% endif %}
65             {% endautoescape %}
66             <a id="close-notify" onclick="notify.close(true)">&times;</a>
67         </div>
68         {% include "header.html" %}
69         <div id="wrapper">
70             <div id="room">
71                 <div id="CALeft">
72                     {% block content%}
73                     {% endblock%}
74
75                 </div>
76                 <div id="CARight">
77                     {% block sidebar%}
78                     {% endblock%}
79
80                 </div>
81                 <div id="tail" style="clear:both;">
82                     {% block tail %}
83                     {% endblock %}
84                 </div>
85             </div>
86             <div class="spacer3"></div>
87         </div>
88         {% include "footer.html" %}
89         {% block endjs %}
90         {% endblock %}
91     </body>
92 </html>
93  <!-- end template base.html -->