1 {% extends "base.html" %}
4 <link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
5 <script src="{{ STATIC_URL }}js/slugify.js" type="text/javascript" charset="utf-8"></script>
6 <script type="text/javascript" charset="utf-8">
8 function search(event) {
9 event.preventDefault();
11 var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
13 $('#file-list p').hide().filter(function(index) {
14 console.log(expr.test($(this).attr('title')))
15 return expr.test(slugify($('a', this).html()));
19 $('#file-list-find-button').click(search).hide();
20 $('#file-list-filter').bind('keyup change DOMAttrModified', search);
23 {% endblock extrahead %}
25 {% block maincontent %}
26 <h1><img src="{{STATIC_URL}}/img/logo.png">Platforma Redakcyjna</h1>
28 <div class="document-list">
29 <form action="#" method="GET">
30 <p>Filtr: <input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
31 <input type="submit" value="Znajdź" id="file-list-find-button"/>
32 <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
37 {% for file in document_list %}
38 <p><a href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p>
44 {% endblock maincontent %}