1 {% extends "base.html" %}
4 <link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
5 <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
6 <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
7 <script type="text/javascript" charset="utf-8">
9 function search(event) {
10 var expr = new RegExp($('#file-list-filter').val(), 'i');
12 $('#file-list p').hide().filter(function(index) {
13 return expr.test($(this).attr('title'));
16 event.preventDefault();
19 $('#file-list-find-button').click(search);
20 $('#file-list-filter').bind('keyup change DOMAttrModified', search);
22 var defaultOptions = {
40 var cookie = $.cookie('options');
41 options = $.secureEvalJSON(cookie);
43 options = defaultOptions;
46 options = defaultOptions;
49 $.each(options.recentFiles, function(index) {
50 var fileId = options.recentFiles[index].fileId;
51 $('#recent-file-list ul').append('<li><a href="/editor/' + fileId + '/">' + fileId + '</a></li>');
55 {% endblock extrahead %}
57 {% block maincontent %}
58 <div id="main-page-widgets">
60 <div class="file-list-widget">
61 <form action="#" method="GET">
62 <p><input name="filter" id="file-list-filter" type="text" size="60" />
63 <input type="submit" value="Znajdź" id="file-list-find-button"/>
64 <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
68 {% load explorer_tags %}
69 {% for file in files %}
70 <p title="{{file|bookname}}"><a href="{% url editor_view file %}">{{ file|bookname }}</a></p>
75 <div id="recent-file-list">
76 <h2>Ostatnio oglądane pliki:</h2>
81 {% if perms.explorer.can_add_files %}
82 <div class="upload-file-widget">
83 <h2>Dodaj nowy utwór</h2>
84 <form action="{% url file_upload %}" method="POST" enctype="multipart/form-data">
85 <p><label>{{bookform.file.label}}: {{ bookform.file }}</label></p>
86 <p><label>{{bookform.bookname.label}}: {{bookform.bookname}}</label></p>
87 <p><label>{{bookform.autoxml}} {{bookform.autoxml.label}}</label></p>
88 <p><button type="submit">Dodaj książkę</button></p>
94 {% endblock maincontent %}