2ab5ab9c50bec1f9987d70e33bfc07732434b14f
[redakcja.git] / apps / wiki / templates / wiki / document_list.html
1 {% extends "wiki/base.html" %}
2
3
4 {% block extrabody %}
5 {{ block.super }}
6 <script type="text/javascript" charset="utf-8">
7 $(function() {
8         function search(event) {
9         event.preventDefault();
10         var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
11         $('#file-list tbody tr').hide().filter(function(index) {
12             return expr.test(slugify($('a', this).text()));
13         }).show();
14     }
15
16     $('#file-list-find-button').click(search).hide();
17         $('#file-list-filter').bind('keyup change DOMAttrModified', search);
18 });
19 </script>
20 {% endblock %}
21
22 {% block leftcolumn %}
23         <form method="get" action="#">
24     <table  id="file-list">
25         <thead>
26                 <tr><th>Filtr:</th>
27                         <th><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="40" /></th>
28                         <th><input type="reset" value="Wyczyść" id="file-list-reset-button"/></th>
29                         </tr>
30                 </thead>
31                 <tbody>
32         {% for file in document_list %}
33             <tr>
34                 <td colspan="3"><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></td>
35                                 <!-- placeholder </td> -->
36                         </tr>
37         {% endfor %}
38                 </tbody>
39     </table>
40         </form>
41 {% endblock leftcolumn %}
42
43 {% block rightcolumn %}
44         <div id="last-edited-list">
45                 <h2>Twoje ostatnio otwierane dokumenty:</h2>
46                 <ol>
47                         {% for   name, date in last_docs %}
48                         <li><a href="{% url wiki.views.document_detail name|urlencode %}"
49                                 target="_blank">{{ name }}</a><br/><span class="date">({{ date|date:"H:i:s, d/m/Y" }})</span></li>
50                         {% endfor %}
51                 </ol>
52         </div>
53 {% endblock rightcolumn %}