base.html 1.9 KB
Newer Older
1
{% extends "main_django.html" %}
2
{% load compressed %}{% load sekizai_tags i18n %}{% load url from future %}{% load staticfiles %}
3 4 5

{% block title %}<title>{% block pagetitle %}{% endblock %} | edX Wiki</title>{% endblock %}

6 7
{% block headextra %}
  {% compressed_css 'course' %}
8
  
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  <script type="text/javascript">
    function ajaxError(){}
    
    $.ajaxSetup({
      timeout: 7000,
      cache: false,
      error: function(e, xhr, settings, exception) {
          ajaxError();
      }
    });

    function jsonWrapper(url, callback) {
      $.getJSON(url, function(data) {
        if (data == null) {
          ajaxError();
        } else {
          callback(data);
        }
      });
    }
  </script>
30 31


32 33
  {% addtoblock 'js' %}
    {% comment %} These scripts load at the bottom of the body {% endcomment %}
34 35 36
    <script>
      window.onload = add_schematic_handler(window.onload);
    </script>
37

38 39 40
    <script src="{% static 'js/bootstrap-alert.js' %}"></script>
    <script src="{% static 'js/bootstrap-collapse.js' %}"></script>
    <script src="{% static 'js/bootstrap-modal.js' %}"></script>
41

42 43 44 45
    {% with mathjax_mode='wiki' %}
      {% include "mathjax_include.html" %}
    {% endwith %}
  {% endaddtoblock %}
46

47 48
{% endblock %}

49

50
{% block body %}
51
  {% if course %}
52
    {% include "courseware/course_navigation.html" with active_page_context="wiki" %}
53 54
  {% endif %}

Tom Giannattasio committed
55
  <section class="container wiki {{ selected_tab }}">
Tom Giannattasio committed
56 57 58 59
    <div class="wiki-wrapper">
      {% block wiki_body %}
        
        {% block wiki_breadcrumbs %}{% endblock %}
Tom Giannattasio committed
60

Tom Giannattasio committed
61 62 63 64 65 66 67 68
        {% if messages %}
          {% for message in messages %}
            <div class="alert alert-{{ message.tags }}">
              <a class="close" data-dismiss="alert" href="#">&times;</a>
              {{ message }}
            </div>
          {% endfor %}
        {% endif %}
69

Tom Giannattasio committed
70
        {% block wiki_contents %}{% endblock %}
71

Tom Giannattasio committed
72 73
      {% endblock %}
    </div>
74

Tom Giannattasio committed
75 76
  </section>

77
{% endblock %}