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