1 {% extends "base.html" %}
3 {% load catalogue_tags chunks %}
5 {% block bodyid %}document-list-body{% endblock %}
7 {% block title %}{% trans "Hand-outs for teachers on " %}WolneLektury.pl{% endblock %}
10 <script type="text/javascript" charset="utf-8">
12 $('#document-list a[data-hash]').click(function() {
13 if (!$(this).hasClass('active')) {
14 $('#document-list a[data-hash]').removeClass('active');
15 $(this).addClass('active');
16 document.location.hash = $(this).attr('data-hash');
23 function checkHash() {
24 if (document.location.hash != lastHash) {
25 lastHash = document.location.hash;
26 var documentLink = $('#document-list a[data-hash=' + document.location.hash + ']');
27 if (!documentLink.hasClass('active')) {
28 $('#document-list a').removeClass('active');
29 documentLink.addClass('active');
32 if ($('#document-detail').attr('data-hash') != lastHash) {
34 .attr('data-hash', lastHash)
35 .load(documentLink.attr('href'));
37 } else if (!document.location.hash) {
38 $first = $('#document-list a:first');
39 $first.addClass('active');
40 location.replace($first.attr('data-hash'));
43 setTimeout(checkHash, 500);
49 {% endblock extrahead %}
51 <h1>{% trans "Hand-outs for teachers" %}</h1>
52 <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
53 <p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url main_page %}">{% trans "return to main page" %}</a></p>
56 <div id="document-list">
57 {% chunk "document-list" %}
59 <div id="document-detail">