1 {% extends "base.html" %}
 
   2 {% load catalogue_tags chunks %}
 
   4 {% block bodyid %}document-list-body{% endblock %}
 
   6 {% block title %}Materiały pomocnicze dla nauczycieli w WolneLektury.pl{% endblock %}
 
   9     <script type="text/javascript" charset="utf-8">
 
  11             $('#document-list a').click(function() {
 
  12                 if (!$(this).hasClass('active')) {
 
  13                     $('#document-list a').removeClass('active');
 
  14                     $(this).addClass('active');
 
  15                     document.location.hash = $(this).attr('data-hash');
 
  22             function checkHash() {
 
  23                 if (document.location.hash != lastHash) {
 
  24                     lastHash = document.location.hash;
 
  25                     var documentLink = $('#document-list a[data-hash=' + document.location.hash + ']');
 
  26                     if (!documentLink.hasClass('active')) {
 
  27                         $('#document-list a').removeClass('active');
 
  28                         documentLink.addClass('active');
 
  31                     if ($('#document-detail').attr('data-hash') != lastHash) {
 
  33                             .attr('data-hash', lastHash)
 
  34                             .load(documentLink.attr('href'));
 
  36                 } else if (!document.location.hash) {
 
  37                     $('#document-list a:first').click();
 
  40                 setTimeout(checkHash, 500);
 
  46 {% endblock extrahead %}
 
  48     <h1>Materiały pomocnicze dla nauczycieli</h1>
 
  49     <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
 
  50         <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url main_page %}">wróć do strony głównej</a></p>
 
  53     <div id="document-list">
 
  55         {% for object in object_list %}
 
  56             <li><a href="{{ object.get_absolute_url }}" data-hash="#{{ object.slug }}">{{ object }}</a></li>
 
  60     <div id="document-detail">