]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/base_content.html
Adds a head content injection spot for modules, and a new ui object for template...
[osqa.git] / forum / skins / default / templates / base_content.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <!-- base_content.html -->
3 {% load i18n extra_tags extra_filters markup ui_registry %}
4 <html xmlns="http://www.w3.org/1999/xhtml">
5     <head>
6         <title>{% block fulltitle %}{% block title %}{% endblock %} - {{ settings.APP_SHORT_NAME }}{% endblock %}</title>
7         <meta name="description" content="{% block metadescription %}{{ settings.APP_DESCRIPTION }}{% endblock %}">
8         <meta name="keywords" content="{% block metakeywords %}{{ settings.APP_KEYWORDS }}{% endblock %}">
9         {% block meta %}{% endblock %}
10         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11         {% if settings.GOOGLE_SITEMAP_CODE %}
12         <meta name="google-site-verification" content="{{ settings.GOOGLE_SITEMAP_CODE }}" />
13         {% endif %}
14         <link rel="shortcut icon" href="{{ settings.APP_FAVICON }}" />
15         <link href="{% media  "/media/style/style.css" %}" rel="stylesheet" type="text/css" />
16         {% if settings.USE_CUSTOM_CSS|or_preview:request %}
17         <link href="{% url custom_css %}" rel="stylesheet" type="text/css" />
18         {% endif %}
19         {% block forestyle %}{% endblock %}
20         <script src="http://www.google.com/jsapi" type="text/javascript"></script>
21         <script type="text/javascript">google.load("jquery", "1.4.2");</script>
22         <script type="text/javascript">
23         /* <![CDATA[ */
24             var i18nLang = '{{settings.LANGUAGE_CODE}}';
25             var scriptUrl = '/{{settings.FORUM_SCRIPT_ALIAS}}'
26             var osqaSkin = '{{settings.OSQA_SKIN}}';
27
28             var messages = {
29                 username: '{{ user.username }}',
30                 confirm: "{% trans "Are you sure?" %}",
31                 yes: "{% trans "Yes" %}",
32                 no: "{% trans "No" %}",
33                 message: "{% trans "Message:" %}",
34                 cancel: "{% trans "Cancel" %}",
35                 close: "{% trans "Close" %}",
36                 ok: "{% trans "Ok" %}"
37             }
38         /* ]] */
39         </script>
40         <script type='text/javascript' src='{% media  "/media/js/osqa.main.js" %}'></script>
41         {% if user_messages %}
42         <style type="text/css">
43             body { margin-top:2.4em; }
44         </style>
45         <script type="text/javascript">
46             $(document).ready(function() {
47                 var element = $('#validate_email_alert');
48                 element.click(function(){notify.close(true);})
49                 notify.show();
50             });
51         </script>
52         {% endif %}
53         {% if settings.USE_CUSTOM_HEAD|or_preview:request %}
54             {{ settings.CUSTOM_HEAD|or_preview:request|safe }}
55         {% endif %}
56         {% block forejs %}{% endblock %}
57         <link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch %}" title="{{ settings.APP_SHORT_NAME }} Search" />
58         {% loadregistry head_content %}{% endloadregistry %}
59     </head>
60     <body>
61         <div class="notify" style="display:none">
62             {% autoescape off %}
63                 {% if user_messages %}
64                     {% for message in user_messages %}
65                           <p class="darkred">{{ message }}</p>
66                     {% endfor %}
67                 {% endif %}
68             {% endautoescape %}
69             <a id="close-notify" onclick="notify.close(true)">&times;</a>
70         </div>
71         {% if settings.USE_CUSTOM_HEADER|or_preview:request %}
72             <div id="custom_header">
73                 {{ settings.CUSTOM_HEADER|or_preview:request|markdown:"settingsparser" }}    
74             </div>
75         {% endif %}
76         {% include "header.html" %}
77         {% block page_center %}
78         <div id="wrapper">
79             <div id="room">
80                 <div id="CAFull">
81                     {% block content%}
82                     {% endblock%}
83
84                 </div>
85                 <div id="tail" style="clear:both;">
86                     {% block tail %}
87                     {% endblock %}
88                 </div>
89             </div>
90             <div class="spacer3"></div>
91         </div>
92         {% endblock %}
93         {% if settings.USE_CUSTOM_FOOTER|or_preview:request %}
94             {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "above" %}
95                 <div id="custom_footer">
96                     {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
97                 </div>
98             {% endifequal %}
99             <div id="ground">
100                 {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "replace" %}
101                     {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
102                 {% else %}
103                     {% include "footer.html" %}
104                 {% endifequal %}
105             </div>
106             {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "below" %}
107                 <div id="custom_footer">
108                     {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
109                 </div>
110             {% endifequal %}
111         {% else %}
112             <div id="ground">
113                 {% include "footer.html" %}
114             </div>
115         {% endif %}
116         {% block endjs %}
117         {% endblock %}
118         {% if settings.GOOGLE_ANALYTICS_KEY %}
119             <script type="text/javascript">
120                 var _gaq = _gaq || [];
121                 _gaq.push(['_setAccount', '{{ settings.GOOGLE_ANALYTICS_KEY }}']);
122                 _gaq.push(['_trackPageview']);
123
124                 (function() {
125                     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
126                     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
127                     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
128                 })();
129             </script>
130         {% endif %}
131     </body>
132 </html>
133 <!-- end template base_content.html -->