1 {% extends "base.html" %}
4 <link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
5 <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}js/jquery.paginate.js"></script>
6 <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
7 <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
8 <script type="text/javascript" charset="utf-8">
10 $('#file-list').paginate({itemsPerPage: 15});
12 $('#file-list-find-button').click(function(event)
14 var expr = new RegExp( $('#file-list-filter').val() );
16 $('#file-list').filterItems( function(filename) {
17 return expr.test(filename);
20 event.preventDefault();
23 $('#file-list-reset-button').click(function(event)
25 $('#file-list').filterItems();
26 event.preventDefault();
29 var defaultOptions = {
47 var cookie = $.cookie('options');
48 options = $.secureEvalJSON(cookie);
50 options = defaultOptions;
53 options = defaultOptions;
56 $.each(options.recentFiles, function(index) {
57 var fileId = options.recentFiles[index].fileId;
58 $('#recent-file-list ul').append('<li><a href="{% url editor_base %}'+fileId+'">' + fileId + '</a></li>');
62 {% endblock extrahead %}
64 {% block maincontent %}
65 <div id="main-page-widgets">
67 <div class="file-list-widget">
68 <form action="#" method="GET">
69 <p><input name="filter" id="file-list-filter" type="text" size="60" />
70 <input type="submit" value="Znajdź" id="file-list-find-button"/>
71 <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
75 {% load explorer_tags %}
76 {% for file in files %}
77 <p title="{{file|bookname}}"><a href="{% url editor_view file %}">{{ file|bookname }}</a></p>
82 <div id="recent-file-list">
83 <h2>Ostatnio oglądane pliki:</h2>
88 {% if perms.explorer.can_add_files %}
89 <div class="upload-file-widget">
90 <h2>Dodaj nowy utwór</h2>
91 <form action="{% url file_upload %}" method="POST" enctype="multipart/form-data">
92 <p><label>{{bookform.file.label}}: {{ bookform.file }}</label></p>
93 <p><label>{{bookform.bookname.label}}: {{bookform.bookname}}</label></p>
94 <p><label>{{bookform.autoxml}} {{bookform.autoxml.label}}</label></p>
95 <p><button type="submit">Dodaj książkę</button></p>
101 {% endblock maincontent %}