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 <div id="main-page-widgets">
28 <div class="file-list-widget">
29 <form action="#" method="GET">
30 <p><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"/>
36 {% for file in document_list %}
37 <p><a href="/{{ file|urlencode }}">{{ file }}</a></p>
42 <div id="recent-file-list">
43 <h2>Ostatnio oglądane pliki:</h2>
48 {% if perms.explorer.can_add_files %}
49 <div class="upload-file-widget">
50 <h2>Dodaj nowy utwór</h2>
52 <form action="{% url file_upload %}" method="POST" enctype="multipart/form-data">
54 <p><button type="submit">Dodaj książkę</button></p>
61 {% endblock maincontent %}