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="{% url editor_base %}'+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"/>
67 {% load explorer_tags %}
68 <ul class="file-tree-part file-tree-top">
69 {% for file in filetree %}
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>
85 <form action="{% url file_upload %}" method="POST" enctype="multipart/form-data">
87 <p><button type="submit">Dodaj książkę</button></p>
94 {% endblock maincontent %}