* Improved history view (still not there).
[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         
15         var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
16         
17         $('#file-list p').hide().filter(function(index) {
18             console.log(expr.test($(this).attr('title')))
19             return expr.test(slugify($('a', this).html()));
20         }).show();
21     }
22         
23     $('#file-list-find-button').click(search).hide();
24         $('#file-list-filter').bind('keyup change DOMAttrModified', search);
25 });
26 </script>
27 {% endblock %}
28
29 {% block maincontent %}
30 <h1><img src="{{STATIC_URL}}/img/logo.png">Platforma Redakcyjna</h1>
31
32 <div id="document-list">         
33     <div id="file-list">
34         <form action="#" method="GET">
35         <p>Filtr: <input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
36                 <input type="submit" value="Znajdź" id="file-list-find-button"/>
37                 <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
38         </p>
39         </form>
40         {% for file in document_list %}
41                 <p><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p>
42         {% endfor %}
43     </div>
44         
45         <div id="last-edited-list">
46                 <h2>Twoje ostatnio otwierane dokumenty:</h2>
47                 <ol>
48                         {% for   name, date in last_docs %}
49                         <li><a href="{% url wiki.views.document_detail name|urlencode %}"
50                                 target="_blank">{{ name }}</a><br/><span class="date">({{ date|date:"H:i:s, d/m/Y" }})</span></li>
51                         {% endfor %}                    
52                 </ol>
53         </div>
54 </div>
55
56 </div>
57 {% endblock maincontent %}