]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/header.html
Migrate to Django 1.6
[osqa.git] / forum / skins / default / templates / header.html
index 5710550f8631981caaf95439845d7cae8b0f9887..6d2c849622ad5aa0f6df4d680501c3e611e4bc18 100644 (file)
@@ -1,53 +1,48 @@
 <!-- template header.html -->
-{% load extra_tags ui_registry i18n %}
+{% load extra_tags ui_registry i18n extra_filters %}
 
        <div id="roof">
-               <div id="navBar">
-                       <div id="top">
-                           {% loadregistry header_links %}{% endloadregistry %}
-                       </div>
-                       <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                         <tr>
-                               <td width="23%">
-                                       <div id="logo">
-                                               <a href="{% url index %}">
-                                                       <img src="{{ settings.APP_LOGO }}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/>
-                                               </a>
-                                       </div>
-               </td>
-                               <td width="77%" valign="bottom">
-                <div class="nav">
-                    {% loopregistry page_top_tabs %}{% spaceless %}
-                        <a id="nav_{{ tab_name }}"{% ifequal tab tab_name %} class="on"{% endifequal %} href="{{ tab_url }}" >{{ tab_title }}</a>
-                    {% endspaceless %}{% endloopregistry %}
-                    <div class="focus">
-                    <a id="nav_ask" href="{% url ask %}" class="special">{% trans "ask a question" %}</a>
-                    </div>
-                </div>
-
-              </td>
-                         </tr>
-                       </table>
+         
+               <div id="logo">
+                       <a href="{% url "index" %}">
+                               <img src="{{ settings.APP_LOGO }}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/>
+                       </a>
                </div>
-               <div id="searchBar">
-                       <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content">
-            <tr>
-                <td align="center" valign="middle">
-                    <form action="{% url search %}" method="get">
-                        <div>
-                            <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" />
-                            <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" />
-                        </div>
-                        <div class="options">
-                            <input id="type-question" type="radio" value="question" name="t" 
-                                checked="checked" /><label for="type-question">{% trans "questions" %}</label>
-                            <input id="type-tag" type="radio" value="tag" name="t" /><label for="type-tag">{% trans "tags" %}</label>
-                            <input id="type-user" type="radio" value="user" name="t" /><label for="type-user">{% trans "users" %}</label>
-                        </div>
-                    </form>
-                </td>
-            </tr>
-                       </table>
+         
+               <div id="top">
+                   {% loadregistry header_links %}{% endloadregistry %}
                </div>
+
+    <div id="nav">
+        {% loopregistry page_top_tabs %}{% spaceless %}
+            <a id="nav_{{ tab_name }}"{% ifequal tab tab_name %} class="on"{% endifequal %} href="{{ tab_url }}" >{{ tab_title }}</a>
+        {% endspaceless %}{% endloopregistry %}
+        <a id="nav_ask" href="{% url "ask" %}" class="special">{% trans "ask a question" %}</a>
+    </div>
+  </div>
+
+  <div class="clear"></div>
+  
+       <div id="searchBar">
+    <form action="{% url "search" %}" method="get">
+        {% csrf_token %}
+        <div>
+            <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" />
+            <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" />
+        </div>
+        <div class="options">
+            <input id="type-question" type="radio" value="question" name="t" 
+                checked="checked" /><label for="type-question">{% trans "questions" %}</label>
+            <input id="type-tag" type="radio" value="tag" name="t" /><label for="type-tag">{% trans "tags" %}</label>
+            <input id="type-user" type="radio" value="user" name="t" /><label for="type-user">{% trans "users" %}</label>
+        </div>
+    </form>    
        </div>
+
+       {% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %}
+  <div id="announcement">
+      {{ settings.ANNOUNCEMENT_BAR|or_preview:request|static_content:settings.ANNOUNCEMENT_BAR_RENDER_MODE }}
+  </div>
+  {% endif %}
+
 <!-- end template header.html -->